How do I build OpenSim Creator 0.5.10 on Ubuntu 20.04? #847
-
Our group has used OpenSim already for a few years in human motion analysis, and I rather recently started to develop Bayesian estimation tools (non-linear Kalman filters) for inverse kinematics in OpenSim. Your name and OpenSim Creator came up as I contacted Professor Ajay Seth, acquaintance of our collaborator REDACTED. I became very interested when I heard that OpenSim Creator is a C++-based GUI, since we have issues of generating custom interfaces for OpenSim core, most notably on the Java side (having no prior experience on using SWIG does not help). I am writing you to ask for guidance on how to build OpenSim Creator. My primary OS is Windows 11 so I first followed the build instructions for Windows. The build script threw an error very early, stating, 'compiler is not able to compile a simple test program'. I could not find useful solutions so I decided to set up a virtual machine on Hyper-V and try the build instructions for Linux. On a VM running Ubuntu 22.04.4 I got further. The OpenSim core and OpenSim gui build scripts executed without errors. OpenSim Creator build script (build_debian-buster.sh), however, throws an error when building the Oscar library. I will attach a screenshot to clarify. After some googling, I infer this error is related to template aliases and how they are used in different C++ standards — that is, the syntax used in CircularBuffer.h would be ok in C++20 and later standards, but I think gcc uses C++17 as default. Could you please confirm which C++ standard one should use when building Oscar, and whether this needs to be explicitly specified for the compilers (or is this handled already in some build file and I have just missed that)? I would appreciate any further tips on configuring the tools. I would be happy to work with and expand OpenSim Creator, but first I need to be able build the basic version. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Note to all readers: opensim-creator is not an API-stable library project. It's an application that only guarantees GUI stability. Therefore, you can probably throw something together using the code that's within a release (e.g. 0.5.10), but beware that future versions of OSC are permitted to entirely change large parts of the API. You got very close! Your diagnosis is correct: it's a C++20 project. This means that you need to use a C++20 compiler when building the sources. The way to do that on Ubuntu 20.04 is to build it with rm -rf osc-build && CC=clang CXX=clang++ ./scripts/build_debian-buster.sh You'll need to install |
Beta Was this translation helpful? Give feedback.
Note to all readers: opensim-creator is not an API-stable library project. It's an application that only guarantees GUI stability. Therefore, you can probably throw something together using the code that's within a release (e.g. 0.5.10), but beware that future versions of OSC are permitted to entirely change large parts of the API.
You got very close! Your diagnosis is correct: it's a C++20 project. This means that you need to use a C++20 compiler when building the sources.
The way to do that on Ubuntu 20.04 is to build it with
clang
instead ofgcc
(or use a newer gcc). The way you customize which compiler a build script should use is to set theCC and CXX
environment variables before con…