[Trilinos-Users] Mac OS X PyTrilinos build problems

Spotz, William F wfspotz at sandia.gov
Tue Jun 24 11:52:34 MDT 2008


Scott,

The build system is getting some of its compiler command-line options from the python distutils module.  I assume this is where -mno-fused-madd and -Wno-long-double are coming from.  From the compiler error message, these are valid for C but not C++ (that these options would be specified makes some sense because python is written in C).  I run into this all the time, but the C++ compiler has always just raised a warning for those options rather than an error.

That is the nature of the problem.  You are probably in a better position to find a fix, depending on the specifics of your compiler and your willingness to try other compiler versions.

Perhaps the long term solution would be for me to obtain those compiler command-line options, test them in the configuration phase, and omit any that raise errors or warnings.

On Jun 24, 2008, at 12:22 PM, Scott Askey wrote:

When I attempt to build Trilinos with Pytrilinos enabled the build fails during the building of the pytrilinos teuchos extensions.  Any advise on how to work around this problem will be appreciated.

My configure script, the error related output follow.

../configure \
   CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 \
CFLAGS="-O3" CXXFLAGS="-O3" FFLAGS="-O2" \
   F77=/sw/bin/gfortran \
   RANLIB="ranlib -s" \
--with-ldflags="-Wl,-multiply_defined -Wl,suppress" \
   --prefix=/Users/blazer/lib/trilinos-8.0.7/gcc42lite \
   --with-incdirs="-I/sw/include" \
   --with-ldflags="-L/sw/lib -framework vecLib" \
   --cache-file=config.cache \
   --with-gnumake \
   --enable-tests \
   --enable-pytrilinos

=============
blazers-macbook-pro-15:gcc42litepy2 blazer$ echo $DYLD_LIBRARY_PATH
/Users/blazer/lib/trilinos-8.0.7/gcc42litepy2

=============


Trilinos package PyTrilinos subdirectory shared built successfully.

...

Extracting Makefile variables ... done

creating PyTrilinos/__init__.py
Enabled modules:
Teuchos
Epetra
TriUtils
EpetraExt
AztecOO
IFPACK
ML
NOX

running build
running build_py
creating build
creating build/lib.macosx-10.5-i386-2.5
creating build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/__init__.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/AztecOO.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/Epetra.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/EpetraExt.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/IFPACK.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/ML.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/Teuchos.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/TriUtils.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
creating build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
copying PyTrilinos/NOX/__init__.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
copying PyTrilinos/NOX/Abstract.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
copying PyTrilinos/NOX/Solver.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
copying PyTrilinos/NOX/StatusTest.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
running build_ext
building 'PyTrilinos._Teuchos' extension
creating build/temp.macosx-10.5-i386-2.5
/sw/bin/g++-4 -fno-strict-aliasing -Wno-long-double -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H=1 -DNUMPY_NOPREFIX=1 -DHAVE_TEUCHOS=1 -DHAVE_EPETRA=1 -I../../../../packages/PyTrilinos/src -I/Users/blazer/lib/trilinos-8.0.7/gcc42litepy2/packages/teuchos/src -I/Users/blazer/lib/trilinos-8.0.7/packages/teuchos/src -I/sw/lib/python2.5/site-packages/numpy/core/include -I/sw/include/python2.5 -c Teuchos_wrap.cpp -o build/temp.macosx-10.5-i386-2.5/Teuchos_wrap.o -I/sw/include -O3
cc1plus: error: unrecognized command line option "-mno-fused-madd"
cc1plus: error: unrecognized command line option "-Wno-long-double"
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
error: command '/sw/bin/g++-4' failed with exit status 1
make[5]: *** [package] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
blazers-macbook-pro-15:gcc42litepy2 blazer$ echo $DYLD_LIBRARY_PATH
/Users/blazer/lib/trilinos-8.0.7/gcc42litepy2
blazers-macbook-pro-15:gcc42litepy2 blazer$ pwd
/Users/blazer/lib/trilinos-8.0.7/gcc42litepy2
blazers-macbook-pro-15:gcc42litepy2 blazer$ error: command '/sw/bin/g++-4' failed with exit status 1
-bash: error:: command not found
blazers-macbook-pro-15:gcc42litepy2 blazer$ /sw/bin/g++-4 -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: ../gcc-4.2.3/configure --prefix=/sw --prefix=/sw/lib/gcc4.2 --mandir=/sw/share/man --infodir=/sw/share/info --enable-languages=c,c++,fortran,objc,java --with-arch=nocona --with-tune=generic --host=i686-apple-darwin9 --with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
Thread model: posix
gcc version 4.2.3
blazers-macbook-pro-15:gcc42litepy2 blazer$

A proven OS 10.5  pytrilinos configuration script that
includes NOX plus
Teuchos and uses fink libraries would be greatly
appreciated.

I am using an intel dual core macbookpro, gcc4.2.3 (from
fink)  , and
python2.5.2 (from fink).

V/R

Scott Askey
AFIT/ENY
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users

** Bill Spotz                                              **
** Sandia National Laboratories  Voice: (505)845-0170      **
** P.O. Box 5800                 Fax:   (505)284-0154      **
** Albuquerque, NM 87185-0370    Email: wfspotz at sandia.gov **




More information about the Trilinos-Users mailing list