GNOME Bugzilla – Bug 726614
The build does not honour HAVE_LINUX_PRCTL_H 0
Last modified: 2014-03-24 14:45:47 UTC
The src/chess-engine.c comes precooked in the dist file. Because of that linux/prctl.h is included in src/chess-engine.c even if in the configure we find we don't have linux/prctl.h (HAVE_LINUX_PRCTL_H 0). Removing src/chess-engine.c before the build forces the regeneration of that file and thus honouring HAVE_LINUX_PRCTL_H 0.
D'oh. I suspect it won't be possible to fix this from Vala. Maybe I can use conditionals in the vapi? Not sure....
Does it help? http://mterry.name/log/2011/10/10/vala-autotool-tricks/
Created attachment 272608 [details] [review] Do not unconditionally call prctl in distributed C The existing check for linux/prctl.h works great if you are compiling the Vala code, but it's expected that users and distributions may start with the distributed C files instead. If the tarball is generated on Linux, then the call to prctl() will unconditionally appear in the distributed C, and if the tarball isn't generated on Linux, then it will be unconditionally absent. There are only two ways to fix this: (a) not distribute any C code, or (b) move the conditional compilation out of the Vala code. Though it looks like the Autotools Vala world may be starting to lean towards (a), let's be conservative and pick (b) for now.
Can you please try this sample tarball and confirm that it fixes the issue? Thanks! https://people.gnome.org/~mcatanzaro/gnome-chess-bgo726614.tar.xz
This fixed the build. Looks fine.
OK, this is fixed in gnome-3-10 and gnome-3-8. If it gets a freeze exception it'll go into 3.12, otherwise 3.12.1. Thanks for reporting!
I'm pushing this now, but we decided not to break freeze for this, so it's going in after 3.12.0. Sorry about that.
Attachment 272608 [details] pushed as bdd5ff6 - Do not unconditionally call prctl in distributed C