[Bioc-devel] package 'msa' not building on veracruz2, but on toluca2 and other Mac OS systems
Martin Morgan
martin.morgan at roswellpark.org
Fri Apr 14 21:50:15 CEST 2017
On 04/07/2017 11:26 AM, Ulrich Bodenhofer wrote:
> Hi,
>
> The devel version of our package 'msa' currently does not compile on
> veracruz2 (R 3.4.0 alpha under OS X 10.11.6 El Capitan), but it seems to
> work on toluca2 (R-devel on OS X 10.9.5 Mavericks). I also checked on my
> Mac at home (R 3.3.3 under macOS 10.12.3 Sierra using the very latest
> version of Xcode), and it also compiles without any problems.
>
> The error stems from a conflicting definition of the math functions
> 'log2' and 'log10' in the source code of the ClustalOmega library which
> is integrated into 'msa' (the same error appears for the inline
> definition of 'log10'):
>
> hhalign/util-C.h:53:14: error: 'log2' is missing exception
> specification 'throw()'
> inline float log2(float x) {return (x<=0?
> (float)(-100000):1.442695041*log(x));}
>
> Any ideas? 'log2' and 'log10' are defined in the standard math library.
> The definitions work well on Linux along with '#include <cmath>' , while
> Windows requires '#include <math.h>'. So far, '#include <cmath>' also
> worked on Mac OS, but it seems that now, on veracruz2, neither one nor
> the other works. Any thoughts? Is this something I should care about or
> is there something exotic about veracruz2 such that I can simply ignore
> this issue?
I guess the minimal reproducible example is
$ cat log2.cpp
#include <cmath> // or <math.h>
inline float log2(float x) {return (x<=0?
(float)(-100000):1.442695041*log(x));}
$ R CMD SHLIB log2.cpp
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I/usr/local/include -I/opt/X11/include -fPIC -Wall -g -O2 -c
log2.cpp -o log2.o
log2.cpp:3:14: error: 'log2' is missing exception specification 'throw()'
inline float log2(float x) {return (x<=0? (float)(-100000):1.442695041*...
^
throw()
/usr/local/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/math.h:1221:46:
note:
previous declaration is here
inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEX...
^
1 error generated.
make: *** [log2.o] Error 1
It could be that final changes in the compiler used by R to build mac
binaries could change, but at this point I think it would be prudent to
implement a work-around; veracruz2 will be our main macOS builder for
the release, and if the package is not building on it then the package
will not be available to macOS users.
I am not enough of a C++ programmer to be able to give concrete advice
on how the problem should be addressed; maybe others on the list have
insight...?
Martin
> Thanks a lot in advance and best regards,
>
> Ulrich
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
This email message may contain legally privileged and/or...{{dropped:2}}
More information about the Bioc-devel
mailing list