Opened 10 years ago

Last modified 2 years ago

#43203 closed defect

dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared — at Version 4

Reported by: gnurser (George Nurser) Owned by: mcalhoun@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: egall@…, gnwiii@…
Port: dbus

Description (last modified by ryandesign (Ryan Carsten Schmidt))

~ $ sudo port clean dbus
--->  Cleaning dbus
~ $ sudo port install dbus 
--->  Computing dependencies for dbus
--->  Fetching archive for dbus
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports.
--->  Attempting to fetch dbus-1.8.0_0.darwin_10.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/dbus
--->  Attempting to fetch dbus-1.8.0_0.darwin_10.x86_64.tbz2 from http://lil.fr.packages.macports.org/dbus
--->  Attempting to fetch dbus-1.8.0_0.darwin_10.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/dbus
--->  Fetching distfiles for dbus
--->  Verifying checksums for dbus
--->  Extracting dbus
--->  Applying patches to dbus
--->  Configuring dbus
--->  Building dbus
Error: org.macports.build for port dbus returned: command execution failed
Please see the log file for port dbus for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_dbus/dbus/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port dbus failed

Change History (5)

Changed 10 years ago by gnurser (George Nurser)

Attachment: main.log added

comment:1 Changed 10 years ago by cooljeanius (Eric Gallager)

O_CLOEXEC is normally defined in fcntl.h, but the fcntl.h from Darwin's Libc is just a wrapper around <sys/fcntl.h>. I am also on Snow Leopard, so I checked my <sys/fcntl.h>, and can confirm that I do not have O_CLOEXEC in mine, either. I tried checking newer versions the Darwin Libc sources on opensource.apple.com, but could not find where <sys/fcntl.h> is located in there... Anyways, the next thing I checked was Gnulib, and Gnulib's fcntl.h defines O_CLOEXEC like this:

#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it 'O_NOINHERIT'.  */
# define O_CLOEXEC O_NOINHERIT
#endif

#ifndef O_CLOEXEC
# define O_CLOEXEC 0
#endif

Gnulib also provides a cloexec.c file and a cloexec.h file that, taken together, actually implement the functionality that the O_CLOEXEC flag represents. dbus could try using these in cases when O_CLOEXEC is not available...

comment:2 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:3 Changed 10 years ago by gnw3

Cc: gnwiii@… added

Cc Me!

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to mcalhoun@…
Port: dbus added

Please remember to use WikiFormatting, to fill in the Port field, and to Cc the maintainer of that port. I've assigned the ticket to the maintainer now.

This issue was also discussed on the mailing list today. AFAIK, O_CLOEXEC is not available on 10.6 and earlier, and the developers of dbus need to be informed of this so that they can fix their software to work on older operating systems.

Note: See TracTickets for help on using tickets.