[Trilinos-Users] Compilation fails on OSX with clang

Dominique Orban dominique.orban at gmail.com
Fri Nov 7 06:20:31 MST 2014


Hello,

Over at https://github.com/Homebrew/homebrew-science/issues/887 we're
trying to write a solid Homebrew (https://brew.sh) formula for users to
install Trilinos on OSX.

We haven't been able to build 11.12.1 so far and thought it might be safer
to focus on 11.10.2. The build goes through with gcc 4.9 but it fails with
clang with the following error:

[ 46%] Building CXX object
packages/sacado/test/tradoptest/CMakeFiles/Sacado_hesopcheck_ADC.dir/hesopcheck_ADC.cpp.o
cd /tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/build/packages/sacado/test/tradoptest
&& /usr/local/bin/mpicxx    -DRAD_AUTO_AD_Const
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/build
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/build/packages/sacado/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/template
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/parameter
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/mpl
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/teuchos/remainder/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/build/packages/teuchos/core/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/teuchos/core/src
-I/usr/local/include
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/teuchos/numerics/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/teuchos/comm/src
-I/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/teuchos/parameterlist/src
   -o CMakeFiles/Sacado_hesopcheck_ADC.dir/hesopcheck_ADC.cpp.o -c
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/build/packages/sacado/test/tradoptest/hesopcheck_ADC.cpp
In file included from
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/test/tradoptest/hesopcheck.cpp:36:
In file included from
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/Sacado_trad.hpp:39:
In file included from
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/Sacado_trad_Traits.hpp:35:
In file included from
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/Sacado_Traits.hpp:56:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:246:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:35:
error: no matching function
      for call to 'fabs'
abs(double __x) _NOEXCEPT {return fabs(__x);}
                                  ^~~~
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/Sacado_MathFunctions.hpp:124:17:
note: candidate template ignored: could not
      match 'Expr<type-parameter-0-0>' against 'double'
UNARYFUNC_MACRO(fabs, FAbsOp)
                ^
/tmp/trilinos-ij94Bt/trilinos-11.10.2-Source/packages/sacado/src/Sacado_MathFunctions.hpp:43:30:
note: expanded from macro 'UNARYFUNC_MACRO'
    Expr< FADOP< Expr<T> > > OP (const Expr<T>&);

It would be great if seasoned Trilinos users/devs chimed in on the thread
above to comment on the formula and perhaps help us resolve build errors.
This would make Trilinos widely available to OSX users.

Cheers,

Dominique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20141107/7b75230b/attachment.html>


More information about the Trilinos-Users mailing list