Symbol lookup error undefined symbol, but all symbols seem to be present
nm -D shows that the symbol auth_class_names is defined
No: it shows that auth_class_names
is undefined in libcharon.so
.
libstrongswan provides the auth_class symbol, but libcharon doesn't reference it.
Wrong again: libcharon.so
does reference the symbol.
ldd /usr/lib/libstrongswan.so
That's not what you want. You want ldd /usr/lib/libcharon.so
.
Your problem is most likely that neigher libcharon.so
, nor the main executable were linked against libstrongswan.so
, so when you dynamically load libcharon.so
, libstrongswan.so
is nowhere to be found; hence the loading fails with undefined symbol.
There are several possible solutions, ordered from more correct to more hacky:
Link
libcharon.so
againstlibstrongswan.so
. Loadinglibcharon.so
will load all of its dependencies (which will now includelibstrongswan.so
, and the symbol will be found).Link
charon
binary againstlibstrongswan.so
.- Dynamically load
libstrongswan.so
before you loadlibcharon.so
. LD_PRELOAD=libstrongswan.so
How to fix symbol lookup error: undefined symbol errors in a cluster environment
After two dozens of comments to understand the situation, it was found that the libhdf5.so.7
was actually a symlink (with several levels of indirection) to a file that was not shared between the queued processes and the interactive processes. This means even though the symlink itself lies on a shared filesystem, the contents of the file do not and as a result the process was seeing different versions of the library.
For future reference: other than checking LD_LIBRARY_PATH
, it's always a good idea to check a library with nm -D
to see if the symbols actually exist. In this case it was found that they do exist in interactive mode but not when run in the queue. A quick md5sum
revealed that the files were actually different.
Related Topics
Linux Bash Commands to Remove Duplicates from a CSV File
Run a .Net Mvc5 Application on Mono
Possible I/O Sync Issue with Ruby Script Under Nohup
Ssl and Tkinter Not Present on Source Build of Python 3.5.2, Debian Linux
Sed Search a Range and Print First Set
X11 Configurenotify() Always Returning X,Y = (0,0)
How to Run My Own Script at Every Bootup
How to Replace The Word "Hello" with "Goodbye" in Every File in This Directory, and Also Recursively
Single-File App with Xulrunner - Possible
Clearing Large Apache Domain Logs
Detect If Something Is Modified in Directory, and If So, Backup - Otherwise Do Nothing
Extract Unique Block of Lines from a File Using Shell Script
How to Enter Text at Command Prompt from Shell Script Without Executing Command
How to Setup Virtualhosts to Point Two Ports on Same Ip to Different Servernames
How to Pipe The Output of an Ls on Remote Server to The Local Filesystem via Sftp
How to Solve Libusb_Error_Busy on Raspberry Pi (Debian) Running Node.Js