Re: New opensource R IDE - package it before everyone else

Was going to do this from source and then package it.

However, an ANT interface appears when I run sudo make install, and I get an error later on: CMake Error at src/cpp/desktop/cmake_install.cmake:64 (FILE): file INSTALL cannot find "/lib/libQtCore.so.4".

The whole source system has several differnt files and system checking scripts and is beyond the simple, ./configure /make /make install procedure so I'm afraid it's beyond me. Unless anyone else knows that the issue is.

Last edited by Ben9250 (2011-03-01 21:34:41)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

It seems to me, at least, bearing in mind this is my first go at doing things from source to understand the packaging, that it's trying to find them at either usr/share/lib (which does not exist), because I defined /usr/share as the CMAKE_INSTALL_PREFIX, rather than the default /usr/local, or it's looking for them in /lib/ where they are not - the actual location is /usr/lib. I have thought of either setting the CMAKE_INSTALL_PREFIX back to the default, although Arch normally has things install to /usr/share (In my experience), rather than /usr/local. I've also thought of using links in the locations it wants.

Last edited by Ben9250 (2011-03-02 20:41:01)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

Ben9250 wrote:

Was going to do this from source and then package it.

However, an ANT interface appears when I run sudo make install, and I get an error later on: CMake Error at src/cpp/desktop/cmake_install.cmake:64 (FILE): file INSTALL cannot find "/lib/libQtCore.so.4".

The whole source system has several differnt files and system checking scripts and is beyond the simple, ./configure /make /make install procedure so I'm afraid it's beyond me. Unless anyone else knows that the issue is.

Do you have Qt installed? It is required for rstudio.

I've compiled RStudio successfully, but haven't made it all the way into a package yet, here are the steps I needed to take if anyone else wants to give it a shot in the meantime

src="${PWD}"
# Checkout and make sure is up to date
git clone git@github.com:rstudio/rstudio.git
cd rstudio
git submodule update --init --recursive
./pull.sh # I think this is uneccessary after the last line? But it can't hurt.
# Setup dependencies
sudo pacman -S r \
cmake \
pango \
boost \
apache-ant \
openssl \ #equiv of libssl-dev for apt-get?
bzip2 \ #eqiv of libbz2-dev?
pam \ #equiv of libpam-dev?
openjdk6 \ # or JRE should work
unzip \
glib2 \ #equiv of libglib2.0-dev
libsm \ #equiv of libSM-dev
libxrender \ #equiv of libxrender-dev
fontconfig \ #equiv of libfontconfig1-dev
libxext #equiv of libxext-dev
# Link to the ant binary on default path so makefile can find it
sudo ln -s /usr/share/java/apache-ant/bin/ant /usr/bin/ant
"${src}"/rstudio/dependencies/linux/install-qt-sdk # Huge package, make separate pkgbuild?
"${src}"/rstudio/dependencies/common/install-dependencies-java # This creates something in $src/rstudio/src/gwt which is required for make to succeed later on
# There is a install-boost script that does not need to be run
# if boost is already installed with pacman
# Make a place to store build files
mkdir build
cd build
cmake -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/rstudio ..
sudo make install

This installs it into /opt/rstudio. I think this would be the correct place to put it on Arch, but not sure.

Re: New opensource R IDE - package it before everyone else

Last night I tried again with the default /usr/local.... path, rather than usr/share... but still had the same problem. I'm pretty sure I do have qt installed, I'll double check when back from university. And I'll also give your instructions a go when I'm back.

[EDIT] - Tried again and still failed, although I think it's probably more my incompetence in coding - compiling etc, despite my reading and understanding of Arch and, in principle, how the abs I'm afraid I lack the practical prowess. Although something tells me this program isn't the simpleset case of compiling from source there is, so that probably does not help.

Could somebody explain - because I know the general organisational system of Linux - etc has configuration, bin is like default path, usr contains user data, and then the sys folders contain lots of system information and local (I think) includes programs that are local either to machine or user, but share makes it available to everyone (I think, not entirely positive though). So what determines wether the program goes in opt - share- or local. Because I have noticed, first with the tex tree, and then with several other things, that Arch packages install to different places, than say deb based ones like Ubuntu. And if I install Emacs, or tex from source, they are not put in the same place as when installed with pacman.

Last edited by Ben9250 (2011-03-03 00:02:42)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

I am so exited for this. You guys have my support! It's a shame I can't build PKGBUILDs. What should it be called, since rstudio is already taken? rguistudio? Something like that?

Perhaps some nuance such as R-Studio. I know however packages normally named all in lower case. Perhaps r-studio-ide, something like that.

Last edited by Ben9250 (2011-03-02 18:03:16)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

I agree that the install-qt-sdk is huge, now I'm still learning, but it looks like it's already a binary, that is downloaded, and then executed with sudo, before being removed again afterwards. So would a seperate pkgbuild for it involve finding source for that binary? Or merely suggesting that it's installation - as is - be put in its own pkgbuild to be seperate from the rest of the process?

Regarding compiling, I keep getting thsi error when I try to update the git:[ben@ben-laptop ~]$ git clone git@github.com:rstudio/rstudio.gitfatal: destination path 'rstudio' already exists and is not an empty directory.

and :

[ben@ben-laptop rstudio]$ ./pull.shfatal: Not a git repository (or any parent up to mount parent )Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I also have an issue when using the qt-sdk installing script:

ln: accessing `/opt/qtsdk-2010.05/qt/bin/qmake': No such file or directory

Last edited by Ben9250 (2011-03-03 04:07:45)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

I think this huge sdk download is not necessary at all since all this is included in the 'qt' package. I will try to throw together a PKGBUILD (although testing and building will very likely take ages on my netbook).

Re: New opensource R IDE - package it before everyone else

Regarding compiling, I keep getting thsi error when I try to update the git:[ben@ben-laptop ~]$ git clone git@github.com:rstudio/rstudio.gitfatal: destination path 'rstudio' already exists and is not an empty directory.

Does the rstudio directory already exist in whatever place you are trying to run the git clone command? Running that command will create the rstudio directory in your current working directory, so there should not already be a directory in there named rstudio.

[ben@ben-laptop rstudio]$ ./pull.shfatal: Not a git repository (or any parent up to mount parent )Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

It sounds like the repos and submodules were not checked out correctly maybe and so this script is failing.

I also have an issue when using the qt-sdk installing script:

ln: accessing `/opt/qtsdk-2010.05/qt/bin/qmake': No such file or directory

This one I'm not sure about, when do you get this error, is it right when you start the script? Does the gui come up for the installer at all?

Re: New opensource R IDE - package it before everyone else

kljohann wrote:

I think this huge sdk download is not necessary at all since all this is included in the 'qt' package. I will try to throw together a PKGBUILD (although testing and building will very likely take ages on my netbook).

If it is all in the Qt package that would be great. The SDK is like a 500MB download.

Re: New opensource R IDE - package it before everyone else

Isn't qt-sdk only needed for the compilation of rstudio? I installed rstudio on my ubuntu laptop and didn't need it. Is it not possible to upload a pre-build binary somewhere (like dropbox) and make the pkgbuild fetch it and install it?

Because of the GUI installer for qt-sdk, I'm not going to try to write a PKGBUILD for this package—not on my own anyway.

Jay

I'll see if I can replicate again. When I've tried to get qt-sdk in the past it's always failed, so I hadnt gotten that far yet. But would that mean in a PKGBUILD that only one option would be possible to the downloader, because makepkg is supposed to be without user input?

[EDIT] I have QT-SDK installing now. Because it's got it's own GUI, I struggle to see how this could be a seperate pkgbuild, because normally it involves installing things to the pkg directory of the fakeroot or wherever the build directory is, to then turn that framework into a package, the GUI to my mind abstracts this a bit.

Last edited by Ben9250 (2011-03-04 02:11:00)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

kljohann wrote:

I think this huge sdk download is not necessary at all since all this is included in the 'qt' package. I will try to throw together a PKGBUILD (although testing and building will very likely take ages on my netbook).

I will try uninstalling qt sdk and reinstalling in that case, it would be nice to be able to drop it from the makedepends.

Re: New opensource R IDE - package it before everyone else

Just tried building without the qt-sdk installer, it doesen't seem to work, gives errors about not being able to find qt.so libraries. So with the installer it is, unless somebody else gives it a crack and manages it without the installer. I'm given enough reason to agree with the above, for whatever reason the qt package on it's own is insufficient.

Last edited by Ben9250 (2011-03-04 04:57:11)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

I think the QT sdk really needs to be made into a separate package, although the script does check it's already installed when it's run, so it will not be re-downloaded or re-installed if you've already run the pkgbuild once.

We also need to find out what exactly in the SDK is really required for the build and see if there's any way to get it in a smaller package.

Finally the depends and makedepends are probably not exactly right. Some of the depends may actually be makedepends and vice-versa. I tried to look at the list of packages they recommended as dependencies for debian-based systems (https://github.com/rstudio/rstudio/blob … ies-debian) and find all the corresponding Arch packages, and then decide if it was a depends or makedepends. So I'm sure I made some mistakes there somewhere, although the package works for me.

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

I think the problem may be that some of the scripts in the rstudio code check the present working directory when they are run, so you want to be in the same directory as the script when you run it.

You can also try the PKGBUILD I posted of course.

Ahh didn't see that because haven't refreshed the page in so long! I shall try it now!

An additional problem I had with doing it manually, was that I'd make a build directory and cd to it, and issue the cmake configure stuff, before doing sudo make install, but it would keep telling me theres no CMakeLists.txt

[EDIT] PKGBUILD works! It's building the package. You are a genius. Although why I could get almost all the way through but then have it fail on me is really going to bug me. I started in my home directory and pulled the gits of github and updated them. Then cd'd to the rstudio directory that resulted. Then I'd install the dependencies from pacman, then run the qt-sdk script and java script from the rstudio directory, by pointing to them with /dependencies/linux.... and /dependencies/core....I'd follow the gui installer with defaults for qt-sdk Then from the rstudio directory i'd usse the cmake command, which would work, and then sudo make install, and there it would fail. I noticed you made a build directory, which I tried to make and cd to, and issue the cmake line and then sudo make install, but it would give me the error I mention above.

[EDIT]

Just installed the package and it works, better even that it was on my Windows PC, which wouldnt integrate with Sweave and wouldn't acknowlege my TeX distribution. I'm wondering about users who would download this from the AUR, and need a passphrase for when they git clone, because many of them may not even have an account, as I did not, until tonight/this morning, and I'd not used SSH before, because I didn't feel I'd need it and was concerned about security, big bad attackers know a lot more than me on the subject.

But I'm glad it works, and I'm happy to help with anything I can to make it more AUR ready, I'll do my best.

Last edited by Ben9250 (2011-03-04 05:42:03)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

Ben9250 wrote:

An additional problem I had with doing it manually, was that I'd make a build directory and cd to it, and issue the cmake configure stuff, before doing sudo make install, but it would keep telling me theres no CMakeLists.txt

Did you notice the two periods at the end of the command? ie ".." Since that build directory is empty after you make it, you need to point cmake to a directory that does have cmake config files (e.g. CMakeLists.txt).

I'm wondering about users who would download this from the AUR, and need a passphrase for when they git clone, because many of them may not even have an account.

It is a little weird, but it doesn't look like the company being rstudio has released a source code tarball. I only see packages for rpm and apt-get and then the git repo for Linux users so it seemed most logical to make a git package to me. RStudio is still in beta so I think once they have stable releases they will hopefully have a nicer way for packagers to get to the code for the release.

Re: New opensource R IDE - package it before everyone else

Aah, no I didn't see the two periods. So if there are two periods, it will look in the directory below for CMakeLists.txt? And then once built, the make DESTDIR="$pkgdir/" installline takes all it would make for /opt/rstudio, and put it into pkg for turning into a package, instead of installing it to the system directly (it's ok I'm just trying to relate it all to another more simple package I had a go at making, albeit rather badly, as others pointed out, but in doing it and then being corrected, I get the process a lot more).

Last edited by Ben9250 (2011-03-04 06:21:09)

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells

Re: New opensource R IDE - package it before everyone else

I've come up with an alternative to the git method - I made a bash script, that can be set to cron, or run manually, that updates the git, and then turns it into a tarball and puts it on public space on my Dropbox, thus anyone can access it, as can the PKGBUILD, which I then altered to work on the downloaded tarball rather than the git. With your blessing, I'd like to put this modified version on the AUR and see how it goes. I've thoroughly tested it on my machine and everything's fine. In fact I've been testing it out with a few basic functions and it's working batter than the Windows version I've got, and from reports, seemingly better than Ubuntu too. It's a temporary solution as I've asked the developers if they could make it easier to obtain source from a tarball or some other method that does not involve github, and I await a reply, if (porbably when) such a location became available, I would change the PKGBUILD to work on that instead. Some errors with the program are also because it is still being developed and is very new.

"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it." - H. G. Wells