Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Script Issues [Linux] #1522

Open
alexbeattie42 opened this issue Oct 1, 2024 · 1 comment
Open

Build Script Issues [Linux] #1522

alexbeattie42 opened this issue Oct 1, 2024 · 1 comment

Comments

@alexbeattie42
Copy link

alexbeattie42 commented Oct 1, 2024

Problem

There are a couple of problems with the Linux build script for the GUI that create friction for newcomers to the project.

  1. The script reinstall Netbeans 12.3 and SWIG every time it is run
  2. The script uses 4 processor cores instead of defaulting to the number of cores available on the system
  3. You cannot choose an alternative directory for ~/opensim-workspace to create multiple build environments
  4. The install step of opensim-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 for opensim-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 and opensim-gui the build should pass

Actual 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:

  1. Check to see if the correct SWIG and Netbeans versions is already installed before attempting to install it again
  2. Default the number of processors to the value returned by nproc --all on Linux
  3. Parameterize (as a variable and flag) the value for opensim-workspace
  4. Introduce a 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 of opensim-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

  • Ubuntu 20.04 - GUI Branch Main
@aymanhab
Copy link
Member

aymanhab commented Oct 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants