Compiling Slic3r PE on Arch Linux

Compiling Slic3r PE on Arch Linux

Prusa Research doesn't always provide binary releases for Slic3r PE, especially for Release Candidates or minor releases.

If want to run the latest (development) edition of Slic3r PE yourself and are using Arch Linux as your OS, you can do this quite easily. There are only a few steps needed to get your own build of Slic3r PE!

Installing Prerequisites

The first step is to install the prerequisite software using yaourt.(I am using Yaourt as my default package manager and Ninja as a replacement for make, however please feel free to use any other)

Slic3r requires a C++ compiler that supports most of the C++11 specification. If your environment doesn't have it installed yet, please do so (including a few other necessities):

yaourt -S gccyaourt -S boostyaourt -S gityaourt -S curlyaourt -S cmakeyaourt -S ninja

Next, install the following Perl packages/libraries as Slic3r is partly built on Perl:

yaourt -S cpanminusyaourt -S perl-local-libyaourt -S perl-alien-wxwidgetsyaourt -S eigen32yaourt -S perl-extutils-cppguessyaourt -S perl-extutils-typemapyaourt -S perl-extutils-typemaps-defaultyaourt -S perl-extutils-xsppyaourt -S perl-opengl

Get Slic3r PE

Now that all the prerequisites are installed (hopefully without any errors), you can install Slic3r PE itself:

git clone git:// Slic3r

By default, the master branch is checkout in the cloned folder. If you feel less adventurous and like to compile the stable version, you can checkout the stable branch instead:

git checkout -b origin/stable

Update Slic3r PE

Should you have had Slic3r PE downloaded already, you can update the latest updates as follows:

cd Slic3rgit pull

Building Slic3r PE

Once Slic3r PE has been downloaded, you can start building it. This step is split in two parts. First, you need to compile the Perl dependencies:

perl Build.PL // for building the CLI versionperl Build.PL --gui // for building the GUI version

And lastly, you need to compile the Slic3r C++ library:

mkdir build // This needs to be created into the cloned repository directory e.g. "Slic3r"cd buildcmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Releaseninja

Note that this step can take a while. So, time for that well earned coffee!

Once the compilation has been completed (hopefully without any errors), you can start your own Slic3r PE brew (from the cloned repository directory, e.g. "Slic3r"):

perl // CLI versionperl --gui // GUI version

I hope this helps anybody who is trying to build the latest Slic3r PE installed on their Arch Linux OS. The above steps do not describe how to create a binary. You can find a lot more information on the official Slic3r PE Github if you like to know more about that.

Blog Comments powered by Disqus.