Skip to content

[Bioc-devel] BioC 2.2 (Devel): Rdisop build on leopard [was: xcms package update for Mac OS X 10.5.1 (Re: netCDF on pelham)

4 messages · Neumann, Steffen, Kasper Daniel Hansen, James W. MacDonald

#
On Do, 2008-01-24 at 12:13 -0800, Patrick Aboyoun wrote:
Many thanks!
Until yesterday they were not even passing the build stage,
so once we're sober from celebrating successful builds,
we'll go after the check/warnings ;-)
We're maintainers of xcms, just waiting won't help ;-)

Thanks for your efforts,
I might approach you later for some help with Rdisop.
Rdisop is shipping a library in Rdisop/src/imslib
which is successfully built using libtool: 

	g++ -dynamiclib -single_module  -o src/.libs/libims.0.0.0.dylib  src/ims/.libs/element.o ... src/ims/.libs/nitrogenrulefilter.o   -install_name  /usr/local/lib/libims.0.dylib -Wl,-compatibility_version -Wl,1 -Wl,-current_version -Wl,1.0
	(cd src/.libs && rm -f libims.0.dylib && ln -s libims.0.0.0.dylib libims.0.dylib)
	(cd src/.libs && rm -f libims.dylib && ln -s libims.0.0.0.dylib libims.dylib)

Then it is successfully building Rdisop.so using the 
newly built -L./imslib/src/.libs/ -lims:

	g++-4.0 -arch i386 -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o Rdisop.so disop.o -L../RcppSrc -lRcpp -L./imslib/src/.libs/ -lims   -F/Library/Frameworks/R.framework/.. -framework R -lintl -liconv -lc -Wl,-framework -Wl,CoreFoundation

and copied to the Rdisop/src/ directory:

	ls -l ./imslib/src/.libs/
	total 6448
	-rwxr-xr-x  1 biocbuild  staff   318092 Jan 31 03:27 libims.0.0.0.dylib
	lrwxr-xr-x  1 biocbuild  staff       18 Jan 31 03:27 libims.0.dylib -> libims.0.0.0.dylib
	-rw-r--r--  1 biocbuild  staff  2963884 Jan 31 03:27 libims.a
	lrwxr-xr-x  1 biocbuild  staff       18 Jan 31 03:27 libims.dylib -> libims.0.0.0.dylib
	lrwxr-xr-x  1 biocbuild  staff       12 Jan 31 03:27 libims.la -> ../libims.la
	-rw-r--r--  1 biocbuild  staff      813 Jan 31 03:27 libims.lai
	cp -rv ./imslib/src/.libs/libims*.dylib* .
	./imslib/src/.libs/libims.dylib -> ./libims.dylib
	./imslib/src/.libs/libims.0.dylib -> ./libims.0.dylib
	./imslib/src/.libs/libims.0.0.0.dylib -> ./libims.0.0.0.dylib

It is, however, _not_ copied into the installed package as on linux:
or not found under the name "libims":

	* creating vignettes ... ERROR
	Error in library.dynam(lib, package, package.lib) : 
	  shared library 'libims' not found

I suspect that either the libims*dylib* are not copied 
into the package, or that library.dynam() resolving has a problem.

On Windows I needed to copy the DLLs explicitely in configure.win:
	mkdir ${DPKG}/libs
	cp src/win/libims*.dll ${DPKG}/libs/
do I have to do that on leopard as well ?

Since I don't have leopard access, I'd appreciate any hints.

Yours,
Steffen
#
On Feb 1, 2008, at 4:42 AM, sneumann wrote:

            
On the Mac you need to be able to build universal binaries (ie. you  
need to compile for several architectures). The suffix for a library  
can both be .a and .dylib. What you seem to be doing above is  
probably extremely non-portable.

Kasper
#
On Fri, 2008-02-01 at 07:47 -0800, Kasper Daniel Hansen wrote:
...
I am open for anz suggestions to improve the BioC 
experience for Mac Users. 

Is there a way to build the universal binaries with configure/make ?

Are there other packages in BioC that build complex libraries 
which I could use as example ? Or some Mac specific 
documentation links ?

Actually I have in src/Makevars

  cp -r ./imslib/src/.libs/libims*$(DYLIB_EXT)*

so I use whatever extension R has configured.

Yours,
Steffen
#
Steffen Neumann wrote:
http://r.research.att.com/

Best,

Jim