Opened 3 years ago

Closed 2 years ago

#29580 closed defect (invalid)

homebrew-macos-standard-gcc_spkg: library not found for -lmpc while building gcc

Reported by: Matthias Köppe Owned by:
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: John Palmieri, Samuel Lelièvre, Dima Pasechnik Merged in:
Authors: Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #29607 Stopgaps:

Status badges

Description

On macOS with a bunch of homebrew packages installed and with ./configure --with-system-gcc=no:

[gcc-9.2.0]   	  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp   -lz
  [gcc-9.2.0]   ld: library not found for -lmpc
  [gcc-9.2.0]   collect2: error: ld returned 1 exit status
  [gcc-9.2.0]   ld: library not found for -lmpc
  [gcc-9.2.0]   collect2: error: ld returned 1 exit status
  [gcc-9.2.0]   make[6]: *** [cc1plus] Error 1
  [gcc-9.2.0]   make[6]: *** [cc1] Error 1
  [gcc-9.2.0]   make[6]: Target `all' not remade because of errors.
  [gcc-9.2.0]   rm gfortran.pod gcc.pod
  [gcc-9.2.0]   make[5]: *** [all-stage2-gcc] Error 2
  [gcc-9.2.0]   make[5]: Target `all-stage2' not remade because of errors.
  [gcc-9.2.0]   make[4]: *** [stage2-bubble] Error 2
  [gcc-9.2.0]   make[4]: Target `stage3-bubble' not remade because of errors.
  [gcc-9.2.0]   make[3]: *** [all] Error 2
  [gcc-9.2.0]   ********************************************************************************
  [gcc-9.2.0]   Error building gcc-9.2.0
  [gcc-9.2.0]   ********************************************************************************
  [gcc-9.2.0]   
  [gcc-9.2.0]   real	29m43.664s
  [gcc-9.2.0]   user	215m9.194s
  [gcc-9.2.0]   sys	11m33.054s
  [gcc-9.2.0]   ************************************************************************
  [gcc-9.2.0]   Error building package gcc-9.2.0
  [gcc-9.2.0]   ************************************************************************
  [gcc-9.2.0] Full log file: /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/logs/pkgs/gcc-9.2.0.log

To test: tox -e local-homebrew-macos-standard-gcc_spkg

(from #26426)

Change History (8)

comment:1 Changed 3 years ago by Dima Pasechnik

What's the point of building gcc on MacOS? One cannot build Sage without Apple's or Conda's clang, anyway, as Apple polluted its system headers with blocks, which are not understood by unpatched gcc.

comment:2 Changed 3 years ago by John Palmieri

That's a good question. The Sage gfortran package builds, unlike gcc, although it seems to lead to some doctest failures.

comment:3 in reply to:  1 ; Changed 3 years ago by Matthias Köppe

Replying to dimpase:

One cannot build Sage without Apple's or Conda's clang, anyway, as Apple polluted its system headers with blocks, which are not understood by unpatched gcc.

Do we know if this is still true with current gcc versions? It's not like macOS is some obscure platform.

Anyway, it's not important to fix for 9.1.

comment:4 in reply to:  3 Changed 3 years ago by Dima Pasechnik

Replying to mkoeppe:

Replying to dimpase:

One cannot build Sage without Apple's or Conda's clang, anyway, as Apple polluted its system headers with blocks, which are not understood by unpatched gcc.

Do we know if this is still true with current gcc versions? It's not like macOS is some obscure platform.

You can try with Homebrew's gcc, but note that https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352 is still open.

comment:5 Changed 3 years ago by Matthias Köppe

Dependencies: #29607
Milestone: sage-9.1sage-duplicate/invalid/wontfix
Status: newneeds_review

I think this may just have been a problem caused by a bad .homebrew-build-env. With #29607, gcc installs correctly and in the build so far I only see a failing givaro.

comment:6 Changed 3 years ago by Matthias Köppe

The givaro build failure is now #29613.

comment:7 Changed 3 years ago by John Palmieri

Reviewers: John Palmieri
Status: needs_reviewpositive_review

I agree, gcc builds with #29607.

comment:8 Changed 2 years ago by Frédéric Chapoton

Resolution: invalid
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.