[Trilinos-Users] [EXTERNAL] Trilinos Mac gfortran compatibility

Jesse Chan jchan985 at gmail.com
Tue Dec 20 15:03:29 MST 2011


Hi James - unfortunately, I had already installed fresh builds of both
g++, gcc, and gfortran on my mac when I received these errors.

Hi Eric - I do have a build of g95 on my mac.  I specify the path to
an updated gfortran for the fortran compiler in cmake, though, and
cmake appears to use /usr/local/bin/gfortran when actually building if
I look at terminal output.  Do you mean that gfortran is itself
referencing g95?

- Jesse

On 12/20/11, Willenbring, James M <jmwille at sandia.gov> wrote:
> Jesse,
>
> Installing just a Fortran compiler on Mac typically leads to a situation
> with incompatible compilers.  I install a new C++, C, and Fortran compiler
> when setting up a Mac.  Please try installing the whole suite, rather than
> just gfortran.
>
> Jim
>
> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov
> [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Jesse Chan
> Sent: Tuesday, December 20, 2011 7:18 AM
> To: trilinos-users at software.sandia.gov
> Subject: [EXTERNAL] [Trilinos-Users] Trilinos Mac gfortran compatibility
>
> Hi all
> I'm compiling an MPI build of Trilinos 10.8.4 on a 2010 Macbook Pro with
> Snow Leopard.  When configuring, cmake complains of failure in "Verifying
> Fortran/CXX Compiler Compatibility".  The error is
>
>     /usr/bin/mpicxx    -Wl,-search_paths_first
> -Wl,-headerpad_max_install_names
> CMakeFiles/VerifyFortranC.dir/main.c.o
> CMakeFiles/VerifyFortranC.dir/VerifyC.c.o
> CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o  -o VerifyFortranC
> -L/usr/local/lib/gcc/x86_64-apple-darwin10.7.0/4.6.0 -L/usr/local/lib
> libVerifyFortran.a -lgfortran -lquadmath -lm
>     Undefined symbols:
>       "_VerifyFortran", referenced from:
>           _main in main.c.o
>     ld: symbol(s) not found
>     collect2: ld returned 1 exit status
>
> If I skip over this test using
>
> -D Trilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL= TRUE \
>
> then Trilinos compiles fine and passes tests (at least with -np 1).
> However, if I then attempt to link in the compiled libraries to a C++
> program, I get the complaint
>
> Undefined symbols:
>   "__g95_sign_r4", referenced from:
>       _az_slaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_slaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_slaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_slaic1__ in libaztecoo.a(az_f_util.f.o)
>   "__g95_sign_r8", referenced from:
>       _az_dlaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_dlaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_dlaic1__ in libaztecoo.a(az_f_util.f.o)
>       _az_dlaic1__ in libaztecoo.a(az_f_util.f.o)
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> However, everything is built using a fresh build of gfortran.  In
> summary: config file complained during Fortran/C compatibility check, but
> builds and passes tests if I skip the check.  However, linking in Trilinos
> fails - are these two compilation issues related, or is there just something
> obvious I've missed in building AztecOO?
>
> Thanks
>
> - Jesse
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>



More information about the Trilinos-Users mailing list