So there's this great new thing called Vagrant. Basically, it's a system designed to solve all your problems when it comes to putting together a development environment for a team of people. Sounds great, so how do you install it?
Well, you need to download and install vagrant and virtualbox. Seems simple enough. sudo apt-get install virtualbox, right? Nope. You see, I'm using Ubuntu 14.04 on a Acer C720 chromebook. I'm running it chrooted using the crouton script.
In order to install virtualbox, you need to build the chromebook linux kernel because it doesn't have the 3.4 headers. I found a great step by step guide to do that here:
https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-%28x86%29
Nice. Follow the guide, and we're done? Not so fast... In order to build the chrome kernel, you need GCC 4.9. If you try to apt-get it on ubuntu 14.04, you might even think you've installed it, but the package is empty. You have to build this from source as well.
Okay, so to install Vagrant, I need virtualbox, which requires kernel headers, which requires me to build gcc 4.9. How do?
https://github.com/dnschneid/crouton/issues/939
To keep this brief, I'll just link to the issue I created on crouton. It details the steps I took to make virtualbox work on crouton. Posting this so my future self can find it if I ever need to reinstall my chromebook.
Sunday, July 20, 2014
Saturday, February 1, 2014
Building RStudio on ARM
I finished building RStudio on my Nexus 5. I'm making these notes for anyone who might find them helpful, including my future self if I need to do it again for any reason. I assume you've already installed R with
sudo apt-get install r-base
First of all, you need to download the source for RStudio to your device. Just go to the github page and download the zip
https://github.com/rstudio/rstudio
Once you do that, you basically just need to follow the instructions in the INSTALL document
https://github.com/rstudio/rstudio/blob/master/INSTALL
There are some gotchas though. For starters, it says you need to install the dependencies, but it doesn't spell it out. I overlooked that section and started installing dependencies as I ran into the need for them one at a time with apt-get. So to spare yourself the trouble, cd into the dependencies/linux directory and
./install-dependencies-debian
(I assume you're running ubuntu on your phone. You may need one of the other scripts if not)
That took quite a while. Like hours it seemed. But it will finally finish building as long as you don't let you phone screen sleep.
That's another gotcha. I didn't have the problem installing dependencies by dumb luck. I decided to read some news on the web while it installed dependencies. That kept the phone awake and building. Later, when I built RStudio, I let it sleep and went to bed, only to wake to no progress in the build. I only figured it out because I forgot it was building, and left with the phone in my pocket.
I remembered a few hours later, but noticed the battery had not drained significantly. That told me the phone was idle and explained why there was no progress in the build. So I set screen sleep to 30 minutes and kept it awake and build progress began. It finished the build after 13 hours. It will probably only take a couple of hours if you keep the screen awake the whole time.
Finally, there's one last problem I encountered. I had to replace the compiler.jar in the source with a newer version. Specifically, this version
https://code.google.com/p/closure-compiler/downloads/detail?name=compiler-20130823.zip&can=2&q=
The version located in
src/gwt/tools/compiler
appears to hang forever when compiling gwt. I tried the latest version of the jar with no luck too. It required that specific version of compiler.jar to work, for whatever reason.
Also, there's a bonus possible gotcha. It's that you may need to build with the older JDK6 downloaded by the dependencies script. I read somewhere that it would not compile with the openjdk 7 which I had installed before installing RStudio. I didn't try building with JDK 7 because I just wanted it working at that point. If you have both installed, you can switch between them with
sudo update-alternatives --config java
Hopefully that helps save someone a lot of time. It ended up taking me more than a week to find all this.
sudo apt-get install r-base
First of all, you need to download the source for RStudio to your device. Just go to the github page and download the zip
https://github.com/rstudio/rstudio
Once you do that, you basically just need to follow the instructions in the INSTALL document
https://github.com/rstudio/rstudio/blob/master/INSTALL
There are some gotchas though. For starters, it says you need to install the dependencies, but it doesn't spell it out. I overlooked that section and started installing dependencies as I ran into the need for them one at a time with apt-get. So to spare yourself the trouble, cd into the dependencies/linux directory and
./install-dependencies-debian
(I assume you're running ubuntu on your phone. You may need one of the other scripts if not)
That took quite a while. Like hours it seemed. But it will finally finish building as long as you don't let you phone screen sleep.
That's another gotcha. I didn't have the problem installing dependencies by dumb luck. I decided to read some news on the web while it installed dependencies. That kept the phone awake and building. Later, when I built RStudio, I let it sleep and went to bed, only to wake to no progress in the build. I only figured it out because I forgot it was building, and left with the phone in my pocket.
I remembered a few hours later, but noticed the battery had not drained significantly. That told me the phone was idle and explained why there was no progress in the build. So I set screen sleep to 30 minutes and kept it awake and build progress began. It finished the build after 13 hours. It will probably only take a couple of hours if you keep the screen awake the whole time.
Finally, there's one last problem I encountered. I had to replace the compiler.jar in the source with a newer version. Specifically, this version
https://code.google.com/p/closure-compiler/downloads/detail?name=compiler-20130823.zip&can=2&q=
The version located in
src/gwt/tools/compiler
appears to hang forever when compiling gwt. I tried the latest version of the jar with no luck too. It required that specific version of compiler.jar to work, for whatever reason.
Also, there's a bonus possible gotcha. It's that you may need to build with the older JDK6 downloaded by the dependencies script. I read somewhere that it would not compile with the openjdk 7 which I had installed before installing RStudio. I didn't try building with JDK 7 because I just wanted it working at that point. If you have both installed, you can switch between them with
sudo update-alternatives --config java
Hopefully that helps save someone a lot of time. It ended up taking me more than a week to find all this.
Subscribe to:
Posts (Atom)