RHEL / CentOS 7 Build Instructions
This is a collection of notes on getting OpenVSP to build on RH7 based Linux distributions. These are not (yet) meant to be a comprehensive (or easy to follow) set of instructions. Instead, this is meant to serve as a set of notes and working instructions as support for RH7 is improved.
Normally on Linux, we try to use system-installed libraries wherever possible. This is generally preferred by the distributions (use shared libraries where possible) and also shifts the burden of solving many compilation issues to the distribution. However, in certain situations, the list of libraries installed on a machine may be very limited – and the administrators may be unwilling to install more packages. In that situation, we may desire to use as few system-installed libraries as possible.
Unfortunately, this means the bundled libraries don't get tested as often on Linux as they do on other platforms (where they are the preferred solution). So it is not surprising that things break.
When developing these notes, I tried to use bundled libraries as much as possible – only switching to a system-installed library when there was a problem with the bundled library. This resulted in a working OpenVSP build – but it may not be optimal for users in a different situation. Though not a final solution, this provides us with an important initial position to work from.
These instructions should work for OpenVSP version 3.25.0 and later. Some small issues were discovered while preparing these notes that have been rolled into that version.
The CentOS 7 VM that I used to develop these instructions was a fresh install, but one that was set up for software development, content creation, and other user-centric workflows. Some dependencies may be hidden in the following because they were installed by default.
1. Install required packages:
sudo yum install epel-release sudo yum repolist sudo yum install cmake3 glew-devel libxml2-devel fltk-devel fltk-fluid
2. Make main directory and clone OpenVSP source:
mkdir OpenVSP; cd OpenVSP mkdir repo build buildlibs git clone --depth=1 https://github.com/OpenVSP/OpenVSP.git repo
3. Prepare build files for the libraries:
cd buildlibs cmake3 -DCMAKE_BUILD_TYPE=Release ../repo/Libraries -DVSP_USE_SYSTEM_LIBXML2=true -DVSP_USE_SYSTEM_FLTK=true -DVSP_USE_SYSTEM_GLEW=true
4. Build the libraries:
Adjust the integer after -j to tell make the number of recipes to execute simultaneously.
5. Set up and build OpenVSP:
to suit your path names to the OpenVSP directory.
cmake3 -DCMAKE_BUILD_TYPE=Release ../repo/src/ -DVSP_LIBRARY_PATH=/home/your/path/to/OpenVSP/buildlibs
6. Build OpenVSP
7. Make joint folder with executables:
This will generate a zip folder with all the executables necessary to run OpenVSP.
This build will rely on a bunch of shared libraries. If you want to build on one machine and migrate the resulting binaries to another machine, you will have to make sure the required libraries are available on the destination machine. You can generate a list of required libraries using the following commands.
ldd vsp ldd vspaero ldd vspviewer ldd vspslicer ldd vspscript ldd _vsp.so
It should be possible to get a build working that requires installing no packages using sudo.
For CMake, download the latest version from CMake and set it up in your user account.
GLEW fails to compile at the library build stage.
LibXML2 compiles at the library stage, but causes link time problems at the end of the OpenVSP build.
FLTK compiles at the library stage, but causes link time problems at the end of the OpenVSP build.
Before expending substantial time on these items, we should work to confirm if they are preventing users from building and using OpenVSP on their machines.