[R-SIG-Mac] does biOps compile on OSX?

Simon Urbanek simon.urbanek at r-project.org
Fri Oct 15 00:02:52 CEST 2010


On Oct 14, 2010, at 5:09 PM, Carl Witthoft wrote:

> 
> There's no OSX binary package for biOps at the repository,  and the link to the checklog is broken.

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).


I would suggest contacting the maintainer for the issues to be addressed (CC'd - please, Matias, consider this as a bug report).

Cheers,
Simon




> Has anyone built biOps under 10.6.x or 10.5.x  ?
> 
> Actually, the only thing I want right now is the imgConvolve function, so if people have other recommendations for a 2-dimensional convolution function in R (other than writing it myself -- I"m lazy today :-) ), I'd be happy to know.
> 
> thanks
> Carl
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list