From: Sebastian R. <seb...@go...> - 2011-09-22 14:45:44
|
Am 22.09.2011 16:24, schrieb Rich Mattes: >> -----Original Message----- >> From: Sebastian Rockel [mailto:seb...@go...] >> Sent: Thursday, September 22, 2011 9:54 AM >> To: pla...@li... >> Subject: Re: [Playerstage-users] Player Plugin Driver: libtool: >> Undefined Symbol >> >> Am 16.09.2011 15:44, schrieb Rich Mattes: >>>> -----Original Message----- >>>> From: Sebastian Rockel [mailto:seb...@go...] >>>> Sent: Friday, September 16, 2011 9:33 AM >>>> To: Player Stage >>>> Subject: [Playerstage-users] Player Plugin Driver: libtool: >> Undefined >>>> Symbol >>>> >>>> Hello, >>>> >>>> I've written a Player Plugin Driver. Running 'cmake' and 'make' >> looks >>>> okay and produces the shared library object. Then I run: >>>> >>>>> player taser.cfg >>>> And I get: >>>> >>>> Player v.3.1.0-svn >>>> [...] >>>> error : Failed to load plugin build/libtaserdriver. >>>> error : libtool reports error: build/libtaserdriver.so: undefined >>>> symbol: _ZN6QMutexC1ENS_13RecursionModeE >>>> error : plugin search path: >>>> /home/rockel/taser/motor:.:/usr/local/lib/ >>>> error : failed to load plugin: build/libtaserdriver >>>> error : failed to parse config file taser.cfg driver blocks >>>> >>>> The undefined symbol is most probably a QT dependency. QT >> dependencies >>>> are already found with the CMakeLists.txt file (see below). So I am >>>> pretty sure that the dependency could be resolved. >>>> >>>> I am currently out of options and would highly appreciate any >>>> suggestions. >>>> >>>> The system is a rather old SUSE 9.0 (2.4 Kernel) with current Player >>>> svn trunk version. >>>> >>>> Regards, >>>> Sebastian >>>> >>>> >>>> === >>>> taser.cfg: >>>> driver >>>> ( >>>> name "taserdriver" >>>> plugin "build/libtaserdriver" >>>> provides ["position2d:0"] >>>> alwayson 1 >>>> ) >>>> === >>>> CMakeLists.txt: >>>> PROJECT (playerplugin_taser) >>>> >>>> # Include this CMake module to get most of the settings needed to >> build >>>> SET (CMAKE_MODULE_PATH "/usr/local/share/cmake/Modules") >>>> >>>> SET(CMAKE_BUILD_TYPE "Debug") >>>> # add debug definitions >>>> ADD_DEFINITIONS( -ggdb -pg -g3 -Wall ) >>>> >>>> find_package ( Qt4 REQUIRED ) >>>> include ( ${QT_USE_FILE} ) >>>> include_directories ( >>>> ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} >>>> ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} >>>> ${QT_QTNETWORK_INCLUDE_DIR} >>>> .) >>>> >>>> INCLUDE (UsePlayerPlugin) >>>> >>>> PLAYER_ADD_PLUGIN_DRIVER ( >>>> taserdriver >>>> SOURCES >>>> taserdriver >>>> ./devices/drive >>>> ../base/logger >>>> INCLUDEDIRS >>>> ./devices >>>> ../base >>>> ../canbus >>>> ) >>>> >>> You're only solving include dependencies. For link dependencies you >> need to >>> add something like TARGET_LINK_LIBRARIES(taserdriver ${QT_LIBRARIES}) >> to the >>> end of your CMakeLists.txt. You can look at FindQt4.cmake in your >>> /usr/share/cmake/Modules to get the correct variable if QT_LIBRARIES >> doesn't >>> work. >> Thanks. >> My CMakeLists.txt looks now as below and I get now the error (after >> 'player taser.cfg'): >> >> error : Failed to load plugin build/libtaserdriver. >> error : libtool reports error: file not found >> error : plugin search path: >> /informatik/home/rockel/local/lib64:/informatik/home/rockel/robotdev/ta >> ser/motor:.:/informatik/home/rockel/local/lib64/ >> error : failed to load plugin: build/libtaserdriver >> error : failed to parse config file taser.cfg driver blocks >> >> Is there a way to get a meaningful message, e.g. telling which symbols >> are not found? Any other point to look for as a next step would alse be >> highly appreciated. >> >> Regards, Sebastian >> >> > > This isn't a linker error. You're getting a "file not found" error, which > means that libtool can't find your plugin library in any of the directories > on the search path. You should correct the path to libtaserdriver in your > config file (you may need to add .so to it as well), or just specify > libtaserdriver and export PLAYERPATH=/path/to/your/plugindriver before you > run Player Before it was complaining about an undefined symbol in the shared library object on running. Now it complains about file not found. In fact the only thing I changed was adding some QT and external file dependencies. If I remove that again it is running (I mean 'player taser.cfg' without errors). IMHO that excludes the libtool not finding the .so (it is created in all cases in the same place: ./build/libtaserdriver.so) To my mind it is more probably that libtool can't resolve any dependency and giving this weird message. Here is the other thread about it [0] I have no clue how to debug this further. Any ideas? Sebastian [0] http://sourceforge.net/mailarchive/message.php?msg_id=28091475 |