libtool compiling against the wrong library?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
pwschuck
Posts: 4
Joined: Mon Aug 10, 2009 4:54 pm

libtool compiling against the wrong library?

Post by pwschuck »

Hi ,

I successfully compiled FreeCAD last night on my laptop.
This morning I tried to compile it on my workstation and I ran into an issue:

make[2]: Entering directory `/home/schuck/downloads/freecad/src/Mod/Drawing/Gui'
/bin/sh ../../../../libtool --tag=CXX --mode=link g++ -D_OCC64 -Wno-deprecated -frtti -L../../../Base -L../../../App -L../../../Gui -L../../Part/App -L../App -L/opt/qtsdk-2009.03/qt/lib/ -lQtCore -lQtGui -lQt3Support -lQtNetwork -lQtOpenGL -lQtSvg -lQtXml -lX11 -lXext -lXmu -lXt -lXi -lGL -lGLU -L/usr/lib -L/usr/lib64 -L/usr/lib -L/usr/lib -version-info 2:0:0 -lpthread -o libDrawingGui.la -rpath /opt/FreeCAD/Mod/Drawing libDrawingGui_la-AppDrawingGuiPy.lo libDrawingGui_la-Command.lo libDrawingGui_la-DrawingView.lo libDrawingGui_la-PreCompiled.lo libDrawingGui_la-ViewProviderPage.lo libDrawingGui_la-ViewProviderView.lo libDrawingGui_la-Workbench.lo -lboost_system-mt -lpython2.6 -lxerces-c -lFreeCADBase -lFreeCADApp -lFreeCADGui -lPart -lDrawing
libtool: link: g++ -shared -nostdlib /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.3/crtbeginS.o .libs/libDrawingGui_la-AppDrawingGuiPy.o .libs/libDrawingGui_la-Command.o .libs/libDrawingGui_la-DrawingView.o .libs/libDrawingGui_la-PreCompiled.o .libs/libDrawingGui_la-ViewProviderPage.o .libs/libDrawingGui_la-ViewProviderView.o .libs/libDrawingGui_la-Workbench.o -Wl,-rpath -Wl,/home/schuck/downloads/freecad/src/Gui/.libs -Wl,-rpath -Wl,/home/schuck/downloads/freecad/src/Mod/Drawing/App/.libs -Wl,-rpath -Wl,/home/schuck/downloads/freecad/src/Mod/Part/App/.libs -Wl,-rpath -Wl,/home/schuck/downloads/freecad/src/App/.libs -Wl,-rpath -Wl,/home/schuck/downloads/freecad/src/Base/.libs -Wl,-rpath -Wl,/opt/FreeCAD/lib -Wl,-rpath -Wl,/opt/FreeCAD/Mod/Drawing -Wl,-rpath -Wl,/opt/FreeCAD/Mod/Part -L/home/schuck/downloads/freecad/src/Mod/Part/App/.libs -L/home/schuck/downloads/freecad/src/App/.libs -L/home/schuck/downloads/freecad/src/Base/.libs -L/home/schuck/downloads/freecad/src/Base -L/home/schuck/downloads/freecad/src/App -L/home/schuck/downloads/freecad/src/Gui -L/home/schuck/downloads/freecad/src/Mod/Part/App -L/home/schuck/downloads/freecad/src/Mod/Drawing/App -L/opt/qtsdk-2009.03/qt/lib/ -L/opt/qtsdk-2009.03/qt/lib -L/usr/X11R6/lib64 /opt/qtsdk-2009.03/qt/lib/libQt3Support.so /opt/qtsdk-2009.03/qt/lib/libQtOpenGL.so /opt/qtsdk-2009.03/qt/lib/libQtSvg.so -lgobject-2.0 -L/usr/lib /usr/lib/libxcb-xlib.so /usr/lib/libxcb.so -L/usr/lib64 /home/schuck/downloads/freecad/src/Gui/.libs/libFreeCADGui.so -L/opt/qtsdk-2009.03/qt/lib/make /usr/lib64/libQtSvg.so /usr/lib64/libSoQt.so /usr/lib/libXi.so /usr/lib64/libQtOpenGL.so -lGLU /usr/lib64/libQt3Support.so /opt/qtsdk-2009.03/qt/lib/libQtSql.so /opt/qtsdk-2009.03/qt/lib/libQtXml.so /opt/qtsdk-2009.03/qt/lib/libQtGui.so /opt/qtsdk-2009.03/qt/lib/libQtNetwork.so /usr/lib64/libQtSql.so /usr/lib64/libQtXml.so /usr/lib64/libQtGui.so /usr/lib/libXrender.so /usr/lib/libXrandr.so /usr/lib/libXfixes.so /usr/lib/libXcursor.so /usr/lib/libXinerama.so /usr/lib/libXext.so /usr/lib/libX11.so -lpng /usr/lib64/libfreetype.so /usr/lib64/libXrandr.so /usr/lib64/libXcursor.so /usr/lib64/libXrender.so /usr/lib64/libXfixes.so /usr/lib64/libXinerama.so -lfontconfig /usr/lib64/libQtNetwork.so /opt/qtsdk-2009.03/qt/lib/libQtCore.so /usr/lib64/libQtCore.so -lgthread-2.0 -lrt -lglib-2.0 /usr/lib64/libXmu.so /usr/lib64/libXt.so /usr/lib64/libXi.so /usr/lib64/libCoin.so -lGL /usr/lib64/libXext.so /usr/lib64/libSM.so -luuid -lICE /usr/lib64/libX11.so /usr/lib64/libxcb-xlib.so /usr/lib64/libxcb.so -lXau -ldl -lQtUiTools -L/usr/X11R6/lib /home/schuck/downloads/freecad/src/Mod/Drawing/App/.libs/libDrawing.so -lboost_regex-mt /home/schuck/downloads/freecad/src/Mod/Part/App/.libs/libPart.so /home/schuck/downloads/freecad/src/App/.libs/libFreeCADApp.so -lboost_program_options-mt -lboost_signals-mt /home/schuck/downloads/freecad/src/Base/.libs/libFreeCADBase.so -lpthread -lboost_filesystem-mt -lboost_system-mt -lz -lpython2.6 -lxerces-c -lTKFillet -lTKMesh -lTKernel -lTKG2d -lTKG3d -lTKMath -lTKSTEP -lTKIGES -lTKSTL -lTKShHealing -lTKXSBase -lTKBool -lTKBO -lTKBRep -lTKTopAlgo -lTKGeomAlgo -lTKGeomBase -lTKOffset -lTKPrim -lTKHLR -L/usr/lib64/gcc/x86_64-suse-linux/4.3 -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/intel/Compiler/11.1/046/mkl/lib/em64t -L/opt/intel/Compiler/11.1/046/lib/intel64 -L/opt/intel/Compiler/11.1/046/ipp/em64t/lib -L/opt/intel/Compiler/11.1/046/tbb/em64t/cc4.1.0_libc2.4_kernel2.6.16.21/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib64/gcc/x86_64-suse-linux/4.3/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crtn.o -pthread -pthread -Wl,-soname -Wl,libDrawingGui.so.2 -o .libs/libDrawingGui.so.2.0.0
/usr/lib/libxcb-xlib.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libDrawingGui.la] Error 1
make[2]: Leaving directory `/home/schuck/downloads/freecad/src/Mod/Drawing/Gui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/schuck/downloads/freecad/src/Mod/Drawing/Gui'
make: *** [all] Error 2


libtool is linking against libxcb-xlib.so in /usr/lib/ Shouldn't it link against /usr/lib64? or is it some other issue completely.

I'm running SUSE 11.1 with the latest version of KDE.
Linux feynman 2.6.27.25-0.1-default #1 SMP 2009-07-01 15:37:09 +0200 x86_64 x86_64 x86_64 GNU/Linux

Any help would be appreciated.

Thanks,

-- pete
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: libtool compiling against the wrong library?

Post by wmayer »

HI,

sounds like an issue with the libtool file inside the source tarball. It's probably best to run ./autogen.sh which re-creates the libtool file. It's somewhat strange that this problem appeared quite late in the Drawing module.

Cheers,
Werner
pwschuck
Posts: 4
Joined: Mon Aug 10, 2009 4:54 pm

Re: libtool compiling against the wrong library?

Post by pwschuck »

Werner,

Running autogen does not seem to help. However, it only happens a couple of times and by inserting -L/user/lib64 ahead of -L/user/lib and hand compiling about 4 instances, I was able to compile the rest of the code.

Is there any way to automatically specify look in /usr/lib64 FIRST when I run configure?

Thanks,

-- Pete
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: libtool compiling against the wrong library?

Post by wmayer »

Hi Pete,
Is there any way to automatically specify look in /usr/lib64 FIRST when I run configure?
No, I don't think so. I guess the libxcb-xlib.so is introduced by any third party library but no idea which one this could be. To find that out you must open the according .la files of a library. Somewhere there must be listed the wrong path.

Cheers,
Werner
pwschuck
Posts: 4
Joined: Mon Aug 10, 2009 4:54 pm

Re: libtool compiling against the wrong library?

Post by pwschuck »

Werner,

I checked the la files and the provide the correct directory.
I think the bigger problem is that there are two versions a 32 bit in /usr/lib and a 64 bit in /usr/lib64.
So are we back to libtool being the issue?

-- Pete
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: libtool compiling against the wrong library?

Post by wmayer »

Hi Pete,

really no idea what the basic problem could be. But I think there is a strange mixture of several libraries. For instance, Qt libs are used from /opt/qtsdk-2009.03/qt/lib and /usr/lib64/

With which parameters did you start ./configure?

Cheers,
Werner
Guest

Re: libtool compiling against the wrong library?

Post by Guest »

Werner,

configure command:

./configure CXXFLAGS="-D_OCC64" --prefix=/opt/FreeCAD/ --with-qt4-dir=/opt/qtsdk-2009.03/qt --with-qt4-lib=/opt/qtsdk-2009.03/qt/lib/

even with --with-qt4-dir=/opt/qtsdk-2009.03/qt
it still tried to pull libQtOpenGL.so libQt3Support.so libQtDesignerComponents.so from /usr/lib64 so I simply made symbolic links for these to
/opt/qtsdk-2009.03/qt

Thanks,

-- Pete
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: libtool compiling against the wrong library?

Post by wmayer »

Hi,

in case you don't get it working you could give cmake a chance. In our SVN-trunk we're using cmake for the Windows platform which also works on Ubuntu. For Suse you possibly have to do some adjustments.

Cheers,
Werner
Guest

Solved!

Post by Guest »

Werner,
I'm not sure why, but configuration apparently thought that the OpenCASCADE libraries were in /usr/lib.
This library happened to be in front of /usr/lib64.
I specified --with-occ-lib=/opt/OpenCASCADE/lib64/ on the configure command line and this solve the problem.
Not sure why configure had the location of the OpenCASCADE libraries wrong though.

Thanks for your help,

-- Pete
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: libtool compiling against the wrong library?

Post by wmayer »

Hi Pete,

in our configure step we assume OpenCascade to be in /usr/lib as default if --with-occ-lib is not used. For the Suse distribution does there exist an official OpenCascade package and if yes is the standard location under /usr/lib64?

Nice that it works now.

Cheers,
Werner
Post Reply