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

Can this lib support AIX OS and ppc64 ARCH? #39

Closed
gdtdpt opened this issue Aug 22, 2019 · 2 comments
Closed

Can this lib support AIX OS and ppc64 ARCH? #39

gdtdpt opened this issue Aug 22, 2019 · 2 comments

Comments

@gdtdpt
Copy link

gdtdpt commented Aug 22, 2019

I want to cross compile filebeat to GOOS=aix GOARCH=ppc64 environment.
I try to change some libs to the newest which had supported aix platform.
But I got an error from ../vendor/github.com/elastic/go-txfile/internal/vfs/osfs/lock_other.go:39:9: undefined: unix.Flock.
I found that unix.Flock is from golang.org/x/sys/unix and golang.org/x/sys/unix lib has supported aix with the file names zsyscall_aix_ppc64.go.
But there is not Flock function in it and I don't know how to change Flock function to any other functions in zsyscall_aix_ppc64.go.

So I get stuck. Can anyone help me?

@urso
Copy link

urso commented Sep 2, 2019

I think on AIX you need fcntl to properly lock a file. This requires some more effort. On Windows go-txfile uses the github.com/gofrs/flock package. One could modify the internal osfs package to always use flock, independent on OS, or use it for windows and AIX only. Problem is: the flock package does not implement flock on AIX, but this PR introduces flock support for AIX: gofrs/flock#40

@gdtdpt
Copy link
Author

gdtdpt commented Oct 25, 2019

@urso thank you for your reply.

@gdtdpt gdtdpt closed this as completed Oct 25, 2019
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

2 participants