[MacPorts] #52613: Guile-2.0.13 fails to build on Sierra
MacPorts
noreply at macports.org
Mon Jan 9 00:04:03 UTC 2017
#52613: Guile-2.0.13 fails to build on Sierra
-------------------------+--------------------------------
Reporter: mouse07410 | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Resolution: | Keywords: sierra
Port: guile |
-------------------------+--------------------------------
Comment (by neverpanic):
The problem with `mkostemp` failing on Sierra happens because Sierra
introduces a `mkostemp(3)` function in `unistd.h`. This causes libguile to
prefer this implementation over its GNUlib implementation, which is has
previously shipped.
`mkostemp(3)` does not accept flags other than O_APPEND, O_SHLOCK,
O_EXLOCK and O_CLOEXEC, according to the `mktemp(3)` manpage. libguile's
[http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=libguile/filesys.c;h=e6e37b04057c0e8b417c5d58d1268f2effd7344e;hb=89ce9fb31b00f1f243fe6f2450db50372cc0b86d#l1463
libguile/filesys.c], however, passes `O_WRONLY | O_CREAT | O_TRUNC` to it.
These flags are passed because in libguile/filesys.c, in
`s_scm_i_mkstemp`, `SCM_UNBNDP (mode)` is false and the block that
converts the given string argument of "wb" into the corresponding flags
using `scm_i_mode_to_open_flags()` as defined in `libguile/fports.c`
returns `O_WRONLY | O_CREAT | O_TRUNC`. Opening a file with a random name
in read-only mode is pretty pointless, of course, so I'm not sure why
that's even an option (and GNUlib's implementation of `mkostemp` ignores
O_WRONLY and adds O_RDWR).
The patch posted in the upstream ticket is correct. I'm committing a fix
soon.
--
Ticket URL: <https://trac.macports.org/ticket/52613#comment:39>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list