LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Reese Jones (rjones_at_[hidden])
Date: 2007-10-11 12:08:31


hi
  I am trying to port a C++ molecular dynamics code (LAMMPS) to OS X
with gcc and lam. Without mpi the code builds fine, with lam I get a
linker error:

/usr/bin/ld: multiple definitions of symbol ___cxa_atexit
/usr/lib/gcc/i686-apple-darwin8/4.0.1/crt3.o private external definition
of ___cxa_atexit in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib(atexit.So)
definition of ___cxa_atexit
/usr/bin/ld: multiple definitions of symbol _atexit
/usr/lib/gcc/i686-apple-darwin8/4.0.1/crt3.o private external definition
of _atexit in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib(atexit.So)
definition of _atexit
collect2: ld returned 1 exit status
mpic++: No such file or directory
make[1]: *** [../lmp_osx_lam] Error 1
make: *** [osx_lam] Error 2

I took a look at gcc's documentation and I flipped these switches (w/o
really understanding what they are) without success.

|fuse-cxa-atexit|
    Register destructors for objects with static storage duration with
    the |__cxa_atexit| function rather than the |atexit| function. This
    option is required for fully standards-compliant handling of static
    destructors, but will only work if your C library supports
    |__cxa_atexit|.

||
|-fno-use-cxa-get-exception-ptr|
    Don't use the |__cxa_get_exception_ptr| runtime routine. This will
    cause |std::uncaught_exception| to be incorrect, but is necessary if
    the runtime routine is not available.
any help would be greatly appreciated,
Reese

-- 
:::::::::::::::::::::::::::::::::::::::::::::::::::::
Reese Jones
Sandia National Laboratories, MS 9409, P.O. Box 0969
Livermore, CA 94551
phone: (925) 294-4744 or (800) 4SANDIA x4-4744
fax:   (925) 294-3870
e-mail: rjones_at_[hidden]
:::::::::::::::::::::::::::::::::::::::::::::::::::::