Getting opensim-gui to work on Linux
Posted: Fri Oct 15, 2021 6:08 am
Hello List,
I am trying to get opensim-gui installed on linux, debian 11 (bullseye), and I am almost there.
I now have a more or less working version of opensim-gui with 2 or 3 issues. First I will shortly describe where I
deviated from the README's in opensim-core and opensim-gui, and then I will describe the remaining issues.
OpenSim-core (on debian 11 and Ubuntu 20.04):
Dependencies:
- gcc-9 instead of gcc-10 (probably not relevant)
- openjdk-8
Using the superbuild:
Set ezc3d to ON (probably not relevant)
The main build:
In ccmake I set JAVA_WRAPPING and PYTHON_WRAPPING to ON, and OPENSIM_C3D_PARSER to ezc3d
make -j8
cmake -j8
There where about 22 failures in 134 tests, mostly with the Moco tests. I don't know how to interpret that.
The last time I did the build there were also about 10 popup windows with exactly the same error:
Failed to load one or more dynamic libraries for Opensim.
java.lang.UnsatisfiedLinkError: /home/sietse/Software/OpenSim/opensim-core-source/build/libosimJavaJNI.so: /home/sietse/Software/OpenSim/opensim-core-source/build/libosimJavaJNI.so: undefined symbol: _ZN7OpenSim14C3DFileAdapter7_forcesB5cxx11E
(seems to be the same problem that I mention below.)
make -j8 install
Now the command line tools seem to work!
I did a short test with a CMC example.
Opensim-gui (on debian 11):
- install netbeans-12.5
- mkdir build_dep; cd build_dep
- cmake ../ -DCMAKE_INSTALL_PREFIX=~/Software/OpenSim/opensim-gui-install \
-DAnt_EXECUTABLE="/usr/local/netbeans-12.5/netbeans/extide/ant/bin/ant"\
-DANT_ARGS="-Dnbplatform.default.netbeans.dest.dir=/usr/local/netbeans-12.5/netbeans;-Dnbplatform.default.harness.dir=/usr/local/netbeans-12.5/netbeans/harness"
- make CopyOpenSimCore
- make PrepareInstaller
This errors out with about 14 similar errors in compiling C3DFileadapter.java:
Simply removing the file solves this (for now. I read that somewhere), and the compilation succeeds.
Here one of the errors:
What could be the problem here?
I tried it both with BTK and ezc3d.
After removing the C3Dfileadapter.jave file the tar file gets created in dist.
I can unpack it and start the gui. We now get to the second issue:
The gui starts with 2 errors, both:
Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: no osimJavaJNI in java.library.path
Probably the same error I sometimes get with the ctest.
But the opensim/lib directory IS in java.library.path, and DOES contain libosimJavaJNI.so
This as shown by java -XshowSettings:properties
(I read in the CHANGELOG.mk of opensim-core that this should not be needed anymore.)
What could be the problem here?
And finally, the File entry in the menu doesn't have any items, so I can't load anything.
I read also something about this earlier, but no solution.
Thanks in advance,
Sietse
I am trying to get opensim-gui installed on linux, debian 11 (bullseye), and I am almost there.
I now have a more or less working version of opensim-gui with 2 or 3 issues. First I will shortly describe where I
deviated from the README's in opensim-core and opensim-gui, and then I will describe the remaining issues.
OpenSim-core (on debian 11 and Ubuntu 20.04):
Dependencies:
- gcc-9 instead of gcc-10 (probably not relevant)
- openjdk-8
Using the superbuild:
Set ezc3d to ON (probably not relevant)
The main build:
In ccmake I set JAVA_WRAPPING and PYTHON_WRAPPING to ON, and OPENSIM_C3D_PARSER to ezc3d
make -j8
cmake -j8
There where about 22 failures in 134 tests, mostly with the Moco tests. I don't know how to interpret that.
The last time I did the build there were also about 10 popup windows with exactly the same error:
Failed to load one or more dynamic libraries for Opensim.
java.lang.UnsatisfiedLinkError: /home/sietse/Software/OpenSim/opensim-core-source/build/libosimJavaJNI.so: /home/sietse/Software/OpenSim/opensim-core-source/build/libosimJavaJNI.so: undefined symbol: _ZN7OpenSim14C3DFileAdapter7_forcesB5cxx11E
(seems to be the same problem that I mention below.)
make -j8 install
Now the command line tools seem to work!
I did a short test with a CMC example.
Opensim-gui (on debian 11):
- install netbeans-12.5
- mkdir build_dep; cd build_dep
- cmake ../ -DCMAKE_INSTALL_PREFIX=~/Software/OpenSim/opensim-gui-install \
-DAnt_EXECUTABLE="/usr/local/netbeans-12.5/netbeans/extide/ant/bin/ant"\
-DANT_ARGS="-Dnbplatform.default.netbeans.dest.dir=/usr/local/netbeans-12.5/netbeans;-Dnbplatform.default.harness.dir=/usr/local/netbeans-12.5/netbeans/harness"
- make CopyOpenSimCore
- make PrepareInstaller
This errors out with about 14 similar errors in compiling C3DFileadapter.java:
Simply removing the file solves this (for now. I read that somewhere), and the compilation succeeds.
Here one of the errors:
Code: Select all
/home/sietse/Software/OpenSim/opensim-gui/Gui/opensim/modeling/src/org/opensim/modeling/C3DFileAdapter.java:26: error: cannot find symbol
[nb-javac] super(opensimCommonJNI.C3DFileAdapter_SWIGSmartPtrUpcast(cPtr), true);
[nb-javac] ^
[nb-javac] symbol: method C3DFileAdapter_SWIGSmartPtrUpcast(long)
I tried it both with BTK and ezc3d.
After removing the C3Dfileadapter.jave file the tar file gets created in dist.
I can unpack it and start the gui. We now get to the second issue:
The gui starts with 2 errors, both:
Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: no osimJavaJNI in java.library.path
Probably the same error I sometimes get with the ctest.
But the opensim/lib directory IS in java.library.path, and DOES contain libosimJavaJNI.so
This as shown by java -XshowSettings:properties
(I read in the CHANGELOG.mk of opensim-core that this should not be needed anymore.)
What could be the problem here?
And finally, the File entry in the menu doesn't have any items, so I can't load anything.
I read also something about this earlier, but no solution.
Thanks in advance,
Sietse