rfjakob / gocryptfs

Encrypted overlay filesystem written in Go
https://nuetzlich.net/gocryptfs/
MIT License
3.51k stars 249 forks source link

BUG: Unable to build on ARM #856

Closed pktiuk closed 1 month ago

pktiuk commented 3 months ago

Hello I tried to build this repo on ARM device (Nvidia Jetson) With Ubuntu 20.04 and I got:

user@tegra-ubuntu:~/gocryptfs$ ./build.bash
go: finding github.com/hanwen/go-fuse/v2 v2.5.0
go: downloading github.com/hanwen/go-fuse/v2 v2.5.0
go: downloading golang.org/x/crypto v0.18.0
go: downloading golang.org/x/sys v0.16.0
...
go: finding github.com/spf13/pflag v1.0.5
go: finding github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
internal/stupidgcm/cipher_suites.go:6:2: C source files not allowed when not using cgo or SWIG: cpu_gccgo_x86.c
../go/pkg/mod/github.com/hanwen/go-fuse/v2@v2.5.0/fuse/poll_linux.go:7:2: found packages unix (affinity_linux.go) and main (mkasm.go) in /home/wbuser/go/pkg/mod/golang.org/x/sys@v0.16.0/unix

I built it with commit: https://github.com/rfjakob/gocryptfs/commit/f06f27e7bc098e334024c365004f9303e79997d9

When I switched to v2.3.2 building worked.

rfjakob commented 2 months ago

Huh. Does ./build-without-openssl.bash work?

rfjakob commented 1 month ago

Maybe your Go version is too old? All green here on Debian 11 and Go 1.21.4:

$ ./build.bash 
go: downloading github.com/hanwen/go-fuse/v2 v2.5.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading golang.org/x/crypto v0.18.0
go: downloading github.com/rfjakob/eme v1.1.2
go: downloading github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
go: downloading golang.org/x/sys v0.16.0
go: downloading golang.org/x/term v0.16.0
go: downloading github.com/aperturerobotics/jacobsa-crypto v1.0.2
gocryptfs v2.4.0-34-g533c9eb; go-fuse v2.5.0; 2024-08-18 go1.21.4 linux/arm64

jakob@pi4:~/code/gocryptfs $ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
pktiuk commented 1 month ago

@rfjakob

What is minimal required go version?
In my case I used golang-1.13 (the one used with Ubuntu 20.04)

rfjakob commented 1 month ago

Go 1.18

https://github.com/rfjakob/gocryptfs/blob/master/.github/workflows/ci.yml#L16

pktiuk commented 1 month ago

Then maybe it should be defined somewhere in the building scripts to check version during build to avoid confusion?

celesteking commented 1 week ago

@rfjakob would you mind firing up AWS EC2 t4g instance, compiling the thing and putting the resulting binary into releases section please? update: it seems I'm running EL8 .. damn it.