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

MacPorts noreply at macports.org
Tue Oct 8 16:05:01 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 dubiousjim):

 Okay, I've made progress on this. As I understand it, node is supposed to
 build on Mac with either gcc or clang, but somewhere either in their build
 toolchain or Macports' (I'm guesing the latter) the `-stdlib=libc++` gets
 added to the compiler options, and only clang understands that. So either
 that has to be changed or we have to continue building with clang.

 I think clang expects users to use gcc's libatomics library; see
 [http://releases.llvm.org/8.0.0/tools/clang/docs/Toolchain.html#atomics-
 library].

 As I said in a previous comment, libatomic files are available on my
 machine, in /opt/local/lib/gcc*. I was able to successfully upgrade
 nodejs12 using this invocation:

 > sudo port upgrade nodejs12 configure.ldflags="-L/opt/local/lib/gcc8"

 My grasp of Macports isn't solid enough to know why this should work,
 although it didn't work when I attempted to upgrade using `configure
 .ldflags-append="-L/opt/local/lib/gcc8"`. Are the `-append` variables not
 recognized on the command line? Using that `-append` variable seemed to
 have ''some'' effect though; but perhaps that was an illusion.

 Anyway, I managed to upgrade and perhaps this gives enough information for
 the port maintainers to determine how to revise the Portfile. And/or other
 users getting blocked by this can find the solution here.

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


More information about the macports-tickets mailing list