[Qgis-developer] QGIS and platforms

Martin Dobias wonder.sk at gmail.com
Thu Feb 1 16:13:56 EST 2007


On 2/1/07, Tom Russo <tom.km5vy at gmail.com> wrote:
>
> The failure is in the link of the qgis application:
>
> [ 30%] Built target qgis_gui
> Linking CXX executable qgis
> /usr/local/lib/libpython2.4.so: warning: warning: tmpnam() possibly
> used unsafely; consider using mkstemp()
> /usr/local/lib/libpython2.4.so: warning: warning: tempnam() possibly
> used unsafely; consider using mkstemp()
> /usr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so: undefined reference to
> `pthread_cleanup_pop'
> /usr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so: undefined reference to
> `pthread_attr_destroy'
> /usr/local/lib/libpython2.4.so: undefined reference to `pthread_create'
> /usr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so: undefined reference to
> `pthread_attr_init'
> /usr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so: undefined reference to
> `pthread_cancel'
> [etc.]

That's interesting that the linking fails for qgis_gui library - thus
qgis_core library must have compiled well.

Just to make sure - do you use CMake in version 2.4.3 or later?

> According to the error messages, it's Qt that needs the threading libraries.
>
> It may well be that KDE4's CMakeLists.txt file has calls to the
> FindThreads package or some similar trick.

In FindQt4.cmake module it's already used to search for the threads
library for UNIX systems:
FIND_PACKAGE(Threads)
SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})

Can you check your CMakeCache.txt file in root of your build to see
what is the value of qgis_gui_LIB_DEPENDS variable? Mine looks like
this - pthread is there.
qgis_gui_LIB_DEPENDS:STATIC=/usr/lib/libQtCore.so;-lpthread;/usr/lib/libQtCore.so;dl;/usr/lib/libQtGui.so;/usr/lib/libQtGui.so;-lSM;-lICE;/usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libQt3Support.so;/usr/lib/libQt3Support.so;/usr/lib/libQtNetwork.so;/usr/lib/libQtNetwork.so;/usr/lib/libQtXml.so;/usr/lib/libQtXml.so;qgis_core;

Also can you try to add this line at the end of CMakeLists.txt in root
dir of qgis sources?
MESSAGE (STATUS "Threads: ${CMAKE_THREAD_LIBS_INIT}")
And see what value will it show when you run CMake.

Martin



More information about the Qgis-developer mailing list