[MacPorts] #60791: julia @1.4.1: *** Attempting to use gcc4 OPENLIBM tarball, but compiling with cxx11 string ABI; set "CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0" to avoid linker errors. Stop.

MacPorts noreply at macports.org
Tue Aug 17 15:07:22 UTC 2021


#60791: julia @1.4.1: *** Attempting to use gcc4 OPENLIBM tarball, but compiling
with cxx11 string ABI; set "CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0" to avoid
linker errors.  Stop.
---------------------+-----------------------
  Reporter:  dbl001  |      Owner:  essandess
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.6.2
Resolution:          |   Keywords:
      Port:  julia   |
---------------------+-----------------------

Comment (by ernstki):

 Hi all,

 I experienced the same symptoms described here, and I can share a couple
 of things that might help:

 One, I'm not sure this is the `julia` port's problem, really. Without
 having a deep understanding of the Ports build system, I'm not sure if
 there's a way for the `port` command itself to be more helpful or not, but
 it appears the error arises from a mismatch between the "active" `gcc`
 port and the one `julia` wants to compile with.

 I struggled briefly with trying to specify
 `CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0` somewhere in a Makefile inside the
 port's "build" directory, and to invoke `make` directly there. Didn't have
 much luck there, and I actually think the Portfile is not the problem
 anyway, so I won't go into the details.

 Next step was to see if there were any variants of `julia` that were still
 working, and that's when it dawned on me: the latest version of `julia`
 wants `gcc10`, but my "active" `gcc` was `mp-gcc5`. So, in retrospect, it
 seems understandable that the build would bomb out with ABI errors.

 What I ended up doing was `sudo port select gcc mp-gcc9`, followed by
 `sudo port install julia +gcc9`. (The reason for 9 instead of 10 is
 probably irrelevant, but to make a long story short, I already had gcc9
 and didn't want 10 to be installed.) If `sudo port select gcc` doesn't
 seem to the right thing, try `sudo port install gcc_select` first then
 repeat.

 Furthermore, this is probably an issue for a separate bug report, but if
 you arrive here after googling the linker error message as I did, you're
 going to need this bit of advice. There is [https://github.com/macports
 /macports-ports/pull/4825/files#diff-
 e13d459d0f7db53fba55e915fb2639b81e77765be3f135b02459c59f27af992dR70 a
 place in the Portfile] where there's a symlink created to the Fortran
 compiler in `${workpath}/bin`. If you needed to repeat `port install
 julia`, say, because you had to `port select` the correct `gcc` first, it
 will bomb on that `ln` command the second time around.

 The simple solution there is to `sudo port clean julia` and try again.
 Just FYI.

 Hope this helps.

 —Kevin

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


More information about the macports-tickets mailing list