osx-cross / homebrew-avr

Homebrew AVR Toolchain
BSD 2-Clause "Simplified" License
394 stars 79 forks source link

Fails to find gmp during building #289

Closed nsayer closed 1 year ago

nsayer commented 1 year ago
% brew install avr-gcc@10
==> Fetching osx-cross/avr/avr-gcc@10
==> Downloading https://gist.githubusercontent.com/DavidEGrayson/88bceb3f4e62f45
Already downloaded: /Users/nsayer/Library/Caches/Homebrew/downloads/def654fc009e1286443dbc4e1baa98eeeaee383d419d8a1d15200ab895520379--gcc-11-arm-darwin.patch
==> Downloading https://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.1
Already downloaded: /Users/nsayer/Library/Caches/Homebrew/downloads/82989e2eb60e70483e667482e25d205685a09019a1c993b99a467ad14d3bb2d0--avr-libc-2.1.0.tar.bz2
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz
######################################################################## 100.0%
==> Installing avr-gcc@10 from osx-cross/avr
==> Patching
==> Applying gcc-11-arm-darwin.patch
patching file 'gcc/config/host-darwin.c'
==> ../configure --target=avr --prefix=/opt/homebrew/Cellar/avr-gcc@10/10.3.0_1 
Last 15 lines from /Users/nsayer/Library/Logs/Homebrew/avr-gcc@10/01.configure:
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/osx-cross/homebrew-avr/issues

These open issues may also help:
Apply avr-gcc-11-fix-argument-type-mismatch.patch in avr-gcc@11.rb https://github.com/osx-cross/homebrew-avr/pull/288
avr-gcc@11 fails to build https://github.com/osx-cross/homebrew-avr/issues/280
% brew list gmp
==> Downloading https://formulae.brew.sh/api/cask.json

/opt/homebrew/Cellar/gmp/6.2.1_1/include/ (2 files)
/opt/homebrew/Cellar/gmp/6.2.1_1/lib/libgmp.10.dylib
/opt/homebrew/Cellar/gmp/6.2.1_1/lib/libgmpxx.4.dylib
/opt/homebrew/Cellar/gmp/6.2.1_1/lib/pkgconfig/ (2 files)
/opt/homebrew/Cellar/gmp/6.2.1_1/lib/ (4 other files)
/opt/homebrew/Cellar/gmp/6.2.1_1/share/info/ (3 files)
nsayer commented 1 year ago

Never mind. 'brew reinstall gmp' seems to have fixed it.