[R-SIG-Mac] biOps compilation

Carl Witthoft carl at witthoft.com
Tue Oct 26 01:07:31 CEST 2010


Just a point of comparison to the results others got for how biOps 
compiles under Snow Leopard:

Here are the warnings and notices I got when compiling, using the 
R-gui's Package Installer to compile from source:

checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory

checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
configure: WARNING: Can't find fftw3 header


I haven't exercised many of the functions in the package yet, but this 
seems to be a better result than Simon got.


Carl



---- S. Urbanek's results ----
The package has some issues with detecting TIFF and more over references 
it even though its detection fails -- the error log says:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object 
'/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.12/biOps.Rcheck/biOps/libs/i386/biOps.so':
 
dlopen(/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.12/biOps.Rcheck/biOps/libs/i386/biOps.so, 
6): Symbol not found: _TIFFClose
   Referenced from: 
/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.12/biOps.Rcheck/biOps/libs/i386/biOps.so
   Expected in: dynamic lookup

ERROR: loading failed

While the configuration fails to detect TIFF (because it's using the 
wrong flags) and yet it still does reference it in the code (but not at 
link time):

checking whether gcc -arch i386 -std=gnu99 accepts -g... yes
checking for gcc -arch i386 -std=gnu99 option to accept ISO C89... none 
needed
checking for TIFFOpen in -ltiff... no
[...]
checking tiff.h usability... yes
checking tiff.h presence... yes
checking for tiff.h... yes
[...]
gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/lib -o biO
ps.so arithmetics.o canny.o convolution.o crop.o edge_detection.o 
fft_filters.o fft_funcs.o filter.o gaussian.o interpolation.o isodata.o 
isodata_cluster.o jpegio
.o kdtree.o kmeans.o kmeans_enhanced.o kmeans_kdtree.o logics.o luts.o 
marr_hildreth.o minification.o mirroring.o morphology.o noise_gen.o 
rotate.o scale.o shenca
stan.o tiffio.o translation.o utils.o -lm -ljpeg -lfftw3 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation



There are apparently two bugs in biOps:
1) the TIFF detection uses wrong flags - it fails to add dependencies:

configure:2624: checking for TIFFOpen in -ltiff
configure:2659: gcc -arch x86_64 -std=gnu99 -o conftest -g -O2 
conftest.c -ltiff   >&5
Undefined symbols:
   "_jpeg_read_raw_data", referenced from:
       _jpeg_read_raw_data_encap in libtiff.a(tif_ojpeg.o)
       _TIFFjpeg_read_raw_data in libtiff.a(tif_jpeg.o)
   "_jpeg_write_scanlines", referenced from:
       _TIFFjpeg_write_scanlines in libtiff.a(tif_jpeg.o)
   "_jpeg_write_tables", referenced from:
       _TIFFjpeg_write_tables in libtiff.a(tif_jpeg.o)
   "_inflateSync", referenced from:
       _PixarLogDecode in libtiff.a(tif_pixarlog.o)
       _ZIPDecode in libtiff.a(tif_zip.o)
   [...]

so it's missing -ljpeg -lz
In fact it's checking jpeg and TIFF in the inverse order, so chances are 
if check for libz was added first, then jpeg and then tiff that it might 
work properly.

2) it is still referencing libTIFF in the package even though it did not 
link against libTIFF (I didn't dig deeper to see why - likely issue with 
setting a conditional or not respecting it).



More information about the R-SIG-Mac mailing list