[MacPorts] #61137: glib2 @2.58.3 +universal+x11: compile error: unterminated conditional directive (clang version?)
MacPorts
noreply at macports.org
Mon Sep 7 07:04:47 UTC 2020
#61137: glib2 @2.58.3 +universal+x11: compile error: unterminated conditional
directive (clang version?)
---------------------+------------------------
Reporter: JDLH | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Resolution: | Keywords:
Port: glib2 |
---------------------+------------------------
Old description:
> When updating glib2 to @2.58.3 +universal+x11 on macOS 10.13.6 High
> Sierra, the compile of `gclosure.c` failed. The relevant part of the
> `main.log` reads,
>
> {{{
> :info:build In file included from gclosure.c:28:
> :info:build /opt/local/include/ffi.h:44:2: error: unterminated
> conditional directive
> :info:build #ifndef LIBFFI_H
> :info:build ^
> :info:build In file included from gclosure.c:1160:
> :info:build /opt/local/include/ffi.h:44:2: error: unterminated
> conditional directive
> :info:build #ifndef LIBFFI_H
> :info:build ^
> }}}
>
> Full `main.log` attached.
>
> `/opt/local/include/ffi.h is provided by: libffi` (per `port provides`).
>
> The **glib2** Portfile changed on Sep 5, 2020 with
> [https://github.com/macports/macports-
> ports/commit/bd5d6800828a3dcda1b65f3999fa748a365b168e commit bd5d680
> "ports that link with libffi: rebuild with libffi 3.3"]. It looks like
> just the revision number incremented, to force a rebuild.
>
> The **libffi** Portfile changed on Sept 4, 2020 with
> [https://github.com/macports/macports-
> ports/commit/81c3c7d5008897d976d4a46a59da0d34fc8a8492 commit 81c3c7d
> "libffi: Fix universal variant"]. As far as I can tell,
> this did not changed the contents of `ffi.h`.
>
> The error message, "unterminated conditional directive", is mentioned in
> several bug reports. Many of those reports point to
> https://github.com/Sarcasm/flycheck-irony/issues/20, where it is
> described as a bug in LLVM, fixed in January 2018. Maybe that fix does
> not propagate back to macOS 10.13 High Sierra?
New description:
When updating glib2 to @2.58.3 +universal+x11 on macOS 10.13.6 High
Sierra, the compile of `gclosure.c` failed. The relevant part of the
`main.log` reads,
{{{
:info:build In file included from gclosure.c:28:
:info:build /opt/local/include/ffi.h:44:2: error: unterminated conditional
directive
:info:build #ifndef LIBFFI_H
:info:build ^
:info:build In file included from gclosure.c:1160:
:info:build /opt/local/include/ffi.h:44:2: error: unterminated conditional
directive
:info:build #ifndef LIBFFI_H
:info:build ^
}}}
Full `main.log` attached.
`/opt/local/include/ffi.h is provided by: libffi` (per `port provides`).
The **glib2** Portfile changed on Sep 5, 2020 with
[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit
bd5d680 "ports that link with libffi: rebuild with libffi 3.3"]. It looks
like just the revision number incremented, to force a rebuild.
The **libffi** Portfile changed on Sept 4, 2020 with
[changeset:81c3c7d5008897d976d4a46a59da0d34fc8a8492/macports-ports commit
81c3c7d "libffi: Fix universal variant"]. As far as I can tell,
this did not changed the contents of `ffi.h`.
The error message, "unterminated conditional directive", is mentioned in
several bug reports. Many of those reports point to
https://github.com/Sarcasm/flycheck-irony/issues/20, where it is described
as a bug in LLVM, fixed in January 2018. Maybe that fix does not propagate
back to macOS 10.13 High Sierra?
--
Comment (by ryandesign):
Replying to [ticket:61137 JDLH]:
> The **libffi** Portfile changed on Sept 4, 2020 with
[changeset:81c3c7d5008897d976d4a46a59da0d34fc8a8492/macports-ports commit
81c3c7d "libffi: Fix universal variant"]. As far as I can tell,
> this did not changed the contents of `ffi.h`.
It should have changed the contents of /opt/local/include/ffi.h to just:
{{{
#ifndef __LP64__
#include "i386-ffi.h"
#else
#include "x86_64-ffi.h"
#endif
}}}
The error you reported is the reason why I made that change now, and the
reason why we had made the original equivalent change for previous libffi
versions long ago (see #31459 and #25439), and it fixed the problem for
me.
> The error message, "unterminated conditional directive", is mentioned in
several bug reports. Many of those reports point to
https://github.com/Sarcasm/flycheck-irony/issues/20, where it is described
as a bug in LLVM, fixed in January 2018. Maybe that fix does not propagate
back to macOS 10.13 High Sierra?
No idea. There could be any number of reasons why the muniversal portgroup
merger is unable to merge a file successfully. I haven't attempted to
analyze why it is unable to merge ffi.h or whether the problem is the one
described in the link you mentioned.
--
Ticket URL: <https://trac.macports.org/ticket/61137#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list