Incus on Opensuse Tumbleweed. Building from source questions

I am trying to find out if I am wasting my time trying to build Incus from source on Opensuse. Is there a reason there isn’t an approved way to do this yet? Am I wasting my time, because it will never work, even if I manage to get it compiled? I got make deps to run without any errors but make still doesn’t work. I’m just desperate to get this on Opensuse because I used LXD all the time when it could run other distros than Ubuntu. Any help is appreciated!

Show your error message(s)?

I took the instructions for Debian/Ubuntu from How to install Incus - Incus documentation and just replaced any package name which didn’t exist directly under OpenSUSE.

That got me:

zypper install acl attr autoconf automake dnsmasq git go libacl-devel libcap-devel liblxc1 liblxc-devel sqlite3-devel libtool libudev-devel liblz4-devel libuv-devel make pkg-config rsync squashfs tar tcl xz ebtables

Then did the git clone, followed by make deps, putting the env variables in place and finally make. This resulted in the expected incus and incusd binaries.

suse:~/incus # ~/go/bin/incusd --verbose
INFO   [2024-04-15T14:11:08Z] Starting up                                   mode=normal path=/var/lib/incus version=6.0.0
ERROR  [2024-04-15T14:11:08Z] Unable to parse system idmap                  err="No map found for user"
INFO   [2024-04-15T14:11:08Z] Kernel features:                             
INFO   [2024-04-15T14:11:08Z]  - closing multiple file descriptors efficiently: yes 
INFO   [2024-04-15T14:11:08Z]  - netnsid-based network retrieval: yes      
INFO   [2024-04-15T14:11:08Z]  - pidfds: yes                               
INFO   [2024-04-15T14:11:08Z]  - pidfds for threads: no                    
INFO   [2024-04-15T14:11:08Z]  - core scheduling: no                       
INFO   [2024-04-15T14:11:08Z]  - uevent injection: yes                     
INFO   [2024-04-15T14:11:08Z]  - seccomp listener: yes                     
INFO   [2024-04-15T14:11:08Z]  - seccomp listener continue syscalls: yes   
INFO   [2024-04-15T14:11:08Z]  - seccomp listener add file descriptors: yes 
INFO   [2024-04-15T14:11:08Z]  - attach to namespaces via pidfds: yes      
INFO   [2024-04-15T14:11:08Z]  - safe native terminal allocation: yes      
INFO   [2024-04-15T14:11:08Z]  - unprivileged binfmt_misc: yes             
INFO   [2024-04-15T14:11:08Z]  - unprivileged file capabilities: yes       
INFO   [2024-04-15T14:11:08Z]  - cgroup layout: cgroup2                    
WARNING[2024-04-15T14:11:08Z]  - Couldn't find the CGroup memory swap accounting, swap limits will be ignored 
INFO   [2024-04-15T14:11:08Z]  - idmapped mounts kernel support: yes       
INFO   [2024-04-15T14:11:08Z] Instance type operational                     driver=lxc features="map[]" type=container
WARNING[2024-04-15T14:11:08Z] Instance type not operational                 driver=qemu err="QEMU command not available for CPU architecture" type=virtual-machine
INFO   [2024-04-15T14:11:08Z] Initializing local database                  
INFO   [2024-04-15T14:11:08Z] Set client certificate to server certificate  fingerprint=67623a6557f077d9206d36c571f2f60924e3d486321cbba14570eff30620d7b8
INFO   [2024-04-15T14:11:08Z] Starting database node                        id=1 local=1 role=voter
INFO   [2024-04-15T14:11:08Z] Loading daemon configuration                 
INFO   [2024-04-15T14:11:08Z] Binding socket                                socket=/var/lib/incus/guestapi/sock type="devIncus socket"
INFO   [2024-04-15T14:11:08Z] Binding socket                                socket=/var/lib/incus/unix.socket type="REST API Unix socket"
INFO   [2024-04-15T14:11:08Z] Initializing global database                 
INFO   [2024-04-15T14:11:08Z] Connecting to global database                
INFO   [2024-04-15T14:11:08Z] Connected to global database                 
INFO   [2024-04-15T14:11:08Z] Initialized global database                  
WARNING[2024-04-15T14:11:08Z] Firewall failed to detect any compatible driver, falling back to "xtables" (but some features may not work as expected due to: Backend command "iptables" missing) 
INFO   [2024-04-15T14:11:08Z] Firewall loaded driver                        driver=xtables
INFO   [2024-04-15T14:11:08Z] Initializing storage pools                   
INFO   [2024-04-15T14:11:08Z] Initializing daemon storage mounts           
INFO   [2024-04-15T14:11:08Z] Initializing networks                        
INFO   [2024-04-15T14:11:08Z] All networks initialized                     
INFO   [2024-04-15T14:11:08Z] Cleaning up leftover image files             
INFO   [2024-04-15T14:11:08Z] Done cleaning up leftover image files        
INFO   [2024-04-15T14:11:08Z] Starting device monitor                      
INFO   [2024-04-15T14:11:08Z] Initialized filesystem monitor                driver=fanotify path=/dev
INFO   [2024-04-15T14:11:08Z] Started seccomp handler                       path=/run/incus/seccomp.socket
INFO   [2024-04-15T14:11:08Z] Pruning expired images                       
INFO   [2024-04-15T14:11:08Z] Done pruning expired images                  
INFO   [2024-04-15T14:11:08Z] Pruning expired backups                      
INFO   [2024-04-15T14:11:08Z] Done pruning expired backups                 
INFO   [2024-04-15T14:11:08Z] Updating instance types                      
INFO   [2024-04-15T14:11:08Z] Daemon started                               
INFO   [2024-04-15T14:11:08Z] Pruning resolved warnings                    
INFO   [2024-04-15T14:11:09Z] Expiring log files                           
INFO   [2024-04-15T14:11:09Z] Updating images                              
INFO   [2024-04-15T14:11:09Z] Done pruning resolved warnings               
INFO   [2024-04-15T14:11:09Z] Done updating images                         
INFO   [2024-04-15T14:11:09Z] Done expiring log files                      
INFO   [2024-04-15T14:11:09Z] Done updating instance types                 

I will as soon as I find out if I am wasting my time even doing this…
I’m not new to compiling from source, but I have never tried it without something that doesn’t already have a src for the distro so to speak

Show home:cmspam:branches:home:MaxxedSUSE - openSUSE Build Service seems to be usually kept up to date too with a 6.0 build having been pushed to it (though maybe not built yet).

ok almost there. Got a bit further with your instructions than I did before.
Errors:…/…/go/pkg/mod/ package cmp is not in GOROOT (/usr/src/cmp)
…/…/go/pkg/mod/ package log/slog is not in GOROOT (/usr/src/log/slog)
shared/util/boolean.go:4:2: package slices is not in GOROOT (/usr/src/slices)
make: *** [Makefile:37: build] Error 1

Can you show go version?

$ go version
go version go1.18 gccgo (SUSE Linux) 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23] linux/amd64

You need Go 1.21 at minimum, which is what I got here on current OpenSUSE Tumbleweed when installing the go package.

you’re a genius stgraber! got it compiled. Had a wrong version of gcc-go or something.