trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

tdegraphics: 'XShapeQueryExtension' is defined in DSO /usr/lib/libXext.so.6

From: "David C. Rankin" <drankinatty@...>
Date: Wed, 07 Mar 2012 01:35:31 -0600
Tim, all,

  I've run into more link problems in tdegraphics. This time I am fairly certain
it is a gcc >= 4.6.2 problem. The error is:

/usr/bin/ld: CMakeFiles/ksnapshot.dir/windowgrabber.cpp.o: undefined reference
to symbol 'XShapeQueryExtension'
/usr/bin/ld: note: 'XShapeQueryExtension' is defined in DSO
/usr/lib/libXext.so.6 so try adding it to the linker command line

  This means I need to add '-lXext' to the LDADD lines for ksnapshot. But where
in the CMake chain does this get added. I tried patching the makefile, but cmake
ignores the patch, so it needs to go in a CMakeList file somewhere, but is that
in tdegraphics or tdegraphics/ksnapshot? The changes needed are:

-ksnapshot_LDADD = $(LIB_TDEPRINT)
+ksnapshot_LDADD = $(LIB_TDEPRINT) -lXext

  The full error follows. Do we need to open bugs on the gcc linking issues when
found?

Full Error:

[ 64%] Building CXX object ksnapshot/CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o
cd /build/src/build/ksnapshot && /usr/bin/c++   -DHAVE_CONFIG_H
-DKSNAPVERSION=\"0.7\" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2   -DQT_NO_ASCII_CAST
-DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION
-DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/build/src/build/ksnapshot
-I/build/src/tdegraphics/ksnapshot -I/build/src/build -I/opt/trinity/include
-I/opt/tqt3/include -I/opt/trinity/include/tqt    -o
CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o -c
/build/src/build/ksnapshot/ksnapshotwidget.cpp
Linking CXX executable ksnapshot
cd /build/src/build/ksnapshot && /usr/bin/cmake -E cmake_link_script
CMakeFiles/ksnapshot.dir/link.txt --verbose=1
/usr/bin/c++   -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2   -DQT_NO_ASCII_CAST
-DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION
-DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu
CMakeFiles/ksnapshot.dir/ksnapshotiface_skel.cpp.o
CMakeFiles/ksnapshot.dir/main.cpp.o CMakeFiles/ksnapshot.dir/ksnapshot.cpp.o
CMakeFiles/ksnapshot.dir/regiongrabber.cpp.o
CMakeFiles/ksnapshot.dir/windowgrabber.cpp.o
CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o  -o ksnapshot -rdynamic
-L/opt/trinity/lib -L/opt/tqt3/lib /opt/trinity/lib/libtdeprint.so.4.2.0
/opt/trinity/lib/libkio.so.4.2.0 /opt/trinity/lib/libtdeui.so.4.2.0 -lfreetype
-lfontconfig /opt/trinity/lib/libtdesu.so.4.2.0 -lutil
/opt/trinity/lib/libkwalletclient.so.1.0.1 /opt/trinity/lib/libtdecore.so.4.2.0
/opt/trinity/lib/libDCOP.so.4.2.0 /opt/trinity/lib/libtdefx.so.4.2.0 -ltqt
-ltqt-mt -lXrender -lX11 -lz -lidn -lXcomposite -lICE -lSM
-Wl,-rpath,/opt/trinity/lib:/opt/tqt3/lib:
/usr/bin/ld: CMakeFiles/ksnapshot.dir/windowgrabber.cpp.o: undefined reference
to symbol 'XShapeQueryExtension'
/usr/bin/ld: note: 'XShapeQueryExtension' is defined in DSO
/usr/lib/libXext.so.6 so try adding it to the linker command line
/usr/lib/libXext.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
m

-- 
David C. Rankin, J.D.,P.E.