On 09/23/2011 07:59 AM, Sebastian Rockel wrote:
Am 22.09.2011 16:45, schrieb Sebastian Rockel:

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?


[0] http://sourceforge.net/mailarchive/message.php?msg_id=28091475
I solved the undefined symbol and file not found problem by adding
following lines to my CMakeLists.txt.

find_package ( Qt4  COMPONENTS QtNetwork REQUIRED )
SET(INC_FILES   taserdriver.h )

BTW, I still find the libtool 'file not found' message very inconvenient
and misleading.

Regards, Sebastian

I just ran into an issue similar to this, stageplugin wasn't loading and was giving a libtool file not found error.  I was able to find a way to debug it, so I figured I'd reply to this message in case someone else has a similar error in the future.

Apparently, lt_dlopen tries loading the file several different times, and the last time it loads the library isn't necessarially the one that gives the most useful error[1].  This is why the undescriptive "file not found" ends up landing on the command line.  I was able to use LD_PRELOAD to force an error when loading the plugin by doing:

$ LD_PRELOAD=/usr/lib64/stageplugin.so player simple.cfg
player: symbol lookup error: /usr/lib64/stageplugin.so: undefined symbol: _ZN14InterfaceModel9SubscribeER12QueuePointer

So the loader is having an issue finding the definition of InterfaceModel::Subscribscribe(QueuePointer) inside of stageplugin.so.  I opened up libstageplugin/p_driver.h and found that the InterfaceModel class does have a Subscribe member, which is virtual, but doesn't have a definition in p_driver.cc.  Adding a {} after the declaration to give it an empty definition solved the issue.


[1] http://www.mail-archive.com/libtool@gnu.org/msg11841.html