Yves Magliulo
2004-Dec-08 11:50 UTC
[R] install bug with specific JPEG library by exporting CPPFLAGS variable
Hi there, I think I have found a small problem in the "/my/path/R-2.0.1/src/modules/X11/MakeFile" generation. During the configure step, I have specified a specific JPEG library by exporting CPPFLAGS variable. All compilation works well for individual files in the src/modules/X11/ directory, but when linking, the -ljpeg option doesn't work. I obtain the following message (in french sorry): ------------------------------------------------------------------------------ make[4]: Entre dans le repertoire `/mnt/softs/R/R-2.0.1/src/modules/X11' gcc -shared -L/usr/local/lib -o R_X11.so dataentry.lo devX11.lo rotated.lo rbitmap.lo -lSM -lICE -L/usr/X11R6/lib -lX11 -ljpeg -lpng -lz -lreadline -ldl -lncurses -lm /usr/bin/ld: ne peut trouver -ljpeg collect2: ld a retourne 1 code d'?tat d'ex?cution make[4]: *** [R_X11.so] Erreur 1 make[4]: Quitte le repertoire `/mnt/softs/R/R-2.0.1/src/modules/X11' make[3]: *** [R] Erreur 2 make[3]: Quitte le repertoire `/mnt/softs/R/R-2.0.1/src/modules/X11' make[2]: *** [R] Erreur 1 make[2]: Quitte le repertoire `/mnt/softs/R/R-2.0.1/src/modules' make[1]: *** [R] Erreur 1 make[1]: Quitte le repertoire `/mnt/softs/R/R-2.0.1/src' make: *** [R] Erreur 1 ------------------------------------------------------------------------------ This means that the "-L/my/jpeg/library/path" option is not added for linking. I re-runned the linking command with my option : gcc -shared -L/usr/local/lib -o R_X11.so dataentry.lo devX11.lo rotated.lo rbitmap.lo -lSM -lICE -L/usr/X11R6/lib -lX11 -L/my/jpeg/library/path -ljpeg -lpng -lz -lreadline -ldl -lncurses -lm and the launched the "make" command again and it worked fine. Hope it helps.
Brian D Ripley
2004-Dec-08 13:10 UTC
[R] install bug with specific JPEG library by exporting CPPFLAGS variable
On 8 Dec 2004, Yves Magliulo wrote:> Hi there, > I think I have found a small problem in the > "/my/path/R-2.0.1/src/modules/X11/MakeFile" generation. > During the configure step, I have specified a specific JPEG library by > exporting CPPFLAGS variable.That only specifies a set of headers, not the library. It is up to you to ensure that the library paths you need are also specified, e.g. in LIBS. To be definite, this is not a bug/problem in R.> All compilation works well for individual files in the src/modules/X11/ > directory, but when linking, the -ljpeg option doesn't work. > I obtain the following message (in french sorry): > > ------------------------------------------------------------------------------ > make[4]: Entre dans le repertoire `/mnt/softs/R/R-2.0.1/src/modules/X11' > gcc -shared -L/usr/local/lib -o R_X11.so dataentry.lo devX11.lo > rotated.lo rbitmap.lo -lSM -lICE -L/usr/X11R6/lib -lX11 -ljpeg > -lpng -lz -lreadline -ldl -lncurses -lm > /usr/bin/ld: ne peut trouver -ljpeg > collect2: ld a retourne 1 code d'?tat d'ex?cution[...] -- 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