[mac] displace link fails
Forward and inverse modelling in optical tomography
Brought to you by:
apogee
Linking of displace fails on mac with the following error.
making all in displace... g++ -L/Users/samuelpowell/Documents/UCL/toastpp_mac/lib -m64 -Wl,-rpath,/Users/samuelpowell/Documents/UCL/toastpp_mac/gcc_shared/lib -s -o /Users/samuelpowell/Documents/UCL/toastpp_mac/gcc_shared/bin/teststrain teststrain.o -ldl -lm -L/Users/samuelpowell/Documents/UCL/toastpp_mac/gcc_shared/lib -lfe -lmath -lsuperlu -larpack -ltoastlapack -ltoastblas -lfsbtk -L/opt/local/lib/gcc44/gcc/x86_64-apple-darwin13/4.4.7 -L/opt/local/lib/gcc44/gcc/x86_64-apple-darwin13/4.4.7/../../.. -lgfortranbegin -lgfortran ld: warning: option -s is obsolete and being ignored ld: internal error: atom not found in symbolIndex(__Z2CGIdEiRK20TGenericSparseMatrixIT_ERK7TVectorIS1_ERS6_RdP15TPreconditionerIS1_Ei) for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [teststrain] Error 1
Would it be possible to un-mangle the name of the missing symbol, so I know what to look for? I suspect it's a constructor for a preconditioner, but it would be good to know for sure. I tried
c++filt __Z2CGIdEiRK20TGenericSparseMatrixIT_ERK7TVectorIS1_ERS6_RdP15TPreconditionerIS1_Ei
but this didn't unscramble the name, so I guess clang uses a different name mangler than gcc.
Good guess... the unmangled name is:
Nevermind - I've got it now (after stripping one of the leading underscores:
int CG<double>(TGenericSparseMatrix<double> const&, TVector<double> const&, TVector<double>&, double&, TPreconditioner<double>*, int)
This could be due to a lack of preprocessor define NEED_EXPLICIT_INSTANTIATION. Will check.