[Bioc-devel] Mac build (xcms)
Steffen Neumann
sneumann at ipb-halle.de
Sat Feb 20 20:52:30 CET 2010
Hi,
XCMS has link problems on MacOS ppc build, see Ralf's mail below.
We had a similar issue april last year
http://groups.google.de/group/xcms-devel/browse_thread/thread/bb2584a7c015e56e/a24d1436bfc5d552?hl=de&ie=UTF-8&oe=utf-8&q=Re:+xcms+and+parallel+make#a24d1436bfc5d552
which got fixed by Patrick Aboyoun back then. Patrick's answer
back then is at the end of this mail.
Since R-2.10 or so R CMD build moved over to some perl code,
which might have re-introduced this similar problem unnoticed.
Could that be ?
If we'd add a unit test to XCMS (which are disabled
in the BioC builds ?!) or added that obiwarp() call to a vignette,
we'd have a broken ("ERROR") build on MacOS. This way
only the users will notice, which is even worse.
Any clues ?
Yours,
Steffen
On Fri, 2010-02-19 at 16:10 -0800, Ralf Tautenhahn wrote:
> I am not a Mac person, and I am not familiar with these multiarch
> builds that Mac seems to use.
>
> It seems the current builds of release and devel for Mac
> http://bioconductor.org/checkResults/2.5/bioc-LATEST/xcms/pelham-buildsrc.html
> http://bioconductor.org/checkResults/2.6/bioc-LATEST/xcms/pelham-buildsrc.html
> are not compiled/linked correctly.
>
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c obiwarp/mat.cpp -o obiwarp/mat.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c obiwarp/vec.cpp -o obiwarp/vec.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c obiwarp/xcms_dynprog.cpp -o obiwarp/xcms_dynprog.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c obiwarp/xcms_lmat.cpp -o obiwarp/xcms_lmat.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c obiwarp/xcms_obiwarp.cpp -o obiwarp/xcms_obiwarp.o
> gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -c mzClust_hclust.c -o mzClust_hclust.o
> gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -c mzROI.c -o mzROI.o
> gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -c netCDF.c -o netCDF.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c ramp_base64.cpp -o ramp_base64.o
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c ramp.cpp -o ramp.o
> ramp.cpp: In function ‘char* rampValidFileType(const char*)’:
> ramp.cpp:1459: warning: ‘result’ may be used uninitialized in this function
> g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -fasm-blocks -c rampR.cpp -o rampR.o
> gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -c util.c -o util.o
> gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/i386 -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -Wall -c xcms.c -o xcms.o
> g++-4.2 -arch i386 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o xcms.so obiwarp/mat.o obiwarp/vec.o obiwarp/xcms_dynprog.o obiwarp/xcms_lmat.o obiwarp/xcms_obiwarp.o mzClust_hclust.o mzROI.o netCDF.o ramp_base64.o ramp.o rampR.o util.o xcms.o -L/usr/local/lib -L/sw/lib -lnetcdf -lz -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
> ** arch - ppc
> gcc-4.2 -arch ppc -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c mzClust_hclust.c -o mzClust_hclust.o
> gcc-4.2 -arch ppc -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c mzROI.c -o mzROI.o
> gcc-4.2 -arch ppc -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c netCDF.c -o netCDF.o
> g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c ramp_base64.cpp -o ramp_base64.o
> g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c ramp.cpp -o ramp.o
> g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c rampR.cpp -o rampR.o
> gcc-4.2 -arch ppc -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c util.c -o util.o
> gcc-4.2 -arch ppc -std=gnu99 -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include -I/Library/Frameworks/R.framework/Versions/2.10/Resources/include/ppc -I/usr/local/include -I/sw/include -D_LARGEFILE_SOURCE -I/usr/local/include -fPIC -g -O2 -c xcms.c -o xcms.o
> g++-4.2 -arch ppc -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o xcms.so obiwarp/mat.o obiwarp/vec.o obiwarp/xcms_dynprog.o obiwarp/xcms_lmat.o obiwarp/xcms_obiwarp.o mzClust_hclust.o mzROI.o netCDF.o ramp_base64.o ramp.o rampR.o util.o xcms.o -L/usr/local/lib -L/sw/lib -lnetcdf -lz -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
> ld: warning in obiwarp/mat.o, file is not of required architecture
> ld: warning in obiwarp/vec.o, file is not of required architecture
> ld: warning in obiwarp/xcms_dynprog.o, file is not of required architecture
> ld: warning in obiwarp/xcms_lmat.o, file is not of required architecture
> ld: warning in obiwarp/xcms_obiwarp.o, file is not of required architecture
>
> As you can see, the obiwarp part is build for 32 bit, only.
>
> As a result you get this kind of error message on Mac's when trying to
> use obiwarp:
> Error in .Call("R_set_from_xcms", valscantime1, scantime1, mzval,
> mz, :
> C symbol name "R_set_from_xcms" not in load table
>
> (defined in src/obiwarp/xcms_obiwarp.cpp:extern "C" SEXP
> R_set_from_xcms(SEXP valscantime, SEXP scantime, SEXP mzrange, SEXP
> mz, SEXP intensity)
>
> It builds correctly (for the main architecture, only)
> when the --no-multiarch option is used for R CMD INSTALL.
>
>
> Any Mac build gurus out there ?
######################################################################################
# This is Patrick's answer from last year, which I can't find
# in any of the public archives:
#
On Fri, 2009-04-24 at 09:54 -0700, Patrick Aboyoun wrote:
> Steffen,
> Per Brian suggestion I changed the build universal binary script on the
> BioC Mac OS X nodes to use the (variable regulated) command
>
> R_ARCH=/$arch $R_CMD CMD INSTALL --preclean --library="$R_LIBS"
> --libs-only "$srcpkg_filepath"
>
> The addition of the --preclean flag solved the problem. There are other
> BioC packages with similar issues that need to be cleaned out now in a
> similar manner, but it appears that BioC packages with embedded source
> libraries no longer have to concern themselves with multi-architecture
> builds. (Problems will still exist for packages that expect the Mac OS X
> machines to have pre-built multi-architecture shared libraries, but that
> is another issue.)
>
>
> Patrick
>
>
> Steffen Neumann wrote:
> > Hi,
> >
> > the problem we (Patrick) solved with "all: clean $(SHLIB)"
> > was that we have a subdirectory "xcms/src/obiwarp"
> > which contains *.c files and *.o fies after "make all".
> >
> > BUT because MacOS BioC is building i386/PPC/PPC64 consecutively,
> > and presumably calling something like
> >
> > make clean
> > for ARCH in (i386 ppc ppc64) {
> > make all
> > }
> >
> > and *not*
> >
> > for ARCH in (i386 ppc ppc64) {
> > make clean
> > make all
> > }
> >
> > we had linker warnings in http://bioconductor.org/.../xcms/pelham-buildsrc.html
> > about those leftover *.o in the obiwarp subdirectory:
> >
> > g++-4.2 -arch ppc -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o xcms.so obiwarp/cmdparser.o obiwarp/mat.o obiwarp/vec.o obiwarp/xcms_dynprog.o obiwarp/xcms_lmat.o obiwarp/xcms_obiwarp.o mzClust_hclust.o mzROI.o netCDF.o ramp_base64.o ramp.o rampR.o util.o xcms.o -L/usr/local/lib -L/sw/lib -lnetcdf -lz -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
> >
> >> ld: warning in obiwarp/cmdparser.o, file is not of required architecture
> >> ld: warning in obiwarp/mat.o, file is not of required architecture
> >>
> >
> > I am happy to get suggestions for a better solution,
> > which 1) allows to organise C sources in subdirectories
> > and 2) works with multiple Arch builds. Maybe these
> > multiarch builds need to call make clean explicitely inbetween ?
> >
> > Yours,
> > Steffen
> >
> >
>
--
IPB Halle AG Massenspektrometrie & Bioinformatik
Dr. Steffen Neumann http://www.IPB-Halle.DE
Weinberg 3 http://msbi.bic-gh.de
06120 Halle Tel. +49 (0) 345 5582 - 1470
+49 (0) 345 5582 - 0
sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409
>
>
>
>
>
>
>
>
--
IPB Halle AG Massenspektrometrie & Bioinformatik
Dr. Steffen Neumann http://www.IPB-Halle.DE
Weinberg 3 http://msbi.bic-gh.de
06120 Halle Tel. +49 (0) 345 5582 - 1470
+49 (0) 345 5582 - 0
sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409
More information about the Bioc-devel
mailing list