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

MacPorts noreply at macports.org
Sun Oct 6 20:58:44 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):

 When I do `find /lib /usr/lib /usr/local/lib /opt/local/lib -name
 'libatomic*'` I see that libatomic files are in /opt/local/lib/gcc*.
 They're provided by ports like gcc8, and so on.

 I tried upgrading with options like `configure.compiler=macports-gcc-8` or
 `configure.cxx=/opt/local/bin/gcc-mp-8` but these fail with the message:


 > gcc-mp-8: error: unrecognized command line option '-stdlib=libc++'

 So it looks like the makefiles are set up to use clang. I tried upgrading
 using just `configure.ldflags-append="-L/opt/local/lib/gcc8"` (but
 allowing the build to use clang), and that gets pretty far. But eventually
 it also fails with:

 > ld: library not found for -latomic

 The log shows that the failing make command was:

 > Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs12/nodejs12/work/node-v12.11.0"
 && /usr/bin/make -w all CC=/opt/local/bin/clang-mp-8.0
 CXX=/opt/local/bin/clang++-mp-8.0 CXX.host=/opt/local/bin/clang++-mp-8.0
 CPP=/opt/local/bin/clang-cpp-mp-8.0 CFLAGS="-Os" CXXFLAGS="-Os
 -stdlib=libc++" LDFLAGS="-L/opt/local/lib
 -Wl,-headerpad_max_install_names" PYTHON=/opt/local/bin/python2.7 V=1

 Somehow the `-L/opt/local/lib/gcc8` did't make it into those LDFLAGS. If I
 then `sudo -s` and enter that failing command line manually, appending
 `-L/opt/local/lib/gcc8` to the LDFLAGS, and the command can complete. But
 I don't know how then to resume the macports build/install/upgrade.

 Does anyone have insight into how to coerce macports into coercing the
 node Makefiles to include that library folder?

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


More information about the macports-tickets mailing list