[R] building biOps on macports, and configure--vars
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Nov 18 08:27:38 CET 2011
Please don't ask non-R programming questions on R-help.
This is best asked on R-sig-mac, including details of how you built
your R. But the short answer is not to mix macports with the CRAN
build of R. And there are matching libs for CRAN's build at
http://r.research.att.com/libs/
On Thu, 17 Nov 2011, Timothy Teravainen wrote:
>
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list