[MacPorts] #63748: xsel 1.2.0 fails to build on macOS 12.0.1
MacPorts
noreply at macports.org
Fri Nov 5 15:48:11 UTC 2021
#63748: xsel 1.2.0 fails to build on macOS 12.0.1
---------------------------+------------------------
Reporter: derekschrock | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: monterey
Port: xsel |
---------------------------+------------------------
Comment (by derekschrock):
xsel's [https://github.com/kfish/xsel/blob/master/configure.ac
configure.ac] has
[https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node
/Particular-Functions.html AC_FUNC_FORK] which creates the macro:
`#define vfork fork`
This is added to `"config.h"` included in
[https://github.com/kfish/xsel/blob/master/xsel.c#L13 xsel.c] before
[https://github.com/kfish/xsel/blob/master/xsel.c#L18 system headers].
macOS 12's
[https://gist.githubusercontent.com/derekschrock/9acb738e0d9a21e977f281be2dc819c5/raw/7a5fad9d5bc75024c7581638e19d21339d6e0c40/gistfile1.h
<unistd.h>] has the following:
{{{
...
#if !defined(_POSIX_C_SOURCE)
__deprecated_msg("Use posix_spawn or fork")
#endif
pid_t vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/* End XSI */
...
}}}
Since `"config.h"` with the above macro `#define vfork fork` that `pid_t
vfork ...` turns in to `pid_t fork ...` So now any usage of `fork()`
results in a depercation message.
The exact fix is still in question as mentioned
[https://github.com/kfish/xsel/issues/42#issuecomment-961575330 here].
Any one of those can be used. However, the easy ones would be to remove
AC_FUNC_FORK from configure.ac or remove or `#undef vfork` the vfork
macro after `autoconf` runs.
Assuming everything I said is true/correct. Removing `AC_FUNC_FORK` from
`configure.ac` might be the easiest/safest? From my understanding
`AC_FUNC_FORK` is only here for broken vfork/fork which isn't an issue on
supported macOS version?
`
--
Ticket URL: <https://trac.macports.org/ticket/63748#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list