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 710962 - error: 'F_DUPFD_CLOEXEC' undeclared (first use in this function)
error: 'F_DUPFD_CLOEXEC' undeclared (first use in this function)
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.39.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-10-27 12:26 UTC by Ryan Schmidt
Modified: 2013-10-27 20:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsubprocess: Fall back to plain F_DUPFD+fcntl for OS X (1.75 KB, patch)
2013-10-27 14:22 UTC, Colin Walters
committed Details | Review

Description Ryan Schmidt 2013-10-27 12:26:56 UTC
Building glib 2.39.0 fails on OS X 10.6.8 with Xcode 3.2.6 and Apple gcc-4.2:

gsubprocess.c: In function 'child_setup':
gsubprocess.c:255: error: 'F_DUPFD_CLOEXEC' undeclared (first use in this function)
gsubprocess.c:255: error: (Each undeclared identifier is reported only once
gsubprocess.c:255: error: for each function it appears in.)
mv -f .deps/libgio_2_0_la-gsocketoutputstream.Tpo .deps/libgio_2_0_la-gsocketoutputstream.Plo
gsubprocess.c: In function 'unix_open_file':
gsubprocess.c:318: error: 'O_CLOEXEC' undeclared (first use in this function)
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -I/opt/local/include -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I../glib -I../glib -I.. -I../gmodule -DG_ENABLE_DEBUG -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\"  -I/opt/local/include -D_REENTRANT   -xobjective-c -pipe -Os -fstrict-aliasing -arch x86_64 -MT libgio_2_0_la-gsimpleproxyresolver.lo -MD -MP -MF .deps/libgio_2_0_la-gsimpleproxyresolver.Tpo -c -o libgio_2_0_la-gsimpleproxyresolver.lo `test -f 'gsimpleproxyresolver.c' || echo './'`gsimpleproxyresolver.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I../glib -I../glib -I.. -I../gmodule -DG_ENABLE_DEBUG -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/opt/local/lib/gio/modules\" -I/opt/local/include -D_REENTRANT -xobjective-c -pipe -Os -fstrict-aliasing -arch x86_64 -MT libgio_2_0_la-gsrvtarget.lo -MD -MP -MF .deps/libgio_2_0_la-gsrvtarget.Tpo -c gsrvtarget.c  -fno-common -DPIC -o .libs/libgio_2_0_la-gsrvtarget.o
make[4]: *** [libgio_2_0_la-gsubprocess.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

Full log:

https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/21731/steps/compile/logs/stdio
Comment 1 Colin Walters 2013-10-27 14:22:04 UTC
Created attachment 258217 [details] [review]
gsubprocess: Fall back to plain F_DUPFD+fcntl for OS X

Since it apparently doesn't have F_DUPFD_CLOEXEC.
Comment 2 Colin Walters 2013-10-27 14:22:42 UTC
Only compile tested on gnome-continuous which is Linux/glibc; please let me know if it works for you!
Comment 3 Matthias Clasen 2013-10-27 14:40:35 UTC
Review of attachment 258217 [details] [review]:

Looks good
Comment 4 Ryan Schmidt 2013-10-27 14:42:44 UTC
I should clarify that glib 2.39.0 builds fine on OS X 10.9 Mavericks, OS X 10.8 Mountain Lion, and OS X 10.7 Lion, but fails on OS X 10.6 Snow Leopard (and maybe earlier).