[MacPorts] #58695: nodejs12 @12.6.0: ld: library not found for -latomic

MacPorts noreply at macports.org
Wed Oct 23 17:33:47 UTC 2019


#58695: nodejs12 @12.6.0: ld: library not found for -latomic
-------------------------+----------------------
  Reporter:  dubiousjim  |      Owner:  ci42
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  nodejs12    |
-------------------------+----------------------

Comment (by ryandesign):

 Looks like upstream
 [https://github.com/nodejs/node/commit/4d12cef2a5f9c834df588c9b5d7631dfa17606a2
 fixed nodejs12 too]. Looks like nodejs12 built successfully in MacPorts on
 OS X 10.11 and up (using Xcode clang), but not on 10.10 and lower (using
 MacPorts clang 9).

 The code they're using now says:

 {{{
       ['(OS=="linux" or OS=="mac") and llvm_version!=0', {
          'libraries': ['-latomic'],
        }],
 }}}

 I don't understand this. The idea is we want to use the atomic library
 when not using llvm. So shouldn't the condition be `(OS=="linux" or
 OS=="mac") and llvm_version==0`?

 I also think `llvm_version` is being set wrong. It's set like this:

 {{{
 def get_llvm_version(cc):
   return get_version_helper(
     cc, r"(^(?:FreeBSD )?clang version|based on LLVM) ([3-9]\.[0-9]+)")
 }}}

 This will only work correctly with open source clang and with Apple clang
 from Xcode 6 and earlier. As of Xcode 7, the Apple clang version no longer
 claims to be "based on" an open source clang version since they have
 diverged too much.

 I'll file upstream bug reports...

-- 
Ticket URL: <https://trac.macports.org/ticket/58695#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list