When pkg-config-0.28 is configured with "--with-internal-glib" the following error occurs on systems running older Kernels that don't have PR_SET_NAME defined for prctl(2): [...] CC gthread-posix.lo gthread-posix.c: In function `g_system_thread_set_name': gthread-posix.c:1175: error: `PR_SET_NAME' undeclared (first use in this function) gthread-posix.c:1175: error: (Each undeclared identifier is reported only once gthread-posix.c:1175: error: for each function it appears in.) I believe that the following patch can fix it (at least it worked for me here on a RHEL4 system running kernel 2.6.9-100.ELsmp): *** glib/glib/gthread-posix.c.orig 2015-09-14 12:18:16.000000000 -0400 --- glib/glib/gthread-posix.c 2015-09-14 12:18:35.000000000 -0400 *************** *** 1171,1177 **** void g_system_thread_set_name (const gchar *name) { ! #ifdef HAVE_SYS_PRCTL_H prctl (PR_SET_NAME, name, 0, 0, 0, 0); #endif } --- 1171,1177 ---- void g_system_thread_set_name (const gchar *name) { ! #if HAVE_SYS_PRCTL_H && defined PR_SET_NAME prctl (PR_SET_NAME, name, 0, 0, 0, 0); #endif }
Thanks for the patch. This was actually fixed in upstream glib quite a while ago (https://git.gnome.org/browse/glib/commit/?id=23a2136fb5dd860a57a9bd46e61099ea4da99447). That fix is included in the updated glib snapshot in git master (http://cgit.freedesktop.org/pkg-config/tree/glib/glib/gthread-posix.c#n1187). Closing as resolved and will be in the next release.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.