Personal tools
You are here: Home Forum Install & build New build error on Debian lenny AMD64

New build error on Debian lenny AMD64

Up to Install & build
  • New build error on Debian lenny AMD64

    Posted by Adam Powell at January 02. 2008
    Another build error for you:

    /bin/sh ../../libtool --mode=link --tag=CXX g++  -m64 -D_OCC64 -I/home/hazelsct/x86_64-linux/include -I/usr/lib/openmpi/include -g -D_DEBUG_  -Wno-deprecated -Wparentheses -Wreturn-type -Wunused -pthread   -o testDS  testDS-testDS.o libSalomeDSImpl.la ../HDFPersist/libSalomeHDFPersist.la -L/home/hazelsct/x86_64-linux/lib  -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema -lhdf5 -L/usr/X11R6/lib64 -lXmu -lnsl -lm -lrt -ldl
    g++ -m64 -D_OCC64 -I/home/hazelsct/x86_64-linux/include -I/usr/lib/openmpi/include -g -D_DEBUG_ -Wno-deprecated -Wparentheses -Wreturn-type -Wunused -o .libs/testDS testDS-testDS.o  -pthread ./.libs/libSalomeDSImpl.so /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/HDFPersist/.libs/libSalomeHDFPersist.so -L/home/hazelsct/x86_64-linux/lib -L/usr/lib -L/usr/X11R6/lib64 ../HDFPersist/.libs/libSalomeHDFPersist.so /home/hazelsct/x86_64-linux/lib/libTKStdSchema.so /home/hazelsct/x86_64-linux/lib/libTKPCAF.so /home/hazelsct/x86_64-linux/lib/libTKCAF.so /home/hazelsct/x86_64-linux/lib/libTKV3d.so /home/hazelsct/x86_64-linux/lib/libTKMesh.so /home/hazelsct/x86_64-linux/lib/libTKV2d.so /home/hazelsct/x86_64-linux/lib/libTKService.so -lXt -lX11 /home/hazelsct/x86_64-linux/lib/libTKHLR.so /home/hazelsct/x86_64-linux/lib/libTKStdLSchema.so /home/hazelsct/x86_64-linux/lib/libTKPLCAF.so /home/hazelsct/x86_64-linux/lib/libTKLCAF.so /home/hazelsct/x86_64-linux/lib/libTKTopAlgo.so /home/hazelsct/x86_64-linux/lib/libTKGeomAlgo.so /home/hazelsct/x86_64-linux/lib/libTKShapeSchema.so /home/hazelsct/x86_64-linux/lib/libTKPShape.so /home/hazelsct/x86_64-linux/lib/libTKBRep.so /home/hazelsct/x86_64-linux/lib/libTKGeomBase.so /home/hazelsct/x86_64-linux/lib/libTKG3d.so /home/hazelsct/x86_64-linux/lib/libPTKernel.so /home/hazelsct/x86_64-linux/lib/libTKG2d.so /home/hazelsct/x86_64-linux/lib/libTKMath.so /home/hazelsct/x86_64-linux/lib/libTKCDF.so /home/hazelsct/x86_64-linux/lib/libTKernel.so -lstlport -lieee /usr/lib/libhdf5.so -lpthread -lz -lXmu -lnsl -lm -lrt -ldl -Wl,--rpath -Wl,/home/hazelsct/x86_64-linux/lib64/salome -Wl,--rpath -Wl,/usr/lib -Wl,--rpath -Wl,/home/hazelsct/x86_64-linux/lib
    testDS-testDS.o: In function `main':
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:64: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:66: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:69: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:71: undefined reference to `operator<<(std::basic_ostream >&, TCollection_ExtendedString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:73: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:73: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:78: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:80: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    /home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:80: undefined reference to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)'
    testDS-testDS.o:/home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl/testDS.cxx:81: more undefined references to `operator<<(std::basic_ostream >&, TCollection_AsciiString const&;)' follow
    ./.libs/libSalomeDSImpl.so: undefined reference to `TDF_Attribute::ExtendedDump(std::basic_ostream >&, TDF_IDFilter const&, TDF_AttributeIndexedMap&;) const'
    ./.libs/libSalomeDSImpl.so: undefined reference to `Standard_Transient::ShallowDump(std::basic_ostream >&;) const'
    ./.libs/libSalomeDSImpl.so: undefined reference to `operator<<(std::basic_ostream >&, Handle_Standard_Type const&;)'
    ./.libs/libSalomeDSImpl.so: undefined reference to `TDF_Attribute::Dump(std::basic_ostream >&;) const'
    collect2: ld returned 1 exit status
    make[2]: *** [testDS] Error 1
    make[2]: Leaving directory `/home/hazelsct/salome-3.2.6/KERNEL_SRC_3.2.6/src/SALOMEDSImpl'

    I'm afraid I don't know enough C++ to make sense of this...  What's a TCollection_AsciiString?  Is this a C++ standard thing, an OpenCASCADE thing, a Salomé thing, or some other thing?

    Thanks,
    Adam
    • Re: New build error on Debian lenny AMD64

      Posted by Adam Powell at January 07. 2008
      So here's what I've found by grepping through OpenCASCADE sources and using nm:

      % nm -C /usr/lib/libTKernel.a | grep TCollection_AsciiString | grep " T " | grep operator
      nm: OSD_WNT.o: no symbols
      nm: OSD_WNT_1.o: no symbols
      nm: Standard_math.o: no symbols
      nm: Standard_symlink.o: no symbols
      nm: Storage_stCONSTclCOM.o: no symbols
      0000000000004c74 T operator<<(_STL::basic_ostream >&, TCollection_AsciiString const&;)
      0000000000004e4e T operator>>(_STL::basic_istream >&, TCollection_AsciiString&;)
      % nm -C /usr/lib/libTKLCAF.a | grep TDF_Attribute | grep Dump | grep " T "
      0000000000000110 T TDF_Attribute::ExtendedDump(_STL::basic_ostream >&, TDF_IDFilter const&, TDF_AttributeIndexedMap&;) const
      00000000000003dc T TDF_Attribute::Dump(_STL::basic_ostream >&;) const
      0000000000000156 T TDF_AttributeDelta::Dump(_STL::basic_ostream >&;) const
      0000000000000c7a T TDF_Label::ExtendedDump(_STL::basic_ostream >&, TDF_IDFilter const&, TDF_AttributeIndexedMap&;) const
      0000000000000998 T TDF_Label::InternalDump(_STL::basic_ostream >&, TDF_IDFilter const&, TDF_AttributeIndexedMap&, unsigned int) const
      0000000000000156 T TNaming_Naming::ExtendedDump(_STL::basic_ostream >&, TDF_IDFilter const&, TDF_AttributeIndexedMap&;) const

      I'm sure I can find the other two symbols in another couple of minutes.

      So why do these library symbols have _STL when the C++ code is trying to link to std?  Is that what's making this fail?  That's the only difference I see.  Both -lTKernal and -lTKCAF are in the linking line, so it's not missing any libraries on the command line.

      I built OpenCascade, then tried to build Salome, then built OpenCascade again, then tried Salome again, so I don't think the C++ mangling conventions are an issue.
Powered by Ploneboard
Document Actions