User Tools

Site Tools


ubuntu_instructions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ubuntu_instructions [2019/05/05 06:25]
liam Addition of Ubuntu 18.04 compile instructions
ubuntu_instructions [2020/06/03 14:49] (current)
cibin Remove redundant headings
Line 1: Line 1:
 ====== Ubuntu (Debian, Mint, and similar) Build Instructions ====== ====== Ubuntu (Debian, Mint, and similar) Build Instructions ======
  
-On various Linux distributions,​ you must build OpenVSP yourself. ​ Here is a quick guide that should make this easier.+On various Linux distributions,​ you must build OpenVSP yourself. ​ Here is a quick guide that should make this easier. The following is a detailed walkthrough of Ubuntu 18.04 installation
  
-====== Instructions for Ubuntu 14.04 ======+**All steps provided below are also available in the form of a bash script** [[OpenVSP Build Script|here]]
  
-First, you need to make sure your computer ​has all the required compilers, build tools, and libraries. ​ Use apt get or your favorite package manager to install them Here is a list of required package names for Ubuntu ​14.04:+This has been successfully tested on Ubuntu 18.04, Ubuntu ​Mate 18.04 and Linux Mint 18.
  
-  * g++ +1Install all required packages:
-  * cmake +
-  * git +
-  * git-gui +
-  * libxml2-dev +
-  * libfltk1.3-dev +
-  * libcpptest-dev +
-  * libjpeg-dev +
-  * libglm-dev +
-  * libeigen3-dev +
-  * libcminpack-dev +
-  * libglew-dev+
  
-Once you're done installing those, you need to set up a place to hold the source repository and the build files. ​ You then need to use git to download the OpenVSP source. ​ Use the command prompt, starting from your favorite directory: 
- 
-<​code>​ 
-mkdir OpenVSP; cd OpenVSP 
- 
-mkdir build 
- 
-mkdir repo 
- 
-git clone https://​github.com/​OpenVSP/​OpenVSP.git repo 
- 
-cd build 
- 
-</​code>​ 
- 
-Now you can use CMake to set up the build files -- instructing the OpenVSP build to use all those libraries from the system. ​ CMake will set up any non-system libraries to build, and the OpenVSP build will know where everything is. 
- 
-<​code>​ 
-cmake -DCMAKE_BUILD_TYPE=Release -DVSP_USE_SYSTEM_FLTK=true 
--DVSP_USE_SYSTEM_CPPTEST=true -DVSP_USE_SYSTEM_LIBXML2=true 
--DVSP_USE_SYSTEM_EIGEN=true -DVSP_USE_SYSTEM_FLTK=true 
--DVSP_USE_SYSTEM_GLM=true -DVSP_USE_SYSTEM_GLEW=true 
--DVSP_USE_SYSTEM_CMINPACK=true ../​repo/​SuperProject 
-</​code>​ 
- 
-This will print out a lot of messages, please report any errors to the Google Group for help. 
- 
-We recently added a requirement for a *very* recent version of CMake (in src/​vsp_aero/​solver),​ but this is really only required for Windows builds. ​ Since your Linux distribution is unlikely to package such a new CMake, you may need to modify that CMake file. 
- 
-Once CMake completes without error, you can proceed to build everything. ​ This will take a while. 
- 
-<​code>​ 
-make 
-</​code>​ 
- 
-There will be some warnings, but it should complete without errors. ​ If there are errors, please report them to the Google Group for help. 
- 
-The build process leaves all the various executable files scattered around the build system. ​ If you want to collect them all together in a zip file like you would download from the website, you can do that too. 
- 
-<​code>​ 
-make package 
-</​code>​ 
- 
-  
-====== Instructions for Ubuntu 16.04 ====== 
- 
-The following is a walkthrough of Ubuntu 16.04 (with Python 2.7) installation:​ 
- 
-1. First install all required packages: 
 <​code>​ <​code>​
-sudo apt-get install git git-gui cmake libxml2-dev libfltk1.3-dev g++ libcpptest-dev libjpeg-dev libglm-dev libeigen3-dev libcminpack-dev libglew-dev swig+sudo apt-get install ​python3-dev ​git git-gui cmake libxml2-dev libfltk1.3-dev g++ libcpptest-dev libjpeg-dev libglm-dev libeigen3-dev libcminpack-dev libglew-dev swig doxygen graphviz texlive-latex-base
 </​code>​ </​code>​
  
Line 76: Line 16:
  
 <​code>​ <​code>​
- +mkdir OpenVSPcd OpenVSP
-mkdir OpenVSP +
- +
-cd OpenVSP+
  
 mkdir repo build buildlibs mkdir repo build buildlibs
  
-git clone https://​github.com/​OpenVSP/​OpenVSP.git repo +git clone --depth=1 ​https://​github.com/​OpenVSP/​OpenVSP.git repo
 </​code>​ </​code>​
  
-3. A working method ​for 16.04 is to set up the the libraries ​separately. To prepare the build files use the following:+3. Prepare build files for the libraries:
  
 <​code>​ <​code>​
- 
 cd buildlibs cd buildlibs
  
-cmake -DCMAKE_BUILD_TYPE=Release -DVSP_USE_SYSTEM_FLTK=false -DVSP_USE_SYSTEM_CPPTEST=false ​-DVSP_USE_SYSTEM_LIBXML2=true ​-DVSP_USE_SYSTEM_EIGEN=false ​-DVSP_USE_SYSTEM_FLTK=false -DVSP_USE_SYSTEM_GLM=true -DVSP_USE_SYSTEM_GLEW=true -DVSP_USE_SYSTEM_CMINPACK=true ​../​repo/​Libraries ​-DCMAKE_BUILD_TYPE=Release +cmake -DVSP_USE_SYSTEM_LIBXML2=true -DVSP_USE_SYSTEM_FLTK=true -DVSP_USE_SYSTEM_GLM=true -DVSP_USE_SYSTEM_GLEW=true -DVSP_USE_SYSTEM_CMINPACK=true -DVSP_USE_SYSTEM_LIBIGES=false -DVSP_USE_SYSTEM_EIGEN=false -DVSP_USE_SYSTEM_CODEELI=false -DVSP_USE_SYSTEM_CPPTEST=false ../​repo/​Libraries -DCMAKE_BUILD_TYPE=Release
-</​code>​ +
- +
-4. Build the libraries:​ +
- +
-<​code>​ +
-make -j8 +
-</​code>​ +
- +
-5. Set up and build OpenVSP: +
- +
-<​code>​ +
-cd ../build +
- +
-cmake ../​repo/​src/​ -DVSP_LIBRARY_PATH=/​your/​path/​to/​buildlibs -DCMAKE_BUILD_TYPE=Release +
- +
-make -j8 +
-</​code>​ +
- +
-6. Make joint folder with executives:​ +
- +
-<​code>​ +
-make package +
-</​code>​ +
- +
-*** If the previous step fails it might be because of the following reasons: +
- +
-a) Cmake uses Python3 instead of Python2 - if so, change references of Python3.* in CMakeCache.txt to the default version the systems uses. (e.g Python 2.7) +
- +
- +
-You can check the default version with: +
- +
-<​code>​ +
-python --version +
-</​code>​ +
- +
-You can check the default path with: +
- +
-<​code>​ +
-which python +
-</​code>​ +
- +
-b) Cmake can't find Fluid. To check this you can search in your CMakeCache.txt to see if it has the wrong path to Fluid or no path at all. - To fix this: find Fluid executive directory and add its path to CMakeCache.txt so it would say: +
-[/​your/​path/​to/​fluid/;​ fluid] +
- +
-After corrected the errors, clean the build directory and redo step 5. +
- +
-====== Instructions for Ubuntu 18.04 === +
- +
-The following is a walkthrough of Ubuntu 18.04 (with Python 2.7) installation. This has been successfully tested on Ubuntu, Ubuntu Mate and Linux Mint 18. +
- +
-1. First install all required packages: +
- +
-<​code>​ +
-sudo apt-get install git git-gui cmake libxml2-dev libfltk1.3-dev g++ libjpeg-dev libglm-dev libeigen3-dev libcminpack-dev libglew-dev swig doxygen graphviz texlive-latex-base +
-</​code>​ +
- +
-2. Make main directory and clone OpenVSP source: +
- +
-<​code>​ +
-mkdir OpenVSP +
- +
-cd OpenVSP +
- +
-mkdir repo build buildlibs +
- +
-git clone https://​github.com/​OpenVSP/​OpenVSP.git repo +
-</​code>​ +
- +
-3. A working method for 18.04 is to set up the the libraries separately. To prepare the build files use the following:​ +
- +
-<​code>​ +
-cd buildlibs +
- +
-cmake -DVSP_USE_SYSTEM_CPPTEST=false -DVSP_USE_SYSTEM_LIBXML2=false -DVSP_USE_SYSTEM_EIGEN=false -DVSP_USE_SYSTEM_CODEELI=false -DVSP_USE_SYSTEM_FLTK=false -DVSP_USE_SYSTEM_GLM=false -DVSP_USE_SYSTEM_GLEW=true -DVSP_USE_SYSTEM_CMINPACK=true -DVSP_USE_SYSTEM_LIBIGES=false ../​repo/​Libraries -DCMAKE_BUILD_TYPE=Release+
 </​code>​ </​code>​
  
Line 178: Line 39:
 </​code>​ </​code>​
  
-5. FLTK Fix (if required)+5. Set up and build OpenVSP:
  
 <​code>​ <​code>​
 cd ../build cd ../build
- 
-cp ../​buildlibs/​FLTK-prefix/​bin/​fluid ../​repo/​src/​vsp_aero/​viewer/​ 
- 
-cp ../​buildlibs/​FLTK-prefix/​bin/​fluid ../​repo/​src/​fltk_screens/​ 
 </​code>​ </​code>​
  
-6. Set up OpenVSP: +Adjust ​ 
- +<​code>​your/​path/​to</​code>​ 
-Adjust ​<​code>​your/​path/​to</​code>​ to suit your path names to the OpenVSP directory. Default paths names for Python 2.7 have been provided.+to suit your path names to the OpenVSP directory.
  
 <​code>​ <​code>​
-cmake ../​repo/​src/​ -DVSP_LIBRARY_PATH=/​home/​your/​path/​to/​OpenVSP/​buildlibs ​-DPYTHON_EXECUTABLE=/​usr/​bin/​python2.7 -DPYTHON_LIBRARY=/​usr/​lib/​x86_64-linux-gnu/​libpython2.7.so -DPYTHON_INCLUDE_DIR=/​usr/​include/​python2.7 -DPYTHON_INCLUDE_PATH=/​usr/​include ​-DCMAKE_BUILD_TYPE=Release+cmake ../​repo/​src/​ -DVSP_LIBRARY_PATH=/​home/​your/​path/​to/​OpenVSP/​buildlibs -DCMAKE_BUILD_TYPE=Release
 </​code>​ </​code>​
  
-7. Patch LIBXML +6. Build OpenVSP
- +
-Replace these lines in /​home/​your/​path/​to/​OpenVSP/​build/​CMakeCache.txt +
- +
-Note, do NOT replace the LIBRARY path. +
- +
-<​code>​ LIBXML2_INCLUDE_DIR:​PATH=/​usr/​include/​libxml2 </​code>​ +
- +
-Add this line (change libxml2.so path as required):​ +
- +
-<​code>​LIBXML2_LIBRARIES:​FILEPATH=/​usr/​lib/​x86_64-linux-gnu/​libxml2.so</​code>​  +
- +
- +
-Replace:  +
-<​code>​PYTHON_LIBRARY_DEBUG:​FILEPATH=PYTHON_LIBRARY_DEBUG-NOTFOUND</​code>​ +
- +
-with +
- +
-<​code>​PYTHON_LIBRARY_DEBUG:​FILEPATH=/​usr/​lib/​python2.7/​pdb.py</​code>​ +
- +
-8. Build OpenVSP+
  
 <​code>​ <​code>​
Line 222: Line 59:
 </​code>​ </​code>​
  
-9. Make joint folder with executives:+7. Make joint folder with executables:
  
 <​code>​ <​code>​
Line 228: Line 65:
 </​code>​ </​code>​
  
- +This will generate a zip folder with all the executables necessary to run OpenVSP. ​
- +
ubuntu_instructions.1557062756.txt.gz · Last modified: 2019/05/05 06:25 by liam