Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./main.go:279:21: undefined: fuse.AllowRoot # go1.14 darwin/amd64 #11

Closed
delfer opened this issue Apr 11, 2020 · 7 comments
Closed

./main.go:279:21: undefined: fuse.AllowRoot # go1.14 darwin/amd64 #11

delfer opened this issue Apr 11, 2020 · 7 comments

Comments

@delfer
Copy link

delfer commented Apr 11, 2020

I want to compile binary on macOS but for Linux.

➜  miquels# git clone https://github.com/miquels/webdavfs
Cloning into 'webdavfs'...
remote: Enumerating objects: 268, done.
remote: Total 268 (delta 0), reused 0 (delta 0), pack-reused 268
Receiving objects: 100% (268/268), 76.39 KiB | 221.00 KiB/s, done.
Resolving deltas: 100% (171/171), done.
➜  miquels# cd webdavfs
➜  webdavfs git:(master) go version
go version go1.14 darwin/amd64
➜  webdavfs git:(master) go get
# github.com/miquels/webdavfs
./main.go:279:21: undefined: fuse.AllowRoot
@delfer
Copy link
Author

delfer commented Apr 11, 2020

It's because of this change bazil/fuse@e0b8970

@delfer
Copy link
Author

delfer commented Apr 11, 2020

Workaround: use old Bazil's fuse:

➜  webdavfs git:(master) cd ../../../bazil.org/fuse
➜  fuse git:(master) git reset --hard d6840b2

or even 65cc252 if you use go 1.10 or older.

@miquels
Copy link
Owner

miquels commented May 20, 2020

I've added a go.mod file with a dependency on an older fuse package, now it builds again. That's a temporary fix. I'll work on a proper one.

@delfer delfer closed this as completed Mar 26, 2021
@delfer delfer reopened this Mar 26, 2021
@miquels
Copy link
Owner

miquels commented Oct 20, 2022

Not sure if this is going to get fixed properly, see 41e2206

@Arnie97
Copy link

Arnie97 commented Jan 24, 2023

In my tests, 117d633 worked on Linux, and 41e2206 did not.

$ head -1 /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"

$ go version
go version go1.15.15 linux/amd64

$ go get -v github.com/miquels/webdavfs@117d633
go: downloading github.com/miquels/webdavfs v0.0.0-20200520090810-117d63347042
go: github.com/miquels/webdavfs 117d633 => v0.0.0-20200520090810-117d63347042
go: downloading golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7
go: downloading bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
go: downloading github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3
golang.org/x/net/context
github.com/pborman/getopt/v2
bazil.org/fuse
bazil.org/fuse/fuseutil
bazil.org/fuse/fs
github.com/miquels/webdavfs

$ go get -v github.com/miquels/webdavfs
go: github.com/miquels/webdavfs upgrade => v0.0.0-20221020123835-41e220625594
github.com/miquels/webdavfs
# github.com/miquels/webdavfs
go/pkg/mod/github.com/miquels/webdavfs@v0.0.0-20221020123835-41e220625594/main.go:279:21: undefined: fuse.AllowRoot

@miquels
Copy link
Owner

miquels commented Feb 1, 2023

I have no idea what's going on here. If I do the same on a Debian 11 server it's even more mysterious:

go get -v github.com/miquels/webdavfs
....
golang.org/x/sys/unix
# golang.org/x/sys/unix
../go/src/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice
../go/src/golang.org/x/sys/unix/syscall_linux.go:2271:9: undefined: unsafe.Slice
../go/src/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
../go/src/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice

OTOH, if I just git clone the github repo, then do go build the code builds just fine. So, I suggest you do that.

@miquels
Copy link
Owner

miquels commented Apr 7, 2023

Closing this issue.

@miquels miquels closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants