[R] install bug with specific JPEG library by exporting CPPFLAGS variable

Yves Magliulo ym at climpact.com
Wed Dec 8 12:50:10 CET 2004


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.




More information about the R-help mailing list