[cgma-dev] build issues, libtool
Jed Brown
jed at 59A2.org
Fri Sep 18 16:20:49 CDT 2009
Jed Brown wrote:
> Jason Kraftcheck wrote:
>> Jed Brown wrote:
>>>
>>> First, configuring using --with-pic isn't actually adding -fPIC where
>>> needed, I had to put this into *FLAGS. My configuration is now
>>>
>> You should never need to specify --with-pic. Libtool automatically adds
>> that for shared libraries. The option is used to request PIC code in static
>> libraries (*.a) that will later be linked into a shared library.
>
> Right, I haven't needed to specify it in the past. But if configured
> --with-pic, -fPIC should be used for everything, but it isn't and that's
> giving me build errors.
Specifically, after substituting a working libtool, the build fails here
because up to this point, nothing was built with -fPIC. To fix this
issue, I tried the hack of building --with-pic but that changed nothing
so I manually added the flags.
/bin/sh ./libtool --tag=CC --mode=link gcc -g -o libcgm.la -rpath /home/jed/usr/lib init/libcgma_init.la geom/OCC/libcubit_OCC.la geom/virtual/libcubit_virtual.la geom/facet/libcubit_facet.la geom/Cholla/libcholla.la geom/facetbool/libcubit_facetbool.la geom/libcubit_geom.la util/libcubit_util.la -lTKMath -lTKXSBase -lTKernel -lTKShHealing -lTKBRep -lTKG3d -lTKBO -lTKFeat -lTKFillet -lTKG2d -lTKOffset -lTKBool -lTKGeomAlgo -lTKGeomBase -lTKPrim -lTKTopAlgo -lTKHLR -lTKIGES -lTKMesh -lTKPrim -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKSTEP -lTKSTL -lTKTopAlgo -lTKXSBase -lTKLCAF -lTKBinL no -lTKernel -lm
libtool: link: gcc -shared -Wl,--whole-archive init/.libs/libcgma_init.a geom/OCC/.libs/libcubit_OCC.a geom/virtual/.libs/libcubit_virtual.a geom/facet/.libs/libcubit_facet.a geom/Cholla/.libs/libcholla.a geom/facetbool/.libs/libcubit_facetbool.a geom/.libs/libcubit_geom.a util/.libs/libcubit_util.a -Wl,--no-whole-archive -L/opt/opencascade/lib /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/opencascade/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/libTKSTEPBase.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/openca
scade/lib/libTKTopAlgo.so /opt/opencascade/lib/libTKGeomAlgo.so /opt/opencascade/lib/libTKBRep.so /opt/opencascade/lib/libTKGeomBase.so /opt/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 -lm -Wl,-soname -Wl,libcgm.so.0 -o .libs/libcgm.so.0.0.0
/usr/bin/ld: init/.libs/libcgma_init.a(InitCGMA.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
init/.libs/libcgma_init.a(InitCGMA.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libcgm.la] Error 1
make[2]: Leaving directory `/home/jed/build/cgm/build2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jed/build/cgm/build2'
make: *** [all] Error 2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20090918/62d144ca/attachment.pgp>
More information about the cgma-dev
mailing list