-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R with png support #13
Comments
It might be useful to review this thread: |
Thanks! So based on that I am going to try to create my own R buildpack using Vulcan, with --with-cairo --with-libpng build switches. This seems like something way out of my league but I'll give it shot. |
You can also use vagrant to simulate the heroku environment and package On Wed, Jul 24, 2013 at 4:58 PM, Simon Hill [email protected]:
|
I'm trying to follow the instructions here to get a baseline R buildpack but I'm missing something big. https://github.com/virtualstaticvoid/heroku-buildpack-r/blob/master/support/README.md I downloaded the vulcan-build and build-r scripts into their own folder, and ran the vulcan create command to create Heroku build server. bash vulcan-build.sh
Where should I find the features.h file? |
Sorry for my ineptitude - all the files needed are in the /support folder. |
Would anyone be able to confirm that I need to add --with-cairo --with-libpng to line 58 to enable PNG support? ./configure --prefix=$prefix --without-x --with-cairo --with-libpng --enable-R-shlib && make && make install |
That is accurate, to the best of my knowledge. On Wed, Jul 24, 2013 at 6:01 PM, Simon Hill [email protected]:
|
Still no joy - my slug size went up by 20MB, but capabilities still show capabilities() Anyone have any ideas? The new buildpack is here: |
Ok ok so I am back here: noahhl/rookonheroku#1 (comment) I have the same question as the next commentator - how do I actually execute the commands referenced in that comment? As written they don't seem to be actual commands. curl fontconfig just returns an error. Could the enlightened educate the dumb please? |
I am not deeply familiar with vulcan building, but in a vagrant box you can On Wed, Jul 24, 2013 at 7:52 PM, Simon Hill [email protected]:
|
Awesome thanks. |
Sorry for the late response... I've tried building with cairo support without much success (was requested in issue #8). I found this thread How to get R to compile with PNG support on R devel that initially suggests it isn't possible on a headless server.
But further down they got it right by installing
I expect I'm a bit pressed for time at the moment, but will be happy give it a go next week. |
Great, thanks. I'm happy to try it out in the meantime, inexpert though I be. Where would we get libpango source from? Should I follow the Fortran example for compiling and including a dependency by source? Sent from my phone. On Jul 25, 2013, at 5:40 AM, Chris Stefano [email protected] wrote:
|
Yes, pretty much. Pango downloads here. |
Thanks. Do you have any views on this comment on a related thread? noahhl/rookonheroku#1 (comment) It suggests fontconfig and pixman are pre-requisites for cairo. |
If it is helpful, this is the build script I am working with right now. It #!/usr/bin/env bash #Get apt looking in the right places #Give the box the tools it needs to manage software #Install the dependencies for the packages below sudo mkdir -p /app INSTALL_LOCATION=/app/vendor mkdir -p $INSTALL_LOCATION/lib cd $INSTALL_LOCATION/include cd $INSTALL_LOCATION/include cd $INSTALL_LOCATION/include Tell Cairo where fontconfig and pixman areexport LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig echo "******************************************"curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o Tell R where Cairo isexport MAIN_CFLAGS="-I${INSTALL_LOCATION}/include On Thu, Jul 25, 2013 at 10:56 AM, Simon Hill [email protected]:
|
I'm not certain this is helpful, but here is a node.js buidpack with cairo. There's some notes that might be useful about issues with getting cairo to build. https://github.com/mojodna/heroku-buildpack-nodejs#cairo (my stack is multipack node and R, but I think R needs to compile with cairo so I am doubtful it is helpful - compiling now). In the notes, specifically "vulcan issue 20 contains information about how to build the binaries (more or less). Cairo was built by hand by using heroku run bash, as I couldn't get vulcan to correctly use the pixman and freetype dependencies when building. pixman and freetype were manually placed in /app/vendor and added to CPATH, CPPATH, and LIBRARY_PATH." |
So, of course that didn't solve my R build, because I need cairo installed before R builds. I did confirm that buildpack https://github.com/mojodna/heroku-buildpack-nodejs#cairo installs cairo ~ $ dpkg -S cairo I don't know what to do next because I don't know how to solve the problem that R is built on Vulcan and apparently Vulcan won't build cairo. |
I had a thought - anyone know if it is possible to create a multipack of Vulcan and the node+Cairo package. That might do it to create the right environment for R. But I don't know how to create a Vulcan buildpack to use for this purpose. |
Here's a build pack with just Cairo, for the non-nodester. |
Are we sure Heroku does not come with cairo? I set up a clean vulcan build server and ran: ~ $ dpkg -S cairo Is it possible that we just need to tell R where to find it? Anyone know how to do that? |
Heroku does come with Cairo ( The Cairo lib you want to actually be linking against / loading is in +1 on building via Vagrant; some things need more memory than are available on a dyno. In this case, you could even take the Heroku-esque image, |
Ok, I'm making some progress. I've been testing locally using vagrant and the heroku basebox. I've managed to build
Trying to figure out why this is happening. |
Is it too early to Fedex you a bottle of scotch for your efforts? |
Check your On Sat, Jul 27, 2013 at 8:36 AM, Chris Stefano [email protected]
|
I am producing the same error in a vagrant box with the below build script. configure:31927: checking whether cairo is >= 1.2 and works
Build: #!/usr/bin/env bash
I am going to screw around with pkg config path, but if anyone knows the On Sat, Jul 27, 2013 at 12:07 PM, Seth Fitzsimmons <[email protected]
|
Cflags -i to he right directory fixes this, now debugging a version
|
Good luck! I'm getting defeated just installing rails to get the vagrant bundle to work. I don't know much Ruby. |
If you are on Linux, I think it is just sudo apt-get install vagrant. If On Jul 27, 2013 1:37 PM, "Simon Hill" [email protected] wrote:
|
How about Mac OS X? Sent from my phone. On Jul 27, 2013, at 2:03 PM, bwarren2 [email protected] wrote:
|
Note: the above lacks pango. On Mon, Jul 29, 2013 at 6:22 AM, Ben Warren [email protected] wrote:
|
Ok, I haven't tried this on |
Awesome! You guys rock. Sent from my phone. On Jul 29, 2013, at 6:31 AM, Chris Stefano [email protected] wrote:
|
I'll give it a spin as soon as I get into the office. Thank you! Sent from my phone. On Jul 29, 2013, at 3:24 AM, bwarren2 [email protected] wrote:
|
I've created the png_support branch with the updated build script. Also, the updated binaries are on S3, so you can provision your heroku instance as follows to get this version: heroku create --stack cedar --buildpack http://github.com/virtualstaticvoid/heroku-buildpack-r.git#png_support |
Testing it now |
In my tests, running I think it may still need |
Mine worked without pan go, I believe. Are you calling PNG(type='cairo')
|
I have the same error. :( Also - must be unrelated but it is a change, for some reason RJSONIO no longer builds as part of my init.r It used to install right in, but now I get this error - do you know what might have changed to cause this? I use from_JSON and to_JSON to get data in and out of Rserve,
|
I did not patch GCC headers, I think; I do not recall why I skipped that.
|
Apologies - that was to @virtualstaticvoid What's weird is that |
The following generates a file, but I am having some kind of newbie failure to get it to serve from my web server so that I can see what it looks like.
|
More libraries that now fail which did not used to - wordcloud trying URL 'http://cran.fhcrc.org/src/contrib/wordcloud_2.4.tar.gz'
|
You should be able to pull down a file with a curl from the address hosting
|
O of course - jeez. :) I'm going to try your tarball now and see if I get the same library failures. Rcpp is the dependency that won't install for wordcloud. |
Here is the full heroku bash R output if I try to install package 'wordcloud' with @virtualstaticvoid branch also installing the dependency 'Rcpp' trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Rcpp_0.10.4.tar.gz' opened URLdownloaded 2.3 Mb trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/wordcloud_2.4.tar.gz' opened URLdownloaded 39 Kb
The downloaded source packages are in |
@bwarren2 your build has the exact same library install failures. I'm just checking that I am not insane and building with @virtualstaticvoid original buildpack where I believe they installed fine. BRB. |
Yep, definitely worked with the old R buildpack: trying URL 'http://cran.fhcrc.org/src/contrib/wordcloud_2.4.tar.gz' opened URLdownloaded 39 Kb
|
@bwarren2 Yes |
Looking into @metalaureate compile problem with |
Thank you - sorry this is such a toilsome project. I'm so grateful to the both of you for working on this. |
Ok, it seems that the "clean up" to make the build-pack smaller deleted more than it should have. |
Awesome possum, @virtualstaticvoid. I am obviously just hacking my way How did you identify the set of dependencies to install? I tried to What are shopt and pushd doing in your cleanup? I am unfamiliar with How is R detecting your installed things without flags? I do not Many thanks for your diligent efforts; they are much appreciated.
|
Stupendous @virtualstaticvoid ! Wow wow wow wow. Thanks to all of you. Kick ass! |
Running Also, by building with the dependencies via Also, piping command outputs to file, so you can compare them, makes it easy to see the differences. As for |
Many thanks Chris; I feel bad pestering people over these sorts of tasks,
|
Thanks again for this buildpack. I have it deployed to Heroku as a multipack with node.js, running Rserve through the rio node module.
I have a big favor to ask - I need to add png support, to save graphics generated on Heroku. I believe I have the same problem as this StackOverflow:
http://stackoverflow.com/questions/16619746/r-with-png-support
Would you consider creating a build with png support or point me to instructions on how to do it? I'm not very expert so I'm a bit daunted by the challenge of doing that, but it's a showstopper for me.
I get
Error in png("test") : X11 is not available
The text was updated successfully, but these errors were encountered: