lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.52k stars 207 forks source link

v6.2 fails to crosscompile to 32 bit archs (linux) #918

Closed dkwo closed 3 months ago

dkwo commented 3 months ago

(the previous issue in 6.1 was fixed https://github.com/lxc/incus/issues/861) this time i do not get many info, see an excerpt here:

github.com/minio/minio-go/v7/pkg/encrypt
github.com/minio/minio-go/v7/pkg/set
github.com/minio/minio-go/v7/pkg/credentials
github.com/minio/minio-go/v7/pkg/notification
github.com/minio/minio-go/v7
github.com/lxc/incus/v6/internal/server/storage/s3
github.com/lxc/incus/v6/internal/server/storage/drivers
github.com/lxc/incus/v6/internal/server/storage/s3/miniod
=> ERROR: incus-6.2.0_1: do_build: 'go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}' exited with 1
=> ERROR:   in do_build() at common/build-style/go.sh:53

Error: Process completed with exit code 1.

this happens when crosscompiling on void linux to i686, armv7l, armv6l https://github.com/void-linux/void-packages/pull/50251 (host is 64, target is 32)

stgraber commented 3 months ago

Yeah, not having an actual build error is a bit of a problem to figure this one out.

stgraber commented 3 months ago

Do you have a link to the full build log?

stgraber commented 3 months ago
CC="cc" CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" go install -v -tags "libsqlite3"  ./...
github.com/lxc/incus/v6/internal/server/seccomp
# github.com/lxc/incus/v6/internal/server/seccomp
internal/server/seccomp/sysinfo_32.go:11:23: invalid operation: s.Bufferram / s.Unit (mismatched types uint64 and uint32)
internal/server/seccomp/sysinfo_32.go:12:21: invalid operation: s.Freeram / s.Unit (mismatched types uint64 and uint32)
internal/server/seccomp/sysinfo_32.go:13:22: invalid operation: s.Freeswap / s.Unit (mismatched types uint64 and uint32)
internal/server/seccomp/sysinfo_32.go:15:23: invalid operation: s.Sharedram / s.Unit (mismatched types uint64 and uint32)
internal/server/seccomp/sysinfo_32.go:16:22: invalid operation: s.Totalram / s.Unit (mismatched types uint64 and uint32)
internal/server/seccomp/sysinfo_32.go:17:23: invalid operation: s.Totalswap / s.Unit (mismatched types uint64 and uint32)
make: *** [Makefile:37: build] Error 1
dkwo commented 3 months ago

thanks. the patch fixes the build error on 32 bit.