Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

Building On Unix

To build SassC, you must either have a local copy of the LibSass sources or LibSass must already be installed in your system as a (shared) library with development headers available (See LibSass build instruction for further reference). LibSass and SassC can be built either via provided Makefiles (preferred for local development) or via autotools (preferred for system installs).

Using the CI bootstrap script

This will need a git client available to fetch the dependencies.

  1. Clone the SassC repo

    git clone
  2. Run CI bootstrap script and import env-variables

    . sassc/script/bootstrap
  3. Execute make to compile all sources

    make -C sassc -j4

    Make sure you are using GNU make, on some systems it may be called gmake.

  4. The binary should be created in the bin folder

    ./sassc/bin/sassc [input file] > output.css
  5. Optionally install the resulting binary

    PREFIX="/usr" make -C sassc install

Environment variables for custom source locations

In case you have already cloned LibSass or the spec tests in any other location, you can set the following environment variables. To make these locations permanent add them to your .profile or .bash_profile in your home directory:


Manually building from git sources via github

git clone
git clone
make -C sassc -j4
sassc/bin/sassc --version

Manually building from tar sources via github

Note: it is not really recommended to use archive downloads from github, as the build will show "na" as the compiled version, since the info will be directly derived from the git version (until you pass the information manually to the build call)!

# select tagged versions
# download from github and unpack in one go
curl -L${SASSC_VERSION}.tar.gz | tar -xz;
curl -L${LIBSASS_VERSION}.tar.gz | tar -xz;
# set environment variable for sassc makefile
# create version files for standalone build
# compile libsass and sassc binary
make -C sassc-${SASSC_VERSION} -j4
# check version of resulting binary
sassc-${SASSC_VERSION}/bin/sassc --version

Build via autoconfig (preferred for system installs)

Please read libsass autotools build instructions first!
LibSass must be compiled first with corresponding settings!
Here we will compile and use LibSass as a shared library!

Get the sources

# using git is preferred
git clone
git clone


In order to run autotools you need a few tools installed on your system.

apt-get install autotools-dev autoconf libtool # Alpine
yum install automake libtool # RedHat Linux
emerge -a automake libtool # Gentoo Linux
pkgin install automake libtool # SmartOS

Compile LibSass

Create configure script

cd libsass
autoreconf --force --install
cd ..

Create custom makefiles

cd libsass
./configure \
  --disable-tests \
  --enable-shared \
cd ..

Build the library

make -C libsass -j4

Install the library

make -C libsass install

Compile SassC

Create configure script

cd sassc
autoreconf --force --install
cd ..

Create custom makefiles

cd sassc
./configure \
cd ..

Build the binary

make -C sassc -j4

Install the binary

The binary will be installed to the location given as prefix to configure.
This is standard behavior for autotools and not sassc specific.

make -C sassc install
sassc --version