[MacPorts] #60184: libuv @1.35.0+universal: Undefined symbols for architecture i386: "_close$NOCANCEL"
MacPorts
noreply at macports.org
Fri Mar 13 16:46:59 UTC 2020
#60184: libuv @1.35.0+universal: Undefined symbols for architecture i386:
"_close$NOCANCEL"
-------------------------+-----------------------
Reporter: ryandesign | Owner: michaelld
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: fixed | Keywords:
Port: libuv |
-------------------------+-----------------------
Comment (by ryandesign):
Replying to [comment:7 kencu]:
> I have to check -- does this work?:
> {{{
> #if __LP64__ || TARGET_OS_IPHONE
> }}}
>
> Otherwise we need:
> {{{
> if (defined(__LP64__) && __LP64__) || (defined(TARGET_OS_IPHONE) &&
TARGET_OS_IPHONE)
> }}}
As far as I can tell, in the other places where we use `__LP64__` in
MacPorts, such as various port patchfiles, we only check if `__LP64__` is
defined. We do not check its value. It is only defined when in 64-bit
mode, so its value is irrelevant. Checking on my system, its value is `1`;
if that is consistent, then it does not matter whether you check its value
or whether it's defined, since undefined symbols evaluate to `0`.
As for `TARGET_OS_IPHONE`, if you are on an Apple OS and have included
TargetConditionals.h, then `TARGET_OS_IPHONE` (and the other related
defines) will be defined to either `0` or `1` depending on your OS. If you
are not on an Apple OS or have not included TargetConditionals.h then they
will not be defined. So checking whether it is defined is not enough; you
definitely need to check its value. Whether or not you check whether it is
defined first is, as above, a matter of style, since undefined defines
evaluate to `0`.
> And BTW what works on clang does not necessarily work on gcc-4.2, blah,
blah, blah.
Why would you say that? `__LP64__` should be supported in any 64-bit-
capable compiler. `TARGET_OS_IPHONE` is from the OS headers and does not
depend on a specific compiler.
--
Ticket URL: <https://trac.macports.org/ticket/60184#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list