Compiling Singularity-CE-3.10.0 on Rocky Linux 8

The Official Documentation can be found at

Prerequisites 1 – Go

Go to the Download Page to download the Linux Version.

Extract the archive you downloaded into /usr/local, creating a Go tree in /usr/local/go.

This step below will remove a previous installation at /usr/local/go, if any, prior to extracting. Please back up any data before proceeding.

% rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz

Add /usr/local/go/bin to the PATH environment variable. You can do this by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation):

export PATH=$PATH:/usr/local/go/bin

Verify the Installation with the command

% go version

Compiling Singularity

To download Singularity, do visit the download site. Singularity uses a build system called makeit. mconfig is called to generate Makefile and them make is used to compile and install

% git clone --recurse-submodules
% cd singularity
% ./mconfig --prefix=/usr/local/singularity-ce-3.10.0
% cd builddir
% make
% make install
 checking: header linux/securebits.h... yes
 checking: header linux/capability.h... yes
 checking: libseccomp+headers... yes
 checking: conmon source... no

conmon source not found

Unless you are building --without-conmon you must 'git clone --recurse-submodules'
or 'git submodule update --init'.

You may want to install glib2-devel, delete the singularity directory and make the singularity again.

% dnf install glib2-devel

Remote the cloned singularity directory and git clone again

% rm -Rv --force singularity
% git clone --recurse-submodules

Recompile with mconfig again. If successful, it should be something like

=> generating fragments ...
=> building Makefile ...
=> generating singularity-ce.spec ...
=> project singularity-ce setup with :
    - host arch: x86_64
    - host wordsize: 64-bit
    - host C compiler: cc
    - host Go compiler: /usr/local/go-1.18.3/bin/go
    - host system: unix
    - target arch: x86_64
    - target wordsize: 64-bit
    - target C compiler: cc
    - config profile: release
    - SUID install: yes
    - Network plugins: yes
    - seccomp support: yes
    - Build conmon: yes
    - verbose: no
    - cryptsetup: /usr/sbin/cryptsetup
    - version: 3.10.0+21-g1b1a05ff8
% cd builddir
% make
% make install


As long as you see a cow your installation is working properly…….

% singularity run library://godlovedc/funny/lolcow
< Exercise caution in your daily affairs. >
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


  3. Compiling Singularity-CE-3.9.2 on CentOS-7