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.
undefined symbol: __cxa_pure_virtual error when loading library from java
After rechecking all the answers related to my question on stackoverflow, I found out the answer by
Mark Seaborn to question: What is the purpose of __cxa_pure_virtual? fixed my problem.
As my jni library is managed by autotools, after adding "-Wl,--gc-sections -fPIC -shared -lstdc++" to AM_LDFLAGS of Makefile.am problems solved. libstdc++ might not necessary if code is compiled by a c++ compiler (e.g. g++).
Hope this could help others who have the same problem.
Related Topics
How to Shell Have More Than One Job in Linux
How to Group by Column Values into Row and Column Header and Then Sum the Value
Find and Remove a Line in Multiple Files
Ansible Inside Script Command Not Found
How to Setup the Passwords-Less Authentication Between Two Different Accounts
How to Copy All PDF Files from a Directory and Its Subdirectories to One Location
Linux Sed Command - Using Variable with Backslash
Pass Command-Line Arguments to Grep as Search Patterns and Print Lines Which Match Them All
Bash Variable Assignment Not Working Expected
Python Module Import Error for One User But Not the Other
How to Understand "Cmpl $0X0, -0X30(%Rbp)"/"Je ..."
Prompting for User Input in Assembly Ci20 Seg Fault
Passing Main Script Variables into Perl Modules
Interprocess Communication Using Pipe in Linux
Serial Port Doesn't Work Properly After Reboot, Unless I Execute Minicom