Due to a bug in the private heap manager, requires the -noPHM flag.
The examples minimal and mandelbrot will work without it, but mandelbrot2 will result in a segmentation fault.
Note that the zoom selection in the mandelbrot code is not actually implemented correctly; feel free to fix it :)
This is a SaC module that wraps around the SDL3 library and can be used for visualisation or graphical interfaces.
You'll need to have installed sac2c and its standard library.
You'll also need to have at least pthreads and the SDL3 C-library (libsdl3-dev libsdl3-image-dev libsdl3-ttf-dev).
The project uses cmake-common. Upon cloning this repo it is important initialize submodules.
git submodule update --init --recursive
makeWhen running CMake it is possible to pass the following variables:
-
-DTARGETS=x;y;z: build for targets x, y and z.Default:
seq;seq_checks;mt_pth -
-DSAC2C_EXEC=/path/to/sac2c: specifysac2cexecutable directly. Otherwise CMake will try to find it on your path. -
-DLINKSETSIZE=n: This option is responsible for the number of C functions that are put in a single C file when compiling a SaC program. The rule of thumb:-
0is the fastest time-wise but potentially results in a large memory consumption. -
1reduces the memory consumption to minimum, buy significantly increases compilation time.Default: 500
-
This is an example, you might have to adjust these commands to work for your setup.
xhost +local:docker
docker pull sacbase/sac-compiler:latest
docker run -it --rm \
-e DISPLAY=$DISPLAY \
-e SDL_VIDEODRIVER=x11 \
-e LIBGL_ALWAYS_SOFTWARE=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$(pwd):/home" \
sacbase/sac-compiler:latest