This is a brief step by step instructional tutorial to compile openscad from the latest sources hosted on github. If you want to install the ‘stable’ version for your linux distribution, then you should head to the openscad download page and grab the binary instead.
Why build from source?
I have been learning and teaching how to create mechanical 3D CAD models in openSCAD and export stl files for a while now. In this time, I have come across a number of bugs and potential feature I would like to request. One of those features is the partial rotate_extrude which is in the documentation but doesn’t work in the stable Ubuntu 16.04 binary. A quick search on the internet took me to the github repository for openscad where these bugs have already been fixed and the changes committed and merged, and the features implemented and incorporated in the latest sources. Instead of wait for my distribution to build updated binaries, I decided to take the shortcut and uninstall the official apt binaries to install from source.
Remove official stable binary
sudo apt remove openscad
Get source, build and install the binary
- Open a terminal with the key combination CTL+ATL+T
- Change into a working directory if you use a specific one
- Clone the github repository to your computer
git clone https://github.com/openscad/openscad.git
- cd inside the folder
- install the dependancies with the help of a script
- Check that all dependancies are met
- Install libzip as its required and not installed by the script
sudo apt install libzip-dev
- Generate a Makefile
- Build openscad using make and the Makefile generated. If you have a muilticore CPU you can use multiple threads with the -j argument.
sudo make install
I wanted to see that the partial rotate_extrude operator with the angle parameter set to 90 degrees works as expected, so I quickly put together the following .scad script
The results are just like I hoped. Will be testing more to see if other problems I have faced have been solved in this version 2017.05.08.