Overview
Request 1006602 revoked
fix build by disabling gcc error options -Werror=implicit-function-declaration and -Werror=incompatible-pointer-types; re-enable FORTIFY_SOURCE=3
- Created by ojkastl_buildservice
- In state revoked
- Package maintainers: cyphar and ojkastl_buildservice
Loading...
Request History
ojkastl_buildservice created request
fix build by disabling gcc error options -Werror=implicit-function-declaration and -Werror=incompatible-pointer-types; re-enable FORTIFY_SOURCE=3
ojkastl_buildservice revoked request
This is problematic as fortify relies on not having implicit function declarations. isn't there a better way to fix this by e.g. working on the implicit function declarations being fixed by adding the right includes?
I think you need the changes from https://github.com/lxc/lxc/pull/4179, e.g. the first change "build: detect where struct mount_attr is declared" should fix the incompatible pointers. Some of the subsequent changes look like they are adding includes to get explicit function declarations.
In any event, be careful with disabling these warnings, they are just warnings because traditionally C is very permissive (they are hard errors in C++) and detect type mismatches that can result in all kinds of undefined behavior.
Though updating to version 5 should also fix the errors, it seems that contains these changes already.
Or maybe not, given that you're seeing the errors in your branch on version 5. But e.g. this change
should most definitely fix
by changing the type of
attr
.LXC 5.0 switched to meson for builds so we need to switch to that as well...
Yes, that is the reason why fixing the build was not that easy.
I have too little experience with meson and could not get it building in the little time I had to spend on this.
See https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_Virtualization_containers/lxc where I started converting the package to meson...
I've already got something that's mostly working, the main issue is the custom template files we have. We can drop missing_setuid.txt.in since Leap 15.1 has long since stopped being supported, and I suspect we can just sed the one variable being used by lxc-createconfig.in.
@cyphar, @ojkastl_buildservice: review reminder
Please see the new SR#1029999
I backported the fix that Aaron mentioned.