#43203 closed defect (fixed)
dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared
Reported by: | gnurser (George Nurser) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | cooljeanius (Eric Gallager), gnw3, mndavidoff (Monte Davidoff), josephaw@…, ballapete (Peter "Pete" Dyballa), mkae (Marko Käning), ptmkenny@…, mp@… | |
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
Attachments (2)
Change History (29)
Changed 11 years ago by gnurser (George Nurser)
comment:1 follow-up: 10 Changed 11 years ago by cooljeanius (Eric Gallager)
comment:4 Changed 11 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.
comment:6 Changed 11 years ago by cooljeanius (Eric Gallager)
According to the mailing list, the link to the upstream bug report is: https://bugs.freedesktop.org/show_bug.cgi?id=77032
comment:9 Changed 11 years ago by cooljeanius (Eric Gallager)
gnome-desktop had to deal with this problem in r115812 and r115816, which ended up with the following patch that could be used for reference here: patch-libgnome-destktop-libgsystem.diff
comment:10 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)
On PPC Mac OS X 10.5.8 (Leopard) a similar failure happens:
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/work/dbus-1.8.0/bus' CC activation.o CC bus.o CC config-parser.o CC config-parser-common.o CC connection.o CC desktop-file.o CC dir-watch-kqueue.o dir-watch-kqueue.c: In function ‘bus_set_watched_dirs’: dir-watch-kqueue.c:262: error: ‘O_CLOEXEC’ undeclared (first use in this function) dir-watch-kqueue.c:262: error: (Each undeclared identifier is reported only once dir-watch-kqueue.c:262: error: for each function it appears in.) make[2]: *** [dir-watch-kqueue.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/work/dbus-1.8.0/bus'
comment:11 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)
Cc: | Peter_Dyballa@… added |
---|
Cc Me!
comment:14 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Status: | new → assigned |
---|
Has duplicate #43235.
comment:15 follow-up: 25 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
For the sake of completeness:
In an attempt to fix a bug, the developers of dbus made a one line change to the file dir-watch-kqueue.c with the suggestion that _dbus_fd_set_close_on_exec be used if O_CLOEXEC were not available.
In OS X, O_CLOEXEC was added in Lion.
r118593 is an attempt to follow that suggestion, but I do not have a test machine.
Any feedback?
comment:16 Changed 11 years ago by mkae (Marko Käning)
Your commit r118593 fixed the build problem for me on SL!
Thanks mcaloun!!! :-)
comment:17 follow-up: 18 Changed 11 years ago by mkae (Marko Käning)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:18 Changed 11 years ago by gnurser (George Nurser)
Replying to mk@…: Works now. Many thanks:)
comment:22 follow-up: 23 Changed 11 years ago by josephaw@…
Works here for 10.4.11 with warning messages
---> Configuring dbus Warning: You have requested an obsolete variant
Thanks.
comment:23 Changed 11 years ago by mp@…
Replying to josephaw@…:
Works here for 10.4.11 with warning messages
---> Configuring dbus Warning: You have requested an obsolete variant
I had it installed with the +startupitem variant, and got the same warning. All that was needed was
port install dbus
instead of upgrade
(even though it was already installed) to get rid of the obsolete variant and the warning. At least on 10.6.8.
comment:25 Changed 11 years ago by RJVB (René Bertin)
Replying to mcalhoun@…:
For the sake of completeness:
In an attempt to fix a bug, the developers of dbus made a one line change to the file dir-watch-kqueue.c with the suggestion that _dbus_fd_set_close_on_exec be used if O_CLOEXEC were not available.
r118593 is an attempt to follow that suggestion, but I do not have a test machine.
Any feedback?
Yes, this patch applies to all systems, even those that have O_CLOEXEC, and that's not what's been suggested by the dbus developers. They proposed to test for the presence of O_CLOEXEC in the code, and act accordingly; I'm attaching a modified patch that follows this approach (and that may actually be incorporated into dbus).
Changed 11 years ago by RJVB (René Bertin)
Attachment: | patch-bus-dir-watch-kqueue.c.diff added |
---|
modified bus/dir-watch-kqueue patch that is transparant on systems having O_CLOEXEC
comment:26 Changed 11 years ago by mkae (Marko Käning)
Looks like your patch is the one which should get reported upstream then.
comment:27 Changed 3 years ago by barracuda156
Apparently the problem may be solved by adding legacysupport
PortGroup, ref: https://trac.macports.org/ticket/60376
O_CLOEXEC
is normally defined infcntl.h
, but thefcntl.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 haveO_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'sfcntl.h
definesO_CLOEXEC
like this:Gnulib also provides a
cloexec.c
file and acloexec.h
file that, taken together, actually implement the functionality that theO_CLOEXEC
flag represents.dbus
could try using these in cases whenO_CLOEXEC
is not available...