[R] building biOps on macports, and configure--vars

Timothy Teravainen teravainen at gmail.com
Thu Nov 17 21:45:28 CET 2011


All,

the MacOSX binary build of the biOps package is broken on cran, so I am trying to compile from source. I am very close; the trick is apparently that this package depends on fftw3, libjpeg and libtiff. My fftw3 is in /usr/local/, but my libjpeg and libtiff are in /opt/local/ since i got them through macports. In general, I'd like to keep as many of my third-party libraries as I can in the macports system, which means that I need to point R CMD INSTALL to /opt/local. Here is the problem I am running into:

This is my current command-line:
sudo R CMD INSTALL --configure-vars='LIBS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include/' --configure-args='--includedir=/opt/local/include --libdir=/opt/local/include' biOps_0.2.1.1.tar.gz

I found that by using the configure--vars argument i can get the 'configure' script to finish (without the configure--vars argument, the 'configure' script of course fails to find libjpeg and libtiff, and exits).

However, after 'configure' runs, when the installer actually tries to build the biOps package, it fails as follows:

gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include    -fPIC  -g -O2 -c jpegio.c -o jpegio.o
jpegio.c:36:21: error: jpeglib.h: No such file or directory
pegio.c: In function ‘read_jpg_img_info’:
jpegio.c:52: error: storage size of ‘cinfo’ isn’t known
jpegio.c:53: error: storage size of ‘jerr’ isn’t known
[[... about 30 lines of this follow...]]
make: *** [jpegio.o] Error 1
ERROR: compilation failed for package ‘biOps’

The problem is, obviously, that the gcc call is missing "-I/opt/local/include", even though I put that in both --configure-vars and --configure-args! I also note, that the '--configure-args' seems to have no effect at all. It's '--configure-vars' that allows the 'configure' script to finish successfully.

I've searched and read various docs, but I don't know what else I can do at this point (i'd like to avoid copying my libraries into /usr/local if at all possible, and it does seem that the point of the configure--foo arguments is to let me do that). Am I missing a necessary argument? Is it a bug in the biOps package? Is there any solution/workaround that doesn't involve copying stuff into /usr/local? Thanks for any help.


Yours,

Timothy Teravainen



More information about the R-help mailing list