Open alexbeattie42 opened 1 month ago
All these are good additions to make the build script more robust. 👍 Please feel free to submit PRs.
While these scripts were provided to help users build the GUI, we don't use them to build on regular basis and ci starts from a fresh environment anyways and that may explain why these didn't come up earlier but thanks for the find and the offer. Looking forward to your contributions.
Problem
There are a couple of problems with the Linux build script for the GUI that create friction for newcomers to the project.
Netbeans 12.3
andSWIG
every time it is run4
processor cores instead of defaulting to the number of cores available on the system~/opensim-workspace
to create multiple build environmentsopensim-core
installs to~/opensim-core
which is then used by the GUI build. If you build a different/incompatible version of the core, the install step in cmake DOES NOT clean the install folder so that the stale SWIG bindings remain, which then causes the GUI build to fail.Steps to reproduce
To reproduce step 4 you can checkout a branch from
opensim-core
that is incompatible with the GUI, run the script (the build will fail), then checkout main again foropensim-core
and the build will still fail.It is also notable that these types of problems will not happen on CI because when the CI pipeline runs it should have a clean filesystem in which there are no stale installs or states.
Expected result
When using current versions of main for
opensim-core
andopensim-gui
the build should passActual result
The build fails
Proposed Changes
I am happy to make changes to the build script to address these problems if it would be beneficial. My proposal to address the problems is:
SWIG
andNetbeans
versions is already installed before attempting to install it againnproc --all
on Linuxopensim-workspace
clean
flag to the script that will clear everything and rebuild. Additionally add a "clean prior to install" step if the gui build will rely on the installed version ofopensim-core
during the GUI build. Another option would be to use the built version of the core within the workspace instead of the "installed version"Environment and GUI version