[Trilinos-Users] Mac OS X PyTrilinos build problems

Phipps, Eric T etphipp at sandia.gov
Tue Jun 24 13:42:52 MDT 2008


I did a little testing on my Mac (10.5, Intel) with the three versions of the GNU compilers I have on my machine:  4.0 (Apple), 4.2.4 (Macports), and 4.3.0 (Macports), and found the -mno-fused-madd option was accepted by 4.0 and 4.3.0, but not 4.2.4.  So I would try one of the other versions of gcc you have installed on your machine.  Ideally, you would want to use the same version as python was compiled with.  My experience has been that gcc 4.2.x on Mac's is severely broken.


On 6/24/08 1:26 PM, "Spotz, William F" <wfspotz at sandia.gov> wrote:


First, as an experiment, try cutting-and-pasting the compile line that fails and replacing the C++ compiler with the corresponding C compiler.  I would be interested to see if that works.

On my Mac OS X box, I am using the Developer tools gcc (/usr/bin/gcc), which for me is 4.0.1.

And -- you'll want to enable amesos.  There is a known build issue with PyTrilinos if you don't.

On Jun 24, 2008, at 2:44 PM, Askey Scott A Capt AFIT/ENY wrote:

Thank you for your help.   Which (free) compiler would you suggest?
Which have you known to work on OS 10.5?

Would different linker/compiler flags increase chance of success?

A compiler available via fink, macports or as a binary would be easiest
for me.  I could not get fink to build gcc-3.3.

My Trilinos builds with  gcc-4.2.3 (fink) , gcc-4.3.0 (fink) and and
gcc-4.4 (http://hpc.sourceforge.net/)  all had various build or test



Message: 2
Date: Tue, 24 Jun 2008 11:52:34 -0600
From: "Spotz, William F" <wfspotz at sandia.gov>
Subject: Re: [Trilinos-Users] Mac OS X PyTrilinos build problems
To: "scotta_2002 at yahoo.com" <scotta_2002 at yahoo.com>
Cc: "trilinos-users at software.sandia.gov"
       <trilinos-users at software.sandia.gov>

<875E04698300DB4FA52B4219ABA6039B112F770E32 at ES02SNLNT.srn.sandia.gov>
Content-Type: text/plain; charset="us-ascii"


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 \
  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 \

blazers-macbook-pro-15:gcc42litepy2 blazer$ echo $DYLD_LIBRARY_PATH


Trilinos package PyTrilinos subdirectory shared built successfully.


Extracting Makefile variables ... done

creating PyTrilinos/__init__.py
Enabled modules:

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 ->
copying PyTrilinos/AztecOO.py ->
copying PyTrilinos/Epetra.py ->
copying PyTrilinos/EpetraExt.py ->
copying PyTrilinos/IFPACK.py ->
copying PyTrilinos/ML.py -> build/lib.macosx-10.5-i386-2.5/PyTrilinos
copying PyTrilinos/Teuchos.py ->
copying PyTrilinos/TriUtils.py ->
creating build/lib.macosx-10.5-i386-2.5/PyTrilinos/NOX
copying PyTrilinos/NOX/__init__.py ->
copying PyTrilinos/NOX/Abstract.py ->
copying PyTrilinos/NOX/Solver.py ->
copying PyTrilinos/NOX/StatusTest.py ->
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
-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
blazers-macbook-pro-15:gcc42litepy2 blazer$ pwd
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

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


Scott Askey
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov

** 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 **

Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080624/330e3c33/attachment.html 

More information about the Trilinos-Users mailing list