[MacPorts] #58695: nodejs12 @12.6.0: ld: library not found for -latomic
MacPorts
noreply at macports.org
Wed Oct 23 17:11:07 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):
Replying to [comment:7 dubiousjim]:
> 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.
MacPorts adds the `-stdlib=...` flag to all builds when clang++ is
selected as the compiler.
Please do not attempt to build C++ software on macOS using anything other
than clang++. Do not attempt to use g++. You will encounter no end of
problems due to mismatched C++ standard libraries.
> 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.
`configure.ldflags` is a variable (well, an "option" in MacPorts base
parlance). You can override options on the command line to aid in
debugging. `configure.ldflags-append` is a procedure. You cannot invoke
procedures on the command line.
It looks like upstream has
[https://github.com/nodejs/node/commit/ab3174ca08dcc4a435d61f4ce43e5bfd8cf23115
fixed this in nodejs13]. We could backport that to earlier versions.
--
Ticket URL: <https://trac.macports.org/ticket/58695#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list