====== Downloading & Installing the sac2c Eco System ======
To get started, you need to install the compiler ''sac2c'' and the standard library ''Stdlib''. Both of them can either be installed via a precompiled package or from sources.
==== Installation via packages ====
Please choose the package that matches your operating system best:
The ''rpm'' release of the compiler is designed to be installed on RedHat based distributions of Linux (e.g. RedHat, CentOS, Fedora, etc.) using the ''dnf'' or ''rpm'' tool set.
Choose and download the appropriate [[bin|packages (sac2c & stdlib)]].
Thereafter you can install them via:
$ sudo dnf install sac2c-VERSION-RELEASE.rpm
$ sudo dnf install sac-stdlib-VERSION-RELEASE.rpm
or
$ sudo rpm --install sac2c-VERSION-RELEASE.rpm
$ sudo rpm --install sac-stdlib-VERSION-RELEASE.rpm
The ''deb'' package is meant to be installed on Debian based distributions (e.g. Debian, Ubuntu, etc.) using the ''dpkg'' or the ''apt'' tool set.
Choose and download the appropriate [[bin|packages (sac2c #and# stdlib)]].
Thereafter you can install them via:
$ sudo dpkg --install sac2c-VERSION-RELEASE.deb
$ sudo dpkg --install sac-stdlib-VERSION-RELEASE.deb
or
$ sudo apt install sac2c-VERSION-RELEASE.deb
$ sudo apt install sac-stdlib-VERSION-RELEASE.deb
The ''pkg'' is an installer that will place the SaC files in the correct location on your system. Symbolic links to the SaC binaries are created in ''/usr/local/bin'' for your convenience.
Choose and download the appropriate [[bin|packages (sac2c #and# stdlib)]].
Thereafter you can install them via:
- Double click the downloaded file sac2c-VERSION-RELEASE.pkg
- A dialog box should appear that will guide you through the install process
- Confirm that you agree with our license, and click //Install// to install SaC
- The binaries ''sac2c'', ''sac2c_p'', and ''sac2c_s'' should be in your ''PATH''
- Repeat the procedure with the file sac-stdlib-VERSION-RELEASE.pkg
NB: The SaC binaries are postfixed by their release type (production or debug), so there is a ''sac2c_p'' and ''sac2c_d'' respectively, ''sac2c'' is simply a link to ''sac2c_p''.
While we do not currently support a native Windows version, you can still use it through a virtualisation layer
of your choosing. The easiest way to use ''sac2c'' on a Windows 10 system is to use Window's own virtualisation
for Linux support, the Windows Subsystem for Linux (WSL).
To do this, you have to do four things:
- You need to activate the developer mode of Windows. (Settings -> Update & Security -> For developers -> tick the Developer Mode)
- You need to activate the WSL. (Control Panel -> Programs -> Programs & Features -> Turn Features On & Off -> tick Windows Subsystem for Linux)
- Go to the Microsoft Store and choose a Linux Distribution of your choice, e.g, Ubuntu 18.04 LTS.
Choose and download the [[bin|packages (sac2c #and# stdlib)]] that match your chosen Linux Distribution.
Thereafter you can install them using that system's package manager (if in doubt, cf. the corresponding section above)!
After that, you should have the sac system up and running!
These are user contributed packages. Any documentation / help can be found through the corresponding [[bin#rd-party_packages|package locations]].
The ''.tar.gz'' archive is intended for arbitrary installs, meaning that if you can't install ''sac2c'' using one of the other packages due to system permissions, you can use this archive to install it under you home-directory. The libraries of the compiler can be placed anywhere so long as the ''sac2c'' binary (and related) know where to find them. For this reason the archive provides the ''sac2c'' binary (and related) as source code to be compiled by the end-user.
For simplicities sake, an install script is provided. It supports several flags, but the most important one is ''-i'' to indicate where you want to install everything (for example ''~/.local'').
**Be Aware** Please remember to install all dependencies of the compiler before attempting to use it
Installation of the compiler is as simple as extracting from the archive:
$ mkdir ~/temp_extract && cd ~/temp_extract
$ tar -xzf sac2c-VERSION-RELEASE.tar.gz
$ nano README # if you want more information on the install
$ bash ./install.sh -i INSTALL_DIR # and thats it
$ cd ~ && rm -rf temp_extract
In case you run into any troubles installing, please get in touch via our [[:bugzilla|community]] channels!
==== Installation from sources ====
The sources are hosted on two ''git'' servers:
The standard library is hosted on [[https://github.com/sacbase]] within the [[https://github.com/sacbase/Stdlib|Stdlib]] repository. If you do have ''sac2c'' installed (either via a package or from source), you can find instructions on how to build the Stdlib in the [[https://github.com/SacBase/Stdlib/blob/master/README.md|README]]. However, we have some more details on how to build and install the standard library [[download:building:stdlib|here]] as well; it mainly covers some issues that some users have encountered when using several versions or a mix of installed and hand-compiled versions.
If you are curious about the details on where the built modules are actually stored or on how platform dependent versions are created and kept apart you can read up about [[download:details:sbi|cross compilation and the SBI (SaC Binary Interface)]].
Contributions via pull-requests are always welcome!
The compiler is hosted on [[https://gitlab.sac-home.org]] within the [[https://gitlab.sac-home.org/sac-group/sac2c|sac-group/sac2c]] repository. As for ''github.com'', you need to create an account on ''gitlab.sac-home.org'' as well.
Build instructions can be found there in the [[https://gitlab.sac-home.org/sac-group/sac2c/-/blob/develop/README.md|README]] as well. However, we have some more details in the internal section of this dokuwiki.
To get access to those parts, you need to register on our dokuwiki as well. You can do so [[:index?do=register|here]].
Contributions via pull-requests here are also always welcome!
==== Further libraries and utilities ====
Both of the above mentioned git servers contain further goodies.
On [[https://github.com/sacbase]] these are user-oriented and contain inter alia:
* more SaC libraries: e.g. benchmarks ([[https://github.com/SacBase/LivermoreLoops|Livermore Loops]], [[https://github.com/SacBase/RodiniaBenchmark|Rodinia Benchmarks]], [[https://github.com/SacBase/NASParallelBenchmarks|NAS Parallel Benchmarks]], ...), [[https://github.com/SacBase/basic-demos|demos]], sources for the [[https://github.com/SacBase/Tutorial|codes]] of the [[:docs:tutorial|tutorial]], and various other module collections! They typically make use of our [[download:building:demos|generic Makefiles for compiling SaC programs]];
* editor/IDE stuff such as [[https://github.com/SacBase/sac-jupyter|jupyter support for sac2c]] or [[https://github.com/SacBase/vim-sac|syntax highlighting for vim]];
* docker containers related to SaC such as [[https://github.com/SacBase/sac-docker]];
* and more!
On [[https://gitlab.sac-home.org]] these are compiler-developer oriented. Examples are:
* further docker images,
* language servers,
* and various other SaC related things by several of our contributors.
Feel free to browse and contribute!