Download and Compile Cheddar

In this page, you can find instructions to download and compile Cheddar from the source code on Linux and Windows.

Linux

Required software

To checkout the source code and compile Cheddar, the following software are required:

  • GNAT compiler GPL, we recommend using GNAT 2021 available on the AdaCore website https://www.adacore.com/download/more
  • GtkAda 2021, also available on the AdaCore website above
  • A svn client is necessary. The default subversion works fine on Linux

The instructions have been applied to compile Cheddar on Ubuntu 18.04 and 20.04 64 bits. Please contact us if you encounter problems on other Linux distributions.

Steps to follow

  1. Checkout Cheddar source code - the trunk folder on the svn repository http://beru.univ-brest.fr/svn/CHEDDAR/trunk/
  2. Install GNAT 2021
  3. Install GtkAda 2021
  4. Move to [CHEDDAR]/trunk/src with [CHEDDAR] is the folder used to checkout the Cheddar source code
  5. Edit "script/compilelinux.bash" in the script folder according to:
    • Cheddar source code location – CHEDDAR_DIR
    • Your GNAT installation – variable GNAT_DIR
    • Your GtkAda installation – variable GTKADA_DIR
  6. Run “source script/compilelinux.bash”
  7. Run “make cheddar” to produce cheddar binary. One compiled, you should have a binary either called “cheddar” and you can then run it from the directory where the binary is stored

Example

This is just an example, you need to adapt CHEDDAR_DIR, GNAT_DIR, and GTKADA according to your installation

  • The trunk repository is checked out at /home/user/cheddar/trunk
  • GNAT is installed at /opt/gnat2021
  • GtkAda is installed at /opt/gtkada2021

File: compilelinux.bash

    export CHEDDAR_DIR=/home/user/cheddar/trunk
    export GNAT_DIR=/opt/gnat2021
    export GTKADA_DIR=/opt/gtkada2021

Commands to compile and run Cheddar in the terminal

    $: cd /home/user/cheddar/trunk/src
    $: source script/compilelinux.bash
    $: make cheddar
    (...compilation, can take a while)
    $ : ./cheddar

Known issues

  1. Some texts, fonts and pixmaps do not appear in the Cheddar editor:
    • Please check that your linux installation contains GTK 2.0 libraries
    • Please also check Cheddar FAQ for font selection with GTK 2.0
  2. GNAT 2014 and gcc ABI compatibility problem on Ubuntu 18.04, 20.04, Fedora 24 and Mint 18.1 (64 bits)

    $: cd [GNAT_DIR]/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/d
    $: mv ld ld-orig
    
  3. Missing gcc-multilib

    $: sudo apt-get install gcc-multilib
    
  4. Ocarina is not compiled together with Cheddar on Mint 18.1

  5. Cheddar is running slowly on Ubuntu 20.04LTS

    $: sudo apt-get install appmenu-gtk2-module
    
  6. libffi.so.6 is missing

    • Fix: the detailed explanation of the problem can be found at https://stackoverflow.com/questions/61875869/ubuntu-20-04-upgrade-python-missing-libffi-so-6
    • Locate libffi.so.7 in your system

      $ find /usr/lib -name "libffi.so*"
      
    • Create a simlink named libffi.so.6 that points to libffi.so.7

      sudo ln -s /usr/path/to/libffi.so.7 /usr/lib/path/to/libffi.so.6
      

Windows

To compile Cheddar with Windows:

  1. Checkout Cheddar source code from its SVN repository. Official source code is in the “trunk” folder of the SVN repository.
  2. Install GNAT 2021 on your Windows machine.
  3. Install GtkAda for GNAT 2021 on your Windows machine.
  4. Launch windows “cmd” command
  5. Move to CHEDDAR/trunk/src/scripts
  6. Edit “compilewindows.bat” according to your GNAT, GtkAda and Cheddar source code installation location
  7. Run “compilewindows.bat”
  8. Go back to CHEDDAR/trunk/src
  9. Run “gnatmake –Pgpr/gprfilename” where gprfilename is the gpr file you want to compile. To produce cheddar, the gpr file for windows is "gpr/cheddar.gpr"

Virtual Box (outdated)

To compile Cheddar in a prepared Virtual Box image:

  1. Install Virtual Box on Your Computer
  2. Download the Cheddar Image from here: http://beru.univ-brest.fr/~singhoff/VBOX/cheddar_developers.vdi
  3. Create a new Ubuntu 32 bits machine, and load the Cheddar image
  4. You can now start your virtual machine.
  5. Select you keyboard layout (english by default) and connect you: password and login are both "cheddar"
  6. Open a Terminal and go to the directory contained the Cheddar Sources (~/CHEDDAR/trunk/src)
  7. Do "source compilelinux32.bash" to fix the environment
  8. Do "make" to compile (or "make cheddar" if you just want the Cheddar GUI binary)
  9. Enjoy and don't forget to give us feedbacks