Skip to content
Prev 10835 / 21312 Next

[Bioc-devel] package 'msa' not building on veracruz2, but on toluca2 and other Mac OS systems

On 04/07/2017 11:26 AM, Ulrich Bodenhofer wrote:
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
This email message may contain legally privileged and/or...{{dropped:2}}