After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726614 - The build does not honour HAVE_LINUX_PRCTL_H 0
The build does not honour HAVE_LINUX_PRCTL_H 0
Product: gnome-chess
Classification: Applications
Component: General
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: Michael Catanzaro
Depends on:
Reported: 2014-03-18 07:53 UTC by Gustau Pérez i Querol
Modified: 2014-03-24 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---

Do not unconditionally call prctl in distributed C (5.12 KB, patch)
2014-03-21 23:55 UTC, Michael Catanzaro
committed Details | Review

Description Gustau Pérez i Querol 2014-03-18 07:53:31 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.
Comment 1 Michael Catanzaro 2014-03-19 02:25:50 UTC

I suspect it won't be possible to fix this from Vala.  Maybe I can use conditionals in the vapi? Not sure....
Comment 2 Ting-Wei Lan 2014-03-19 11:49:56 UTC
Does it help?
Comment 3 Michael Catanzaro 2014-03-21 23:55:35 UTC
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.
Comment 4 Michael Catanzaro 2014-03-22 00:11:38 UTC
Can you please try this sample tarball and confirm that it fixes the issue? Thanks!
Comment 5 Gustau Pérez i Querol 2014-03-22 10:03:55 UTC
This fixed the build. Looks fine.
Comment 6 Michael Catanzaro 2014-03-23 01:07:56 UTC
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!
Comment 7 Michael Catanzaro 2014-03-24 14:45:29 UTC
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.
Comment 8 Michael Catanzaro 2014-03-24 14:45:45 UTC
Attachment 272608 [details] pushed as bdd5ff6 - Do not unconditionally call prctl in distributed C