64 bit linking error

Ryan Schmidt ryandesign at macports.org
Tue Nov 26 16:42:04 PST 2013


On Nov 26, 2013, at 09:10, Gideon Simpson wrote:

> I'm trying to compile something using the macports openmpi (built on macports gcc48), and am getting the following linking error:
> 
> openmpicxx -I/Users/gideon/software/sprng4.4/include -o sprng_mpi sprng_mpi.cpp  -L/Users/gideon/software/sprng4.4/lib -lsprng  -I/opt/local/include/openmpi -L/opt/local/lib -lmpi_cxx -lmpi
> Undefined symbols for architecture x86_64:
>  "std::ctype<char>::_M_widen_init() const", referenced from:
>      mult_48_32(int*, int*, int*) in libsprng.a(libsprng_a-lcg.o)
>      operator<<(std::ostream&, BigNum const&) in libsprng.a(libsprng_a-bignum.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make: *** [sprng_mpi] Error 1
> 
> This is using a library called SPRNG (http://www.sprng.org), which I built on the macports gcc 48.
> 
> Going through the listserv archives, there was something about this over 2 yeas ago, but it was unclear to me how/if it was resolved.

What version of OSX? If Mavericks, you may be having the problem that you cannot mix software compiled with libc++ (i.e. anything compiled with clang) with software compiled with libstdc++ (i.e. anything compiled with FSF GCC).



More information about the macports-users mailing list