[Bioc-devel] mzR compilation error gcc 4.70 arch linux (and a patch)
Alvaro Cuadros Inostroza
Inostroza at mpimp-golm.mpg.de
Tue May 15 09:34:03 CEST 2012
I got the following compilation error while installing the package 'mzR' (devel version 1.3.6) in arch linux (fully updated) (my package, TargetSearch, depends on mzR). Here is the relevant part.
Using R version 2.15, BiocInstaller version 1.5.7.
Installing package(s) 'mzR'
g++ -I/opt/R/R-2.15.0/include -DNDEBUG -D_LARGEFILE_SOURCE -I./boost_aux/ -I. -DHAVE_PWIZ_MZML_LIB -I/usr/local/include -I"/opt/R/R-2.15.0/library/Rcpp/include" -fpic -g -O2 -c boost/thread/src/pthread/once.cpp -o boost/thread/src/pthread/once.o
In file included from ./boost/thread/detail/platform.hpp:17:0,
./boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
In file included from ./boost/thread/once.hpp:12:0,
./boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost threads are available for this platform."
The full error log is here .
I also got the same error with the release version of mzR (1.2.1). With an older gcc I do *not* get this error.
Since it seemed a problem with the boost libraries, I searched the web and found a bug report  in which they explain it's a configuration error due to a change in gcc 4.70 (or something like that). Also, in that page a fix and patch is provided (see link at the bottom) which I adapted and pasted here  for mzR. It works for both release and devel versions. At least it fixed the compilation error for me. Maybe it needs more testing...
[alvaro at home ~]$ gcc --version
gcc (GCC) 4.7.0 20120505 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)
 LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
 LC_PAPER=C LC_NAME=C
 LC_ADDRESS=C LC_TELEPHONE=C
 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
 stats graphics grDevices utils datasets methods base
other attached packages:
loaded via a namespace (and not attached):
[ CC: to the mainteners ]
More information about the Bioc-devel