[MacPorts] #58507: libuv @1.29.1: Undefined symbols for architecture i386: "_close$NOCANCEL"

MacPorts noreply at macports.org
Wed May 22 05:16:51 UTC 2019


#58507: libuv @1.29.1: Undefined symbols for architecture i386:   "_close$NOCANCEL"
--------------------+-----------------------
 Reporter:  kencu   |      Owner:  michaelld
     Type:  defect  |     Status:  assigned
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  libuv
--------------------+-----------------------
 I haven't totally sorted this out yet.

 There is a new function in `src/unix/core.c` to make a non-cancellable
 close() function on systems that support that.

 They have implemented this on darwin as `close$NOCANCEL`, but I think this
 function might be only 64 bit. At least when I try to build it on a 32bit
 OS, or when I try to build it `+universal`, I run into errors like the
 above.

 Not fully sure what the right fix is. Adding an `__LP64__` like this does
 fix the `+universal` build. Maybe that is the right fix. Perhaps there is
 some other function to call for 32bit?
 {{{
 int uv__close_nocancel(int fd) {
 -#if defined(__APPLE__)
 +#if defined(__APPLE__) && __LP64__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension"
   extern int close$NOCANCEL(int);
   return close$NOCANCEL(fd);
 #pragma GCC diagnostic pop
 #elif defined(__linux__)
   return syscall(SYS_close, fd);
 #else
   return close(fd);
 #endif
 }
 }}}

 also - you'll notice some `#pragma` calls inside the function definition
 in the function above, so `gcc-4.2` barfs on that, and we have to remove
 those for `gcc-4.2`.

-- 
Ticket URL: <https://trac.macports.org/ticket/58507>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list