Failed to compile apptainer on Ubuntu 22.04.4 LTS.

66 views
Skip to first unread message

Hongyi Zhao

unread,
Jun 11, 2024, 9:23:19 AMJun 11
to golang-nuts
On Ubuntu 22.04.4 LTS, I tried to compile the latest GitHub version of apptainer using the guidance [here](https://github.com/apptainer/apptainer/blob/main/INSTALL.md), but failed at the `make` step:

```shell
$ go version
go version devel go1.23-62711d61e5 Thu May 23 03:44:19 2024 +0000 linux/amd64
$ sudo apt-get install -y     build-essential     libseccomp-dev     pkg-config     uidmap     squashfs-tools     fakeroot     cryptsetup     tzdata     curl wget git

$ cd "/home/werner/Public/repo/github.com/apptainer/apptainer.git"
$ proxychains-ng-country-control go mod download
$ ./mconfig
$ cd builddir
$ make
 GEN GO DEP /home/werner/Public/repo/github.com/apptainer/apptainer.git/builddir/starter.deps
 GEN GO DEP /home/werner/Public/repo/github.com/apptainer/apptainer.git/builddir/apptainer.deps
 GEN GO DEP /home/werner/Public/repo/github.com/apptainer/apptainer.git/builddir/starter.deps
 GO apptainer
    [+] GO_TAGS "containers_image_openpgp sylog oci_engine apptainer_engine fakeroot_engine apparmor selinux seccomp"
package github.com/apptainer/apptainer/cmd/apptainer
imports github.com/apptainer/apptainer/cmd/internal/cli
imports github.com/apptainer/apptainer/internal/app/apptainer
imports github.com/apptainer/apptainer/internal/pkg/runtime/engine/oci
imports github.com/apptainer/apptainer/internal/pkg/runtime/engine/config/starter: build constraints exclude all Go files in /home/werner/Public/repo/github.com/apptainer/apptainer.git/internal/pkg/runtime/engine/config/starter
make: *** [Makefile:181: apptainer] Error 1
```

Any tips for fixing this problem? See here [1] for the related discussion.


Regards,
Zhao

Hongyi Zhao

unread,
Jun 11, 2024, 9:29:07 AMJun 11
to golang-nuts
I found that the issue was due to using the self-compiled latest git commit version of Go. Switching to the latest stable version of Go solved the problem.
Reply all
Reply to author
Forward
0 new messages