[cgma-dev] build issues, libtool
Jason Kraftcheck
kraftche at cae.wisc.edu
Fri Sep 18 15:53:15 CDT 2009
Jed Brown wrote:
> The libtool issue also applies to MOAB, but 'ln -sf /usr/bin/libtool
> libtool' in the build directory works for me.
I still think this is a problem w/ your libtool installation or that you are
mixing pieces from the system one (/usr/bin) and some other one.
> In addition, though MOAB
> supports --with-imesh=nofortran, this leaks since CGM does not have this
> capability, hence FC_FUNC_ is defined when iGeom.h is included and thus
> pollutes iMesh.h (iRel.h includes them in this order). Can you
> namespace the FC_FUNC_ macro to be MOAB_FC_FUNC_ and CGM_FC_FUNC_?
>
Fixed. Also, you should always be able to accomplish the same thing as the
--with-imesh=nofortran option by specifying "FC= F77=".
> The libtool issue also applies to Lasso. In the Lasso build, I need to
> use C++ and mpicxx because MOAB is built in parallel.
Fixed.
>
> /bin/sh ./libtool --tag=CC --mode=link gcc -fPIC -o rtestc rtestc.o libiRel.la /home/jed/usr/lib/libiGeom.la /home/jed/usr/lib/libiMesh.la
> libtool: link: gcc -fPIC -o .libs/rtestc rtestc.o ./.libs/libiRel.so /home/jed/usr/lib/libiGeom.so -L/opt/opencascade/lib /home/jed/usr/lib/libcgm.so /opt/opencascade/lib/libTKFeat.so /
> opt/opencascade/lib/libTKHLR.so /opt/opencascade/lib/libTKIGES.so /opt/opencascade/lib/libTKOffset.so /opt/opencascade/lib/libTKFillet.so /opt/opencascade/lib/libTKBool.so /opt/opencasca
> de/lib/libTKBO.so /opt/opencascade/lib/libTKPrim.so /opt/opencascade/lib/libTKSTEP.so /opt/opencascade/lib/libTKSTEPAttr.so /opt/opencascade/lib/libTKSTEP209.so /opt/opencascade/lib/libT
> KSTEPBase.so /opt/opencascade/lib/libTKSTL.so /opt/opencascade/lib/libTKMesh.so /opt/opencascade/lib/libTKXSBase.so /opt/opencascade/lib/libTKShHealing.so /opt/opencascade/lib/libTKBinL.
> so /opt/opencascade/lib/libTKLCAF.so /opt/opencascade/lib/libTKTopAlgo.so /opt/opencascade/lib/libTKGeomAlgo.so /opt/opencascade/lib/libTKBRep.so /opt/opencascade/lib/libTKGeomBase.so /o
> pt/opencascade/lib/libTKG3d.so /opt/opencascade/lib/libTKG2d.so /opt/opencascade/lib/libTKMath.so /opt/opencascade/lib/libTKCDF.so /opt/opencascade/lib/libTKernel.so -ldl -lpthread /home
> /jed/usr/lib/libiMesh.so /home/jed/usr/lib/libMOAB.so -lnetcdf_c++ -lnetcdf -lhdf5
> /home/jed/usr/lib/libiMesh.so: undefined reference to `ompi_mpi_cxx_op_intercept'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Win::Free()'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Datatype::Free()'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Comm::Comm()'
> collect2: ld returned 1 exit status
> make[2]: *** [rtestc] Error 1
> make[2]: Leaving directory `/home/jed/build/lasso/build'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/jed/build/lasso/build'
> make: *** [all] Error 2
>
>
> The build succeeds when I use --tag=CXX and s/gcc/mpicxx/.
>
>
> My last remaining problem is with MOAB, I now need to use a C++ linker
> (mpicxx) when linking with libiMesh (despite calling from pure C where I
> would like to link with mpicc) due to
>
> /home/jed/usr/lib/libiMesh.so: undefined reference to `ompi_mpi_cxx_op_intercept'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Datatype::Free()'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Comm::Comm()'
> /home/jed/usr/lib/libiMesh.so: undefined reference to `MPI::Win::Free()'
>
>
I haven't figured out how to fix this yet. mpic(c|xx) is hiding stuff that
libtool needs to know (required libraries.) The only two ways I can think
of to fix this are to either a) find some way to avoid using the mpic(c|xx)
wrappers entirely or b) avoid using the MPI C++ API. However, I cannot
figure out where we are using the MPI C++ API. No source file in MOAB
includes mpicxx.h.
- jason
More information about the cgma-dev
mailing list