I have inherited the task of porting a rather large software package from a 32-bit machine to a (64-bit) quad Opteron. This package consists of several shared object modules (mixes of C, C++ and FORTRAN) that are loaded as needed by a Java-based user inteface/control panel.
Curiously, the linking of the code that generates the shared object completes without an error, but when Java attempts to load the same module, an undefined symbol reference to 'pghpf_local_mode_" shuts everything down.
Here’s the linking for one of the shared objects :
- pgCC -O -shared -fPIC PotentDLL.o psmain.o psscg.o initim.o /sam/gorgon_pgi/lib/Potent.a /sam/gorgon_pgi/lib/cadlib.a /sam/gorgon_pgi/lib/dynalib.a /sam/gorgon_pgi/lib/dblib.a /sam/gorgon_pgi/lib/s3utils.a /sam/gorgon_pgi/lib/wintounix.a
-L/usr/local/pgi/linux86-64/5.2/libso -lpghpf -lpghpf_rpm -lpghpf2 -lpgftnrtl -lpgf90 -lm -lpgc -lgcc -lc -lgcc -o /sam/gorgon_pgi/bin/libPotentDLL.so
Here’s an attempt by Java to load this same shared object :
- loading PotentDLL…
Exception in thread “main” java.lang.UnsatisfiedLinkError: /sam/gorgon_pgi/bin/libPotentDLL.so: /usr/local/pgi/linux86-64/5.2/libso/libpghpf.so: undefined symbol: pghpf_local_mode_
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at LoadLib.main(LoadLib.java:4)
I still can’t find where this ‘pghpf_local_mode_’ symbol is defined, after searching all the various PGI libraries. Any ideas here?
The PsychOgre