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
FTBFS, possibly related to changes in libcap #6727
Comments
Experiencing the same issue on Arch Linux. |
Turns out this is a security measure in the cgo compiler. It operates with a whitelist where only some flags are allowed in It seems like
|
@grawlinson I'm preparing lxd for inclusion into Arch Linux. Current packaging files can be found here; https://github.com/Foxboron/lxd-repo |
Can one of you send a PR that tweaks our Makefile to export this? Hopefully there's a way to just set the variable once in the Makefile and call it done :) |
libcap 1.29 was extended to support go, in turn adding some extensions to the distributed pkgconfig files [1]. By default for security reasons, the cgo compiler only allows -D, -I, and -l however allows us to extend this by adding a regex filter to CGO_ALLOW_LDFLAGS [2]. It should be noted that libcap implement the same in their build systems [3], but use a more relaxed ALLOW regex. Restrict ours as it probably shouldn't be too wide. Fixes: lxc#6727 [1]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1a61e6f395f2d2784365920872c14d9f69ff8cf1 [2]: https://golang.org/cmd/cgo/ [3]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=b2b267ef1c83f1f3d3105a4bb84f8bebbc130dec Signed-off-by: Morten Linderud <morten@linderud.pw>
@stgraber Pushed and added some documentation to the commit :) EDIT: Beer and rebase when you accidentally push stuff isn't ideal |
libcap 1.29 was extended to support go, in turn adding some extensions to the distributed pkgconfig files [1]. By default for security reasons, the cgo compiler only allows -D, -I, and -l however allows us to extend this by adding a regex filter to CGO_ALLOW_LDFLAGS [2]. It should be noted that libcap implement the same in their build systems [3], but use a more relaxed ALLOW regex. Restrict ours as it probably shouldn't be too wide. Fixes: lxc#6727 [1]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1a61e6f395f2d2784365920872c14d9f69ff8cf1 [2]: https://golang.org/cmd/cgo/ [3]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=b2b267ef1c83f1f3d3105a4bb84f8bebbc130dec Signed-off-by: Morten Linderud <morten@linderud.pw>
libcap 1.29 was extended to support go, in turn adding some extensions to the distributed pkgconfig files [1]. By default for security reasons, the cgo compiler only allows -D, -I, and -l however allows us to extend this by adding a regex filter to CGO_ALLOW_LDFLAGS [2]. It should be noted that libcap implement the same in their build systems [3], but use a more relaxed ALLOW regex. Restrict ours as it probably shouldn't be too wide. Fixes: lxc#6727 [1]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1a61e6f395f2d2784365920872c14d9f69ff8cf1 [2]: https://golang.org/cmd/cgo/ [3]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=b2b267ef1c83f1f3d3105a4bb84f8bebbc130dec Signed-off-by: Morten Linderud <morten@linderud.pw>
libcap 1.29 was extended to support go, in turn adding some extensions to the distributed pkgconfig files [1]. By default for security reasons, the cgo compiler only allows -D, -I, and -l however allows us to extend this by adding a regex filter to CGO_ALLOW_LDFLAGS [2]. It should be noted that libcap implement the same in their build systems [3], but use a more relaxed ALLOW regex. Restrict ours as it probably shouldn't be too wide. Fixes: lxc#6727 [1]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1a61e6f395f2d2784365920872c14d9f69ff8cf1 [2]: https://golang.org/cmd/cgo/ [3]: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=b2b267ef1c83f1f3d3105a4bb84f8bebbc130dec Signed-off-by: Morten Linderud <morten@linderud.pw>
I discovered that |
Issue description
In November, libcap implemented some changes to support shared capability state across threads. The release notes specifically mention Go. Oddly enough, LXD 3.18 did not seem to take issue with these changes. But on 3.19 I am seeing a build error.
libcap release notes: https://sites.google.com/site/fullycapable/release-notes-for-libcap/releasenotesfor228pending
LXD build error:
The text was updated successfully, but these errors were encountered: