-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG]: compilation fails with GOOS=aix
(Unix)
#2035
Comments
GOOS=aix
(Unix)GOOS=aix
(Unix)
Per the codebase, this issue affects all versions of Badger, including v4. The recommendation is use the mechanism used in this internal package (godoc) of Go cmd: https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/cmd/go/internal/lockedfile/internal/filelock/. Or you could use rogepeppe package: https://pkg.go.dev/github.com/rogpeppe/go-internal/lockedfile. |
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open. |
Keep. This issue is easily solvable and affects downstream. |
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open. |
Keep |
AIX doesn't support a proper flock like linux, but it seems to have enough support for process level file locking using fcntl. For dgraph-io#2035
AIX doesn't support a proper flock like linux, but it seems to have enough support for process level file locking using fcntl. For dgraph-io#2035
AIX doesn't support a proper flock like linux, but it seems to have enough support for process level file locking using fcntl. For dgraph-io#2035
What version of Badger are you using?
What version of Go are you using?
Go1.21.5
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, CPU, OS)?
RAM & CPU: Not sure, whatever Github Actions uses (reproduced here).
OS: AIX
What steps will reproduce the bug?
Build with:
GOOS=aix GOARCH=ppc64 go build
Expected behavior and actual result.
Expectation:
Successful compilation
Actual result:
Additional information
The issue is that Badger uses
unix.Flock
from thegolang.org/x/sys/unix
, but the referenced function is not available in the referenced dependency for AIX. The syscall exists in AIX, but not exposed/available in thex/sys/unix
package. This has been reported upstream (golang/go#64669).Badger v1 and v2 is an indirect dependency for Caddy, which is how we come across this issue. This was reported by one of the users who was attempting to compile Caddy for AIX (see caddyserver/caddy#5970). This isn't directly an error of badger. We've already reported it upstream (see golang/go#64669). I don't know if you're interested in figuring out a workaround (haven't personally tried any) or prefer to just wait for the Go ticket to be resolved by upstream.
The text was updated successfully, but these errors were encountered: