Giter Club home page Giter Club logo

Comments (74)

dcorking avatar dcorking commented on May 28, 2024

It might be useful to review this thread:
noahhl/rookonheroku#1

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

You can also use vagrant to simulate the heroku environment and package
things up that way. I am actually almost done with just that step myself.

On Wed, Jul 24, 2013 at 4:58 PM, Simon Hill [email protected]:

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.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21515652
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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
tar: features.h: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
Uploading source package... done
Building with: ./build-r 2.15.1

Downloading build artifacts to: /tmp/build.tgz
(available at http://vulcan-bcl-r.herokuapp.com/output/c1b11587-eb23-4255-a131-88c09d0c020d)
shill:R shill$

Where should I find the features.h file?

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Sorry for my ineptitude - all the files needed are in the /support folder.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

That is accurate, to the best of my knowledge.

On Wed, Jul 24, 2013 at 6:01 PM, Simon Hill [email protected]:

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


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21519688
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Still no joy - my slug size went up by 20MB, but capabilities still show

capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE

Anyone have any ideas?

The new buildpack is here:
https://github.com/metalaureate/r-png-buildpack.git

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Ok ok so I am back here: noahhl/rookonheroku#1 (comment)

I have the same question as the next commentator -
noahhl/rookonheroku#1 (comment)

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?

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I am not deeply familiar with vulcan building, but in a vagrant box you can
just apt-get the supporting tools (like curl) to do this kind of thing.
Curl is a linux library for pulling resources from elsewhere, and you need
it to exist on your system before it will run. I am working on literally
this exact problem right now (I am the owner of the stackoverflow thread
you mentioned) and I will keep you appraised.

On Wed, Jul 24, 2013 at 7:52 PM, Simon Hill [email protected]:

Ok ok so I am back here: noahhl/rookonheroku#1noahhl/rookonheroku#1 (comment)

I have the same question as the next commentator -
noahhl/rookonheroku#1noahhl/rookonheroku#1 (comment)

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?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21524810
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Awesome thanks.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

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.

you need an X11 server because that is where the font metrics come from or else no png for you.

But further down they got it right by installing libpango.

I finally got it working. After mucking around in the R configure file a bit and trying out some of the different tests, as well as comparing a working system with our broken system, I realized that pkg-config --exists pangocairo was working on the good system and not working on the broken system. So I installed libpango1.0-dev, and now R picks up the cairo package.

I expect libpango will need to be installed from source though.

I'm a bit pressed for time at the moment, but will be happy give it a go next week.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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:

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.

you need an X11 server because that is where the font metrics come from or else no png for you.

But further down they got it right by installing libpango.

I finally got it working. After mucking around in the R configure file a bit and trying out some of the different tests, as well as comparing a working system with our broken system, I realized that pkg-config --exists pangocairo was working on the good system and not working on the broken system. So I installed libpango1.0-dev, and now R picks up the cairo package.

I expect libpango will need to be installed from source though.

I'm a bit pressed for time at the moment, but will be happy give it a go next week.


Reply to this email directly or view it on GitHub.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Yes, pretty much. Pango downloads here.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

If it is helpful, this is the build script I am working with right now. It
runs on a vagrant box that looks like heroku (which you can find online).
It currently fails to recognize cairo on the R build step, though.

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update

#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++

#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev gfortran

sudo mkdir -p /app
sudo chown -R vagrant /app

INSTALL_LOCATION=/app/vendor

mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/vulcan

cd $INSTALL_LOCATION/include
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o
fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib"
export
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${INSTALL_LOCATION}/lib/pkgconfig"
export CAIRO_CFLAGS="-L/app/vendor/cairo"
export CAIRO_LIBS="-L/app/vendor/cairo"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Thu, Jul 25, 2013 at 10:56 AM, Simon Hill [email protected]:

Thanks. Do you have any views on this comment on a related thread?
noahhl/rookonheroku#1noahhl/rookonheroku#1 (comment)

It suggests fontconfig and pixman are pre-requisites for cairo.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21559717
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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

heroku/vulcan#20

"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."

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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
ia32-libs: /usr/lib32/libcairo.so.2
libcairo2: /usr/share/doc/libcairo2/copyright
ia32-libs: /usr/lib32/libcairo.so.2.10800.10
ia32-libs: /usr/lib32/libpangocairo-1.0.so.0
libcairo2: /usr/share/doc/libcairo2
libcairo2: /usr/share/doc/libcairo2/README.gz
libcairo2: /usr/share/doc/libcairo2/changelog.gz
ia32-libs: /usr/lib32/libpangocairo-1.0.so
ia32-libs: /usr/lib32/libcairo.so
libcairo2: /usr/lib/libcairo.so.2
libpango1.0-0: /usr/lib/libpangocairo-1.0.so.0.2800.0
libcairo2: /usr/lib/libcairo.so.2.10800.10
libpango1.0-0: /usr/lib/libpangocairo-1.0.so.0
libcairo2: /usr/share/doc/libcairo2/changelog.Debian.gz
libcairo2: /usr/share/doc/libcairo2/NEWS.gz
libcairo2: /usr/share/doc/libcairo2/AUTHORS.gz
ia32-libs: /usr/lib32/libpangocairo-1.0.so.0.2800.0

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.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Here's a build pack with just Cairo, for the non-nodester.

https://github.com/rumblelabs/heroku-buildpack-cairo

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Are we sure Heroku does not come with cairo? I set up a clean vulcan build server and ran:

~ $ dpkg -S cairo
ia32-libs: /usr/lib32/libcairo.so.2
libcairo2: /usr/share/doc/libcairo2/copyright
ia32-libs: /usr/lib32/libcairo.so.2.10800.10
ia32-libs: /usr/lib32/libpangocairo-1.0.so.0
libcairo2: /usr/share/doc/libcairo2
libcairo2: /usr/share/doc/libcairo2/README.gz
libcairo2: /usr/share/doc/libcairo2/changelog.gz
ia32-libs: /usr/lib32/libpangocairo-1.0.so
ia32-libs: /usr/lib32/libcairo.so
libcairo2: /usr/lib/libcairo.so.2
libpango1.0-0: /usr/lib/libpangocairo-1.0.so.0.2800.0
libcairo2: /usr/lib/libcairo.so.2.10800.10
libpango1.0-0: /usr/lib/libpangocairo-1.0.so.0
libcairo2: /usr/share/doc/libcairo2/changelog.Debian.gz
libcairo2: /usr/share/doc/libcairo2/NEWS.gz
libcairo2: /usr/share/doc/libcairo2/AUTHORS.gz
ia32-libs: /usr/lib32/libpangocairo-1.0.so.0.2800.0
~ $

Is it possible that we just need to tell R where to find it? Anyone know how to do that?

from heroku-buildpack-r.

mojodna avatar mojodna commented on May 28, 2024

Heroku does come with Cairo (dpkg -l | grep cairo for the version), but it doesn't include the development package (so you can't compile against it, since there are no headers). It's also an old version of Cairo (which matters for node-canvas, but may not for your cases).

The Cairo lib you want to actually be linking against / loading is in /app/vendor/cairo/lib (/usr/lib*/ contains the Heroku/Debian-provided, older lib). This is where CPATH, CPPPATH, LD_LIBRARY_PATH, etc. come 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, apt-get install libcairo2-dev (and possibly libpixman-1-0-dev), build against system Cairo, and then drop the resulting R binary on a Heroku dyno w/o needing add'l Cairo/pixman libraries (i.e. those provided by the buildpack).

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Ok, I'm making some progress. I've been testing locally using vagrant and the heroku basebox.

I've managed to build pixman-0.29.4 and cairo-1.9.14 from source successfully, but when running configure on R-1.15.1 sources, it's saying that it's found cairo but that it doesn't work:

$ ./configure --prefix=$vendordir/R --with-libpng --with-cairo --enable-R-shlib
...
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes
checking whether cairo is >= 1.2 and works... no

Trying to figure out why this is happening.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Is it too early to Fedex you a bottle of scotch for your efforts?

from heroku-buildpack-r.

mojodna avatar mojodna commented on May 28, 2024

Check your PKG_CONFIG_PATH. It's probably not finding the right Cairo lib.

On Sat, Jul 27, 2013 at 8:36 AM, Chris Stefano [email protected]
wrote:

Ok, I'm making some progress. I've been testing locally using vagrant and the heroku basebox.
I've managed to build pixman-0.29.4 and cairo-1.9.14 from source successfully, but when running configure on R-1.15.1 sources, it's saying that it's found cairo but that it doesn't work:

$ ./configure --prefix=$vendordir/R --with-libpng --with-cairo --enable-R-shlib
...
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes
checking whether cairo is >= 1.2 and works... no

Trying to figure out why this is happening.

Reply to this email directly or view it on GitHub:
#13 (comment)

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I am producing the same error in a vagrant box with the below build script.
Config.log is claiming that cairo-xlib.h is not found:

configure:31927: checking whether cairo is >= 1.2 and works

configure:31949: gcc -std=gnu99 -o conftest -g -O2 -fpic
-I/usr/local/include -I/app/vendor/include/pixman-1 -I/app/v$
conftest.c:215:24: error: cairo-xlib.h: No such file or directory
configure:31949: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "R"
...

Build:

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update
#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++
#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev gfortran

sudo mkdir -p /app
sudo chown -R vagrant /app
INSTALL_LOCATION=/app/vendor
mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/vulcan

cd $INSTALL_LOCATION/include
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

I am going to screw around with pkg config path, but if anyone knows the
right flag for this, it would be appreciated; I am not well versed in
building software.

On Sat, Jul 27, 2013 at 12:07 PM, Seth Fitzsimmons <[email protected]

wrote:

Check your PKG_CONFIG_PATH. It's probably not finding the right Cairo
lib.

On Sat, Jul 27, 2013 at 8:36 AM, Chris Stefano [email protected]
wrote:

Ok, I'm making some progress. I've been testing locally using vagrant
and the heroku basebox.
I've managed to build pixman-0.29.4 and cairo-1.9.14 from source
successfully, but when running configure on R-1.15.1 sources, it's saying
that it's found cairo but that it doesn't work:

$ ./configure --prefix=$vendordir/R --with-libpng --with-cairo
--enable-R-shlib
...
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes
checking whether cairo is >= 1.2 and works... no

Trying to figure out why this is happening.

Reply to this email directly or view it on GitHub:

#13 (comment)


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21667814
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Cflags -i to he right directory fixes this, now debugging a version
objection.
On Jul 27, 2013 10:33 AM, "Ben Warren" [email protected] wrote:

I am producing the same error in a vagrant box with the below build
script. Config.log is claiming that cairo-xlib.h is not found:

configure:31927: checking whether cairo is >= 1.2 and works

configure:31949: gcc -std=gnu99 -o conftest -g -O2 -fpic
-I/usr/local/include -I/app/vendor/include/pixman-1 -I/app/v$
conftest.c:215:24: error: cairo-xlib.h: No such file or directory
configure:31949: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "R"
...

Build:

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update
#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++
#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev
gfortran

sudo mkdir -p /app
sudo chown -R vagrant /app
INSTALL_LOCATION=/app/vendor
mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/vulcan

cd $INSTALL_LOCATION/include
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

I am going to screw around with pkg config path, but if anyone knows the
right flag for this, it would be appreciated; I am not well versed in
building software.

On Sat, Jul 27, 2013 at 12:07 PM, Seth Fitzsimmons <
[email protected]> wrote:

Check your PKG_CONFIG_PATH. It's probably not finding the right Cairo
lib.

On Sat, Jul 27, 2013 at 8:36 AM, Chris Stefano [email protected]

wrote:

Ok, I'm making some progress. I've been testing locally using vagrant
and the heroku basebox.
I've managed to build pixman-0.29.4 and cairo-1.9.14 from source
successfully, but when running configure on R-1.15.1 sources, it's saying
that it's found cairo but that it doesn't work:

$ ./configure --prefix=$vendordir/R --with-libpng --with-cairo
--enable-R-shlib
...
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes
checking whether cairo is >= 1.2 and works... no

Trying to figure out why this is happening.

Reply to this email directly or view it on GitHub:

#13 (comment)


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21667814
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Good luck! I'm getting defeated just installing rails to get the vagrant bundle to work. I don't know much Ruby.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

If you are on Linux, I think it is just sudo apt-get install vagrant. If
you are not on Linux, I strongly recommend it for this sort of work.

On Jul 27, 2013 1:37 PM, "Simon Hill" [email protected] wrote:

Good luck! I'm getting defeated just installing rails to get the vagrant
bundle to work. I don't know much Ruby.


Reply to this email directly or view it on GitHub.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

How about Mac OS X?

Sent from my phone.

On Jul 27, 2013, at 2:03 PM, bwarren2 [email protected] wrote:

If you are on Linux, I think it is just sudo apt-get install vagrant. If
you are not on Linux, I strongly recommend it for this sort of work.

On Jul 27, 2013 1:37 PM, "Simon Hill" [email protected] wrote:

Good luck! I'm getting defeated just installing rails to get the vagrant
bundle to work. I don't know much Ruby.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I am not familiar with getting vagrant up on a mac, but you can try
http://docs-v1.vagrantup.com/v1/docs/getting-started/.

On Sat, Jul 27, 2013 at 5:41 PM, Simon Hill [email protected]:

How about Mac OS X?

Sent from my phone.

On Jul 27, 2013, at 2:03 PM, bwarren2 [email protected] wrote:

If you are on Linux, I think it is just sudo apt-get install vagrant. If
you are not on Linux, I strongly recommend it for this sort of work.

On Jul 27, 2013 1:37 PM, "Simon Hill" [email protected] wrote:

Good luck! I'm getting defeated just installing rails to get the
vagrant
bundle to work. I don't know much Ruby.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21673017
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I think I did it. I will test a bit more tomorrow to be sure, but I just
made a simple png in the vagrant box off my built code.

On Sat, Jul 27, 2013 at 6:44 PM, Ben Warren [email protected] wrote:

I am not familiar with getting vagrant up on a mac, but you can try
http://docs-v1.vagrantup.com/v1/docs/getting-started/.

On Sat, Jul 27, 2013 at 5:41 PM, Simon Hill [email protected]:

How about Mac OS X?

Sent from my phone.

On Jul 27, 2013, at 2:03 PM, bwarren2 [email protected] wrote:

If you are on Linux, I think it is just sudo apt-get install vagrant.
If
you are not on Linux, I strongly recommend it for this sort of work.

On Jul 27, 2013 1:37 PM, "Simon Hill" [email protected]
wrote:

Good luck! I'm getting defeated just installing rails to get the
vagrant
bundle to work. I don't know much Ruby.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21673017
.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

I got it working by cheating and installing libcairo2-dev (sudo apt-get install libcairo2-dev). Now to figure out the difference between the source build and the packaged one.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Fantastic! If anyone wants to share an R buildpack with PNG support for me to test in my multipack environment, I'll jump right on it.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Unfortunately I still need to have built from source version to create the build pack, since cairo and dependencies need to be in the /app/vendor directory for it to work.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I am uploading a tarball called r-test-build.tar.gz to the rcairo bucket on
AWS. SImon: if you could fork the r buildpack, change the binary and
bucket names in bin compile, and test with that, that would be super.

On Sun, Jul 28, 2013 at 9:46 AM, Simon Hill [email protected]:

Fantastic! If anyone wants to share an R buildpack with PNG support for me
to test in my multipack environment, I'll jump right on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21683759
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Note: this does not have pango for ideal font support, but we can test that
later. FYI in case you see unexpected font behaviors. Also, for those
that need a dumb fix while we are testing this: try calling bitmap()
instead of png(). It is uglier, but works in the base buildpack.

On Sun, Jul 28, 2013 at 1:03 PM, Ben Warren [email protected] wrote:

I am uploading a tarball called r-test-build.tar.gz to the rcairo bucket
on AWS. SImon: if you could fork the r buildpack, change the binary and
bucket names in bin compile, and test with that, that would be super.

On Sun, Jul 28, 2013 at 9:46 AM, Simon Hill [email protected]:

Fantastic! If anyone wants to share an R buildpack with PNG support for
me to test in my multipack environment, I'll jump right on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21683759
.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

@bwarren2 can you share the script you used?

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Sure. It'll be 20 min; I am getting breakfast.
On Jul 28, 2013 10:05 AM, "Chris Stefano" [email protected] wrote:

@bwarren2 https://github.com/bwarren2 can you share the script you used?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21686750
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I used vagrant with a base box at
http://dl.dropbox.com/u/1906634/heroku.boxand this bash:

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update
#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++
#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev gfortran
sudo apt-get install -y x11-common libx11-6 libx11-dev
sudo mkdir -p /app
sudo chown -R vagrant /app
INSTALL_LOCATION=/app/vendor
mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/vulcan

cd $INSTALL_LOCATION/include
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

cd $INSTALL_LOCATION/include
curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CPPFLAGS="-I/app/vendor/cairo/include/cairo"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Sun, Jul 28, 2013 at 1:04 PM, Ben Warren [email protected] wrote:

Note: this does not have pango for ideal font support, but we can test
that later. FYI in case you see unexpected font behaviors. Also, for
those that need a dumb fix while we are testing this: try calling bitmap()
instead of png(). It is uglier, but works in the base buildpack.

On Sun, Jul 28, 2013 at 1:03 PM, Ben Warren [email protected] wrote:

I am uploading a tarball called r-test-build.tar.gz to the rcairo bucket
on AWS. SImon: if you could fork the r buildpack, change the binary and
bucket names in bin compile, and test with that, that would be super.

On Sun, Jul 28, 2013 at 9:46 AM, Simon Hill [email protected]:

Fantastic! If anyone wants to share an R buildpack with PNG support for
me to test in my multipack environment, I'll jump right on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21683759
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

No dice: libgfortran needs to live in there as well. I will address that
bit later; it should be easy.

On Sun, Jul 28, 2013 at 1:17 PM, Ben Warren [email protected] wrote:

I used vagrant with a base box at
http://dl.dropbox.com/u/1906634/heroku.box and this bash:

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update
#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++
#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev
gfortran
sudo apt-get install -y x11-common libx11-6 libx11-dev

sudo mkdir -p /app
sudo chown -R vagrant /app
INSTALL_LOCATION=/app/vendor
mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/vulcan

cd $INSTALL_LOCATION/include
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/include
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

cd $INSTALL_LOCATION/include

curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CPPFLAGS="-I/app/vendor/cairo/include/cairo"

./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Sun, Jul 28, 2013 at 1:04 PM, Ben Warren [email protected] wrote:

Note: this does not have pango for ideal font support, but we can test
that later. FYI in case you see unexpected font behaviors. Also, for
those that need a dumb fix while we are testing this: try calling bitmap()
instead of png(). It is uglier, but works in the base buildpack.

On Sun, Jul 28, 2013 at 1:03 PM, Ben Warren [email protected] wrote:

I am uploading a tarball called r-test-build.tar.gz to the rcairo bucket
on AWS. SImon: if you could fork the r buildpack, change the binary and
bucket names in bin compile, and test with that, that would be super.

On Sun, Jul 28, 2013 at 9:46 AM, Simon Hill [email protected]:

Fantastic! If anyone wants to share an R buildpack with PNG support for
me to test in my multipack environment, I'll jump right on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21683759
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

I'm going out for a few hours - if anyone wants me to fork the buildpack and change the S3 paths in the compile file I can do that. Incidentally, I didn't find that bitmap() worked. I'm using ggplot2 and wordcloud - not sure if they require PNG. I need to find a better way to debug my R scripts - they fail silently behind a node API wrapper of Rserve.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Weird. I use lattice and bitmap is fine; must be ggplot. I am using rpy
and have the same debugging issues; I have to test everything in studio
first.
On Jul 28, 2013 11:58 AM, "Simon Hill" [email protected] wrote:

I'm going out for a few hours - if anyone wants me to fork the buildpack
and change the S3 paths in the compile file I can do that. Incidentally, I
didn't find that bitmap() worked. I'm using ggplot2 and wordcloud - not
sure if they require PNG. I need to find a better way to debug my R scripts

  • they fail silently behind a node API wrapper of Rserve.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21688734
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

@virtualstaticvoid when you install

~ $ sudo apt-get install libcairo2-dev

what are you logged into? I thought I would try to see if I can get my code running with the cheat. But when I try that one the remote Heroku vulcan host, it doesn't recognize sudo. Without sudo

W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.

Should I assume that is on your vagrant box? I have been procrastinating setting up vulcan because I didn't really understand what I was doing yet.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

No superuser (and thus apt-get) calls allowed on heroku.
On Jul 28, 2013 5:17 PM, "Simon Hill" [email protected] wrote:

@virtualstaticvoid https://github.com/virtualstaticvoid when you
install

~ $ sudo apt-get install libcairo2-dev

what are you logged into? I thought I would try to see if I can get my
code running with the cheat. But when I try that one the remote Heroku
vulcan host, it doesn't recognize sudo. Without sudo

W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.

Should I assume that is on your vagrant box? I have been procrastinating
setting up vulcan because I didn't really understand what I was doing yet.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21694267
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Another +1 for vagrant.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

@metalaureate Yes using vagrant. I find it much easier to use this initially, primarily because bandwidth is an issue here in South Africa, but also it makes debugging easier.

I found what appears to be the differences between the source and package builds, so I'll carry on today in trying to get a source build done. After that I'll move over to using vulcan for the final build and packaging of the buildpack.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I made a tarball that works in my heroku application for producing a
lattice chart. The tarball lives at
rcairo.s3.amazonaws.com/r-build-level.tar.gz. The build script is below.
All my additions add about 30 MB to the tarball.

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update

#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++ xz-utils

#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev

#More dependencies for the cairo build.
sudo apt-get install -y x11-common libx11-6 libx11-dev

sudo mkdir -p /app
sudo chown -R vagrant /app

INSTALL_LOCATION=/app/vendor

mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/tarballs

cd $INSTALL_LOCATION/tarballs
curl http://gfortran.com/download/x86_64/snapshots/gcc-4.3.tar.xz -o
gcc-4.3.tar.xz
curl
http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/glibc_2.7.orig.tar.gz -o
glibc_2.7.tar.gz

unpack dependancies (into vendor)

cd /app/vendor
tar xJf /app/vendor/tarballs/gcc-4.3.tar.xz

patch gcc features.h file

See http://permalink.gmane.org/gmane.comp.gcc.help/40166

#Ben comment below
#cp /app/features.h
/app/gcc-4.3/lib/gcc/x86_64-unknown-linux-gnu/4.3.6/include-fixed/features.h
tar xzf /app/vendor/tarballs/glibc_2.7.tar.gz && tar xjf
$INSTALL_LOCATION/glibc-2.7/glibc-2.7.tar.bz2

cd $INSTALL_LOCATION/tarballs
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o
fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

cd $INSTALL_LOCATION/tarballs
curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export PATH=$INSTALL_LOCATION/gcc-4.3/bin:$PATH
export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib
-L$INSTALL_LOCATION/gcc-4.3/lib64/"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CPPFLAGS="-I/app/vendor/cairo/include/cairo
-I$INSTALL_LOCATION/glibc-2.7/string/ -I$INSTALL_LOCATION/glibc-2.7/time"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Mon, Jul 29, 2013 at 1:09 AM, Chris Stefano [email protected]:

@metalaureate https://github.com/metalaureate Yes using vagrant. I find
it much easier to use this initially, primarily because bandwidth is an
issue here in South Africa, but also it makes debugging easier.

I found what appears to be the differences between the source and package
builds, so I'll carry on today in trying to get a source build done. After
that I'll move over to using vulcan for the final build and packaging of
the buildpack.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21699720
.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Note: the above lacks pango.

On Mon, Jul 29, 2013 at 6:22 AM, Ben Warren [email protected] wrote:

I made a tarball that works in my heroku application for producing a
lattice chart. The tarball lives at
rcairo.s3.amazonaws.com/r-build-level.tar.gz. The build script is below.
All my additions add about 30 MB to the tarball.

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update

#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++ xz-utils

#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev

#More dependencies for the cairo build.
sudo apt-get install -y x11-common libx11-6 libx11-dev

sudo mkdir -p /app
sudo chown -R vagrant /app

INSTALL_LOCATION=/app/vendor

mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/tarballs

cd $INSTALL_LOCATION/tarballs
curl http://gfortran.com/download/x86_64/snapshots/gcc-4.3.tar.xz -o
gcc-4.3.tar.xz
curl
http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/glibc_2.7.orig.tar.gz-o glibc_2.7.tar.gz

unpack dependancies (into vendor)

cd /app/vendor
tar xJf /app/vendor/tarballs/gcc-4.3.tar.xz

patch gcc features.h file

See http://permalink.gmane.org/gmane.comp.gcc.help/40166

#Ben comment below
#cp /app/features.h
/app/gcc-4.3/lib/gcc/x86_64-unknown-linux-gnu/4.3.6/include-fixed/features.h
tar xzf /app/vendor/tarballs/glibc_2.7.tar.gz && tar xjf
$INSTALL_LOCATION/glibc-2.7/glibc-2.7.tar.bz2

cd $INSTALL_LOCATION/tarballs
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

cd $INSTALL_LOCATION/tarballs
curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export PATH=$INSTALL_LOCATION/gcc-4.3/bin:$PATH
export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib
-L$INSTALL_LOCATION/gcc-4.3/lib64/"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CPPFLAGS="-I/app/vendor/cairo/include/cairo
-I$INSTALL_LOCATION/glibc-2.7/string/ -I$INSTALL_LOCATION/glibc-2.7/time"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Mon, Jul 29, 2013 at 1:09 AM, Chris Stefano [email protected]:

@metalaureate https://github.com/metalaureate Yes using vagrant. I
find it much easier to use this initially, primarily because bandwidth is
an issue here in South Africa, but also it makes debugging easier.

I found what appears to be the differences between the source and package
builds, so I'll carry on today in trying to get a source build done. After
that I'll move over to using vulcan for the final build and packaging of
the buildpack.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21699720
.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Ok, I haven't tried this on vulcan yet, but it's working on my vagrant box finally!
I created this gist of the build script I used.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Awesome! You guys rock.

Sent from my phone.

On Jul 29, 2013, at 6:31 AM, Chris Stefano [email protected] wrote:

Ok, I haven't tried this on vulcan yet, but it's working on my vagrant box finally!
I created this gist of the build script I used.


Reply to this email directly or view it on GitHub.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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:

Note: the above lacks pango.

On Mon, Jul 29, 2013 at 6:22 AM, Ben Warren [email protected] wrote:

I made a tarball that works in my heroku application for producing a
lattice chart. The tarball lives at
rcairo.s3.amazonaws.com/r-build-level.tar.gz. The build script is below.
All my additions add about 30 MB to the tarball.

#!/usr/bin/env bash

#Get apt looking in the right places
sudo apt-get update

#Give the box the tools it needs to manage software
sudo apt-get install -y curl make pkg-config g++ xz-utils

#Install the dependencies for the packages below
sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev

#More dependencies for the cairo build.
sudo apt-get install -y x11-common libx11-6 libx11-dev

sudo mkdir -p /app
sudo chown -R vagrant /app

INSTALL_LOCATION=/app/vendor

mkdir -p $INSTALL_LOCATION/lib
mkdir -p $INSTALL_LOCATION/include
mkdir -p $INSTALL_LOCATION/compiled
mkdir -p $INSTALL_LOCATION/tarballs

cd $INSTALL_LOCATION/tarballs
curl http://gfortran.com/download/x86_64/snapshots/gcc-4.3.tar.xz -o
gcc-4.3.tar.xz
curl
http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/glibc_2.7.orig.tar.gz-o glibc_2.7.tar.gz

unpack dependancies (into vendor)

cd /app/vendor
tar xJf /app/vendor/tarballs/gcc-4.3.tar.xz

patch gcc features.h file

See http://permalink.gmane.org/gmane.comp.gcc.help/40166

#Ben comment below
#cp /app/features.h
/app/gcc-4.3/lib/gcc/x86_64-unknown-linux-gnu/4.3.6/include-fixed/features.h
tar xzf /app/vendor/tarballs/glibc_2.7.tar.gz && tar xjf
$INSTALL_LOCATION/glibc-2.7/glibc-2.7.tar.bz2

cd $INSTALL_LOCATION/tarballs
curl
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz
tar -zxf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/fontconfig
cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h
fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o
pixman-0.26.0.tar.gz
tar -zxf pixman-0.26.0.tar.gz
cd pixman-0.26.0/
./configure --prefix $INSTALL_LOCATION
make
mkdir -p $INSTALL_LOCATION/include/pixman-1
cp -v pixman/pixman.h pixman/pixman-version.h
$INSTALL_LOCATION/include/pixman-1/
make install
make clean
cd -

cd $INSTALL_LOCATION/tarballs
curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o
cairo-1.10.0.tar.gz
tar -zxf cairo-1.10.0.tar.gz
cd cairo-1.10.0/

Tell Cairo where fontconfig and pixman are

export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it.

export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig
export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig
-I${INSTALL_LOCATION}/include"
export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1"
export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1
-I${INSTALL_LOCATION}/include"
export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig"
./configure --prefix $INSTALL_LOCATION/cairo
make
make install
make clean
cd -

echo "******************************************"

cd $INSTALL_LOCATION/tarballs
curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o
R-2.15.1.tar.gz
tar -zxf R-2.15.1.tar.gz
cd R-2.15.1/

Tell R where Cairo is

export PATH=$INSTALL_LOCATION/gcc-4.3/bin:$PATH
export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include
-I${INSTALL_LOCATION}/cairo/include"
export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib
-L$INSTALL_LOCATION/gcc-4.3/lib64/"
export
PKG_CONFIG_PATH="${INSTALL_LOCATION}/lib/pkgconfig:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CPPFLAGS="-I/app/vendor/cairo/include/cairo
-I$INSTALL_LOCATION/glibc-2.7/string/ -I$INSTALL_LOCATION/glibc-2.7/time"
./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x
--with-cairo --with-libpng
make
make docs
make install
cd -

On Mon, Jul 29, 2013 at 1:09 AM, Chris Stefano [email protected]:

@metalaureate https://github.com/metalaureate Yes using vagrant. I
find it much easier to use this initially, primarily because bandwidth is
an issue here in South Africa, but also it makes debugging easier.

I found what appears to be the differences between the source and package
builds, so I'll carry on today in trying to get a source build done. After
that I'll move over to using vulcan for the final build and packaging of
the buildpack.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21699720
.


Reply to this email directly or view it on GitHub.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

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

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Testing it now

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

In my tests, running capabilities() reports that PNG and CAIRO are supported now, however failed to run png() with an error message to do with X11.

I think it may still need pango to work properly so I'll carry on to get this included too. Also, pango needs updated versions of pixman-0.3.0 and cairo-1.12.14 so I'll update the build accordingly.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Mine worked without pan go, I believe. Are you calling PNG(type='cairo')
or cairopng or something else?
On Jul 29, 2013 9:05 AM, "Chris Stefano" [email protected] wrote:

In my tests, running capabilities() reports that PNG and CAIRO are
supported now, however failed to run png() with an error message to do
with X11.

I think it may still need pango to work properly so I'll carry on to get
this included too. Also, pango needs updated versions of pixman-0.3.0 and
cairo-1.12.14 so I'll update the build accordingly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21730008
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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,

  • installing source package 'RJSONIO' ...
    ** package 'RJSONIO' successfully unpacked and MD5 sums checked
    * libs
    In file included from libjson/Source/JSONAllocator.h:4,
    from JSONAllocator.cpp:1:
    libjson/Source/../JSONOptions.h:120:1: warning: "JSON_STREAM" redefined
    : warning: this is the location of the previous definition
    libjson/Source/../JSONOptions.h:256:1: warning: "JSON_VALIDATE" redefined
    : warning: this is the location of the previous definition
    In file included from libjson/Source/JSONMemory.h:6,
    from libjson/Source/JSONChildren.h:6,
    from JSONChildren.cpp:1:
    libjson/Source/../JSONOptions.h:120:1: warning: "JSON_STREAM" redefined
    : warning: this is the location of the previous definition
    libjson/Source/../JSONOptions.h:256:1: warning: "JSON_VALIDATE" redefined
    : warning: this is the location of the previous definition
    In file included from /usr/include/stdio.h:907,
    from /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/cstdio:50,
    from /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/bits/char_traits.h:48,
    from /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/string:47,
    from libjson/Source/JSONDefs/Strings_Defs.h:25,
    from libjson/Source/JSONDefs.h:14,
    from libjson/Source/JSONDebug.h:4,
    from libjson/Source/JSONMemory.h:7,
    from libjson/Source/JSONChildren.h:6,
    from JSONChildren.cpp:1:
    /usr/include/bits/stdio.h: In function '__ssize_t getline(char
    , size_t, FILE_)':
    /usr/include/bits/stdio.h:118: error: '__getdelim' was not declared in this scope
    make: *_* [JSONChildren.o] Error 1
    ERROR: compilation failed for package 'RJSONIO'
  • removing '/app/vendor/R/lib64/R/library/RJSONIO'

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

I did not patch GCC headers, I think; I do not recall why I skipped that.
If you are using my tar ball, that is probably the reason. Same question:
are you calling PNG() or PNG(type='cairo')?
On Jul 29, 2013 9:26 AM, "Simon Hill" [email protected] wrote:

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,

  • installing source package 'RJSONIO' ... ** package 'RJSONIO'
    successfully unpacked and MD5 sums checked * libs In file included from
    libjson/Source/JSONAllocator.h:4, from JSONAllocator.cpp:1:
    libjson/Source/../JSONOptions.h:120:1: warning: "JSON_STREAM" redefined :
    warning: this is the location of the previous definition
    libjson/Source/../JSONOptions.h:256:1: warning: "JSON_VALIDATE" redefined :
    warning: this is the location of the previous definition In file included
    from libjson/Source/JSONMemory.h:6, from libjson/Source/JSONChildren.h:6,
    from JSONChildren.cpp:1: libjson/Source/../JSONOptions.h:120:1: warning:
    "JSON_STREAM" redefined : warning: this is the location of the previous
    definition libjson/Source/../JSONOptions.h:256:1: warning: "JSON_VALIDATE"
    redefined : warning: this is the location of the previous definition In
    file included from /usr/include/stdio.h:907, from
    /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/cstdio:50,
    from
    /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/bits/char_traits.h:48,
    from
    /app/vendor/gcc-4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.6/../../../../include/c++/4.3.6/string:47,
    from libjson/Source/JSONDefs/Strings_Defs.h:25, from
    libjson/Source/JSONDefs.h:14, from libjson/Source/JSONDebug.h:4, from
    libjson/Source/JSONMemory.h:7, from libjson/Source/JSONChildren.h:6, from
    JSONChildren.cpp:1: /usr/include/bits/stdio.h: In function '__ssize_t
    getline(char
    , size_t, FILE_)': /usr/include/bits/stdio.h:118: error:
    '__getdelim' was not declared in this scope make: *_* [JSONChildren.o]
    Error 1 ERROR: compilation failed for package 'RJSONIO'
  • removing '/app/vendor/R/lib64/R/library/RJSONIO'


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21731462
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Apologies - that was to @virtualstaticvoid

What's weird is that install.packages("RJSONIO"); works in a R console on heroku, but errors out when init.r runs (error posted above)

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

@virtualstaticvoid @bwarren2

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.

png(filename='public/img/test_r_graphics.png',type="cairo-png");plot(r);dev.off();

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

More libraries that now fail which did not used to - wordcloud

trying URL 'http://cran.fhcrc.org/src/contrib/wordcloud_2.4.tar.gz'
Content type 'application/x-gzip' length 40496 bytes (39 Kb)
opened URL
downloaded 39 Kb

  • installing source package 'Rcpp' ...
    ** package 'Rcpp' successfully unpacked and MD5 sums checked
    * libs
    In file included from /usr/include/stdio.h:907,
    from /app/vendor/R/lib64/R/include/R.h:29,
    from ../inst/include/RcppCommon.h:35,
    from ../inst/include/Rcpp/Datetime.h:25,
    from Date.cpp:29:
    /usr/include/bits/stdio.h: In function '__ssize_t getline(char
    , size_t, FILE_)':
    /usr/include/bits/stdio.h:118: error: '__getdelim' was not declared in this scope
    make: *_* [Date.o] Error 1
    ERROR: compilation failed for package 'Rcpp'
  • removing '/app/vendor/R/lib64/R/library/Rcpp'
    ERROR: dependency 'Rcpp' is not available for package 'wordcloud'
  • removing '/app/vendor/R/lib64/R/library/wordcloud'

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

You should be able to pull down a file with a curl from the address hosting
your heroku instance. As for library failures, this is all using the new
branch? What are the wordcloud dependencies?
On Jul 29, 2013 10:01 AM, "Simon Hill" [email protected] wrote:

More libraries that now fail which did not used to - wordcloud

trying URL 'http://cran.fhcrc.org/src/contrib/wordcloud_2.4.tar.gz'
Content type 'application/x-gzip' length 40496 bytes (39 Kb)
opened URL

downloaded 39 Kb

  • installing source package 'Rcpp' ... ** package 'Rcpp'
    successfully unpacked and MD5 sums checked * libs In file included from
    /usr/include/stdio.h:907, from /app/vendor/R/lib64/R/include/R.h:29, from
    ../inst/include/RcppCommon.h:35, from ../inst/include/Rcpp/Datetime.h:25,
    from Date.cpp:29: /usr/include/bits/stdio.h: In function '__ssize_t
    getline(char
    , size_t, FILE_)': /usr/include/bits/stdio.h:118: error:
    '__getdelim' was not declared in this scope make: *_* [Date.o] Error 1
    ERROR: compilation failed for package 'Rcpp'
  • removing '/app/vendor/R/lib64/R/library/Rcpp' ERROR: dependency
    'Rcpp' is not available for package 'wordcloud'
  • removing '/app/vendor/R/lib64/R/library/wordcloud'


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21734244
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

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'
Content type 'application/x-gzip' length 2397813 bytes (2.3 Mb)

opened URL

downloaded 2.3 Mb

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/wordcloud_2.4.tar.gz'
Content type 'application/x-gzip' length 40496 bytes (39 Kb)

opened URL

downloaded 39 Kb

  • installing source package 'Rcpp' ...
    ** package 'Rcpp' successfully unpacked and MD5 sums checked
    ** libs
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c Date.cpp -o Date.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c Module.cpp -o Module.o
    gcc -std=gnu99 -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c Rcpp_init.c -o Rcpp_init.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c Timer.cpp -o Timer.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c api.cpp -o api.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c attributes.cpp -o attributes.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c barrier.cpp -o barrier.o
    g++ -I/app/vendor/R/lib64/R/include -DNDEBUG -I../inst/include/ -I/app/vendor/glibc-2.7/string/ -I/app/vendor/glibc-2.7/time -fpic -g -O2 -c exceptions.cpp -o exceptions.o
    g++ -shared -L/app/vendor/gcc-4.3/lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -L/app/vendor/R/lib64/R/lib -lR
    g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared -L/app/vendor/R/lib64/R/lib -lR
    ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
    cp libRcpp.so ../inst/lib
    cp libRcpp.a ../inst/lib
    rm libRcpp.so libRcpp.a
    installing to /app/vendor/R/lib64/R/library/Rcpp/libs
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    'Rcpp-FAQ.Rnw'
    'Rcpp-attributes.Rnw'
    'Rcpp-extending.Rnw'
    'Rcpp-introduction.Rnw'
    'Rcpp-modules.Rnw'
    'Rcpp-package.Rnw'
    'Rcpp-quickref.Rnw'
    'Rcpp-sugar.Rnw'
    'Rcpp-unitTests.Rnw'
    ** testing if installed package can be loaded
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
    unable to load shared object '/app/vendor/R/lib64/R/library/Rcpp/libs/Rcpp.so':
    /app/vendor/R/lib64/R/library/Rcpp/libs/Rcpp.so: undefined symbol: _ZNKSt5ctypeIcE13_M_widen_initEv
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing '/app/vendor/R/lib64/R/library/Rcpp'
    ERROR: dependency 'Rcpp' is not available for package 'wordcloud'
  • removing '/app/vendor/R/lib64/R/library/wordcloud'

The downloaded source packages are in
'/tmp/RtmpjMn6EE/downloaded_packages'
Updating HTML index of packages in '.Library'
Making packages.html ... done
Warning messages:
1: In install.packages("wordcloud") :
installation of package 'Rcpp' had non-zero exit status
2: In install.packages("wordcloud") :
installation of package 'wordcloud' had non-zero exit status

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

@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.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Yep, definitely worked with the old R buildpack:

trying URL 'http://cran.fhcrc.org/src/contrib/wordcloud_2.4.tar.gz'
Content type 'application/x-gzip' length 40496 bytes (39 Kb)

opened URL

downloaded 39 Kb

  • installing source package 'Rcpp' ...
    ** package 'Rcpp' successfully unpacked and MD5 sums checked
    ** libs
    installing to /app/vendor/R/lib64/R/library/Rcpp/libs
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
  • DONE (Rcpp)
  • installing source package 'wordcloud' ...
    ** package 'wordcloud' successfully unpacked and MD5 sums checked
    ** libs
    installing to /app/vendor/R/lib64/R/library/wordcloud/libs
    ** R
    ** data
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
  • DONE (wordcloud)

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

@bwarren2 Yes png(type="cairo-png", ...); works.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Looking into @metalaureate compile problem with RJSONIO

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Thank you - sorry this is such a toilsome project. I'm so grateful to the both of you for working on this.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

Ok, it seems that the "clean up" to make the build-pack smaller deleted more than it should have.
I've uploaded the corrected binary to S3, so you can give it a try again.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Awesome possum, @virtualstaticvoid. I am obviously just hacking my way
around with bad style; mind if I pick your brain to get better?

How did you identify the set of dependencies to install? I tried to
install Cairo, failed, identified something that was required, failed, and
did this until giving up and apt-getting libpng and others. By contrast,
you managed to figure out the finite list of things to build, and did not
require apt get. What is your secret?

What are shopt and pushd doing in your cleanup? I am unfamiliar with
them.

How is R detecting your installed things without flags? I do not
understand well how OSes manage these sorts of things.

Many thanks for your diligent efforts; they are much appreciated.
On Jul 29, 2013 12:30 PM, "Chris Stefano" [email protected] wrote:

Ok, it seems that the "clean up" to make the build-pack smaller deleted
more than it should have.
I've uploaded the corrected binary to S3, so you can give it a try again.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21744813
.

from heroku-buildpack-r.

metalaureate avatar metalaureate commented on May 28, 2024

Stupendous @virtualstaticvoid ! Wow wow wow wow. Thanks to all of you. Kick ass!

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on May 28, 2024

@bwarren2

Running configure and looking at the config.log file usually helps. Also, running pkg-config --list-all to get the list of known libraries and for each library, running pkg-config --libs <lib_name> shows the paths to the library binaries, pkg-config --cflags <lib_name> the compiler flags and pkg-config --exists <lib_name> --print-errors checks that the library exists (this is what configure does).

Also, by building with the dependencies via apt-get and then without and comparing the outputs provides clues to what is missing. Vagrant helps because you can start again with a clean VM each time. E.g. This was how I figured out that DirectFB was one of the missing dependencies when building cairo.

Also, piping command outputs to file, so you can compare them, makes it easy to see the differences.

As for shopt and pushd\popd checkout any decent guide to bash, such as Bash Guide for Beginners.

from heroku-buildpack-r.

bwarren2 avatar bwarren2 commented on May 28, 2024

Many thanks Chris; I feel bad pestering people over these sorts of tasks,
so I want to learn the methods as much as possible. You have been a life
saver.
On Jul 29, 2013 2:45 PM, "Chris Stefano" [email protected] wrote:

@bwarren2 https://github.com/bwarren2

Running configure and looking at the config.log file usually helps. Also,
running pkg-config --list-all to get the list of known libraries and for
each library, running pkg-config --libs <lib_name> shows the paths to the
library binaries, pkg-config --cflags <lib_name> the compiler flags and pkg-config
--exists <lib_name> --print-errors checks that the library exists (this
is what configure does).

Also, by building with the dependencies via apt-get and then without and
comparing the outputs provides clues to what is missing. Vagrant helps
because you can start again with a clean VM each time. E.g. This was how I
figured out that DirectFB was one of the missing dependencies when building
cairo.

Also, piping command outputs to file, so you can compare them, makes it
easy to see the differences.

As for shopt and pushd\popd checkout any decent guide to bash, such as Bash
Guide for Beginnershttp://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21754209
.

from heroku-buildpack-r.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.