[root@thor hyperic-hq-agent-3.0.0]# java -classpath pdk/lib/sigar.jar org.hyperic.sigar.vmware.VMControlLibrary
Exception in thread "main" java.io.IOException: exec[/usr/bin/gcc, -shared, -o, /usr/local/hyperic-hq-agent-3.0.0/vmcontrol.so, /usr/local/hyperic-hq-agent-3.0.0/control-only/vmcontrol.o, -Wl,-rpath, /usr/lib/vmware/lib/libssl.so.0.9.7, -Wl,-rpath, /usr/lib/vmware/lib/libcrypto.so.0.9.7, /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7, /usr/lib/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7] failed: 1
at org.hyperic.sigar.vmware.VMControlLibrary.exec(VMControlLibrary.java:114)
at org.hyperic.sigar.vmware.VMControlLibrary.link(VMControlLibrary.java:270)
at org.hyperic.sigar.vmware.VMControlLibrary.link(VMControlLibrary.java:134)
at org.hyperic.sigar.vmware.VMControlLibrary.main(VMControlLibrary.java:282)
[root@thor hyperic-hq-agent-3.0.0]#
I thought it was weird that its trying to pass -Wl and -rpath to gcc and not ld? If you run the above command, gcc exits with the complaint -rpath is an unknown option. If I set those linker flags in LDFLAGS instead, it gets a bit further:
[root@thor hyperic-hq-agent-3.0.0]# LDFLAGS=-Wl,-rpath,/usr/lib/vmware/lib/libssl.so.0.9.7,-Wl,-rpath,/usr/lib/vmware/lib/libcrypto.so.0.9.7
[root@thor hyperic-hq-agent-3.0.0]# gcc -shared -o /usr/local/hyperic-hq-agent-3.0.0/vmcontrol.so /usr/local/hyperic-hq-agent-3.0.0/control-only/vmcontrol.o /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7 /usr/lib/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7
/usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7: could not read symbols: File in wrong format