Building OpenSCAD from Source

OpenSCAD is a useful tool for 3D modeling. You create models in OpenSCAD by writing scripts composed of commands like cube or rotate to instantiate and manipulate shapes. Furthermore, you can combine shapes using constructive solid geometry operations like union or difference. So it is not a substitute for interactive modeling, but a tool for writing programs to generate models from input. For example, Thingiverse Customizer uses OpenSCAD.

openscadscreenshot

I use OpenSCAD with Linux Mint, where it is readily available via the Software Manager. However, the version available there is not the latest. Furthermore, the downloadable version of the latest release on the OpenSCAD web site does not run on my laptop, due to an unnecessarily strict glibc version dependency. So, rather than muck around with a bunch of different versions, I decided to just build the latest code available from Github. Happily, the build instructions work. Here’s a step-by-step summary for Linux (assumes you have git installed):

# download the code
git clone https://github.com/openscad/openscad.git

# enter the downloaded directory
cd openscad

# download MCAD part library, stored as a separate repository
git submodule update --init

# download and compile other dependencies (tools and libraries)
# - might take a while depending how many are already installed
scripts/uni-get-dependencies.sh
scripts/uni-build-dependencies.sh

# compile Openscad
qmake
make

Now you can run openscad from that directory, or run sudo make install to install the app for systemwide access.

Posted on Wednesday, January 22nd, 2014.