[MacPorts] #59071: Coreutils fails to build with XCode 11 on 10.15
MacPorts
noreply at macports.org
Sun Sep 22 01:32:26 UTC 2019
#59071: Coreutils fails to build with XCode 11 on 10.15
------------------------+----------------------
Reporter: markemer | Owner: yan12125
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.99
Resolution: | Keywords:
Port: coreutils |
------------------------+----------------------
Comment (by kencu):
Here's an explanation from a homebrew discussion
<https://discourse.brew.sh/t/mac-os-10-15-catalina-issues/5001/22>:
An update. Guess I figured out the cause, but still no idea how to fix it.
The configure script for the gnulib component, which replaces “broken”
libc functions with its own versions, checks for some undesired behavior
of ftell(). It detects that on macOS, if you open a file in “r+” mode,
read it up to EOF (by fseek()ing to its end, really), write one more byte,
and call ftell() on it, the reported position will be wrong — the file
pointer needs to advance as you write more data. There seems to be a known
bug on Solaris, just like that.
So the configure script sets a variable telling that ftell() is broken on
this system, but gnulib only has a replacement for Solaris, which uses the
struct {{{__sFILE}}} as found there, and predictably barfs because
{{{__sFILE}}} on Darwin is nothing like that.
How healthy an approach to patching systems that misbehave is left as an
exercise to the reader, but here’s one thing: up to and including Mojave,
ftell() was working just fine, and the replacement was never needed.
Maybe, hm, someone more in the know should report it to Apple before they
make a release?
raduc
I was able to build gettext by setting
FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE to 0 as described here:
https://gitmemory.com/issue/fink/fink/197/531629669
--
Ticket URL: <https://trac.macports.org/ticket/59071#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list