[MacPorts] #43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared -----------------------+-------------------------------- Reporter: gnurser@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: -----------------------+-------------------------------- ~ $ 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 -- Ticket URL: <https://trac.macports.org/ticket/43203> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+-------------------------------- Reporter: gnurser@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------+-------------------------------- Comment (by egall@…): `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... -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Changes (by ryandesign@…): * owner: macports-tickets@… => mcalhoun@… * port: => dbus Old description:
~ $ 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
New description: {{{ ~ $ 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 }}} -- Comment: 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 [https://lists.macosforge.org/pipermail/macports- users/2014-April/035084.html 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. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Comment (by egall@…): [https://lists.macosforge.org/pipermail/macports- users/2014-April/035088.html According to the mailing list,] the link to the upstream bug report is: [https://bugs.freedesktop.org/show_bug.cgi?id=77032] -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Comment (by egall@…): 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: [browser:trunk/dports/gnome/gnome-desktop/files/patch-libgnome-destktop- libgsystem.diff patch-libgnome-destktop-libgsystem.diff] -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Comment (by Peter_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' }}} -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Changes (by mcalhoun@…): * status: new => assigned Comment: Has duplicate #43235. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Comment (by mcalhoun@…): For the sake of completeness: In an attempt to fix a [https://bugs.freedesktop.org/show_bug.cgi?id=72213 bug], the developers of dbus made a [http://cgit.freedesktop.org/dbus/dbus/commit/bus/dir-watch- kqueue.c?id=f4618906b0dce251cdc3125b60239f7dd0df7183 one line change] to the file [http://cgit.freedesktop.org/dbus/dbus/commit/bus/dir-watch- kqueue.c 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, [https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPa... O_CLOEXEC] was [https://developer.apple.com/library/mac/releasenotes/General/MacOSXLionAPIDi... added in Lion]. r118593 is an attempt to follow that suggestion, but I do not have a test machine. Any feedback? -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dbus | ------------------------+------------------------ Comment (by mk@…): Your commit r118593 fixed the build problem for me on SL! Thanks mcaloun!!! :-) -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Changes (by mk@…): * status: assigned => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by gnurser@…): Replying to [comment:17 mk@…]: Works now. Many thanks:) -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:18> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by mp@…): Works here on 10.6.8 as well. Thanks. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:21> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by josephaw@…): Works here for 10.4.11 with warning messages ---> Configuring dbus Warning: You have requested an obsolete variant Thanks. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:22> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by mp@…): Replying to [comment:22 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. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:23> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by ryandesign@…): Has duplicate #43370. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:24> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by rjvbertin@…): Replying to [comment:15 mcalhoun@…]:
For the sake of completeness:
In an attempt to fix a [https://bugs.freedesktop.org/show_bug.cgi?id=72213 bug], the developers of dbus made a [http://cgit.freedesktop.org/dbus/dbus/commit/bus/dir-watch- kqueue.c?id=f4618906b0dce251cdc3125b60239f7dd0df7183 one line change] to the file [http://cgit.freedesktop.org/dbus/dbus/commit/bus/dir-watch- kqueue.c 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). -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:25> MacPorts <http://www.macports.org/> Ports system for OS X
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared ------------------------+------------------------ Reporter: gnurser@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dbus | ------------------------+------------------------ Comment (by mk@…): Looks like your patch is the one which should get reported upstream then. -- Ticket URL: <https://trac.macports.org/ticket/43203#comment:26> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts