openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
152 stars 81 forks source link

C++ Example Federates don't work on *nix systems #160

Closed timpokorny closed 8 years ago

timpokorny commented 8 years ago

Summary

When attempting to compile and run the C++ example federates, they do not appear to work on Mac OS X (or Linux I believe). There is an rpath issue, with the following error being given when you attempt to run the example federate in GDB (compiling works fine):

(gdb) run
Starting program: /Users/tim/Developer/workspace/opensource/portico/codebase/dist/portico-2.0.1/examples/cpp/hla13/example-federate 
dyld: Library not loaded: @rpath/libjvm.dylib
  Referenced from: /Users/tim/Developer/workspace/opensource/portico/codebase/dist/portico-2.0.1/lib/gcc4/libRTI-NG64.dylib
  Reason: image not found

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fff5fc01075 in ?? ()

Running the federate outside of GDB just generates a note saying that no JRE could be found and a legacy one will have to be installed.

Environment and Logs

List of example federates/platform combinations to check:

Mac OS X

Linux

timpokorny commented 8 years ago

Noticed that I have done some work on this before. On Mac OS X there are now separate gdb.env files for Linux and Mac OS X. Confirm that everything works on OS X. If you run with the platform specific versions, everything is OK (at least on Mac OS X). Will confirm on Linux.

timpokorny commented 8 years ago

All confirmed on linux. Hooray for past Tim (and boo for him not updating the paperwork).