osx-cross / homebrew-avr

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

Homebrew avr-gdb build broken on macOS #343

Open second-string opened 1 week ago

second-string commented 1 week ago

On macOS Sonoma 14.6.1, M1 MacBook Pro, I cannot build/install avr-gdb from home-brew.

I have successfully installed the main toolchain with brew install avr-gcc. When executing brew install avr-gdb, all of the home-brew dependencies download and update correctly, but I get an error in the final make call of the build.

[2726] <name>@<name>-mbp /opt/.../avr-gcc@9/9.4.0_1 (stable) $ brew install avr-gdb
==> Fetching dependencies for osx-cross/avr/avr-gdb: python@3.9 and texinfo
==> Fetching python@3.9
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.19_1
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/7d5ecae27ba7a9eff93afb08c5f49da947202b856cdabac33980ebd081994385--python@3.9-3.9.19_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:57f58fe8682f4dbcf39f5f4f1cedb0c7ce6f75275d7325fb1b314f9574d4842f
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/2c992d968f3e8100adf8ca65cf211112246e0370dcd6772453e1309620d23e07--python@3.9--3.9.19_1.arm64_sonoma.bottle.tar.gz
==> Fetching texinfo
==> Downloading https://ghcr.io/v2/homebrew/core/texinfo/manifests/7.1
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/a6ba99ebaacd398154745b25484544963ff1b229ee0e853ecb3e17f744c69f76--texinfo-7.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/texinfo/blobs/sha256:6ee1d5c2e64d80dcc8da4639d55d6c7a907550efd3ecfb4757f719f875e3df1b
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/2b03b8291213a3c1ceaef53f7e68a68b63b2657f298040e58423d760b6400f9d--texinfo--7.1.arm64_sonoma.bottle.tar.gz
==> Fetching osx-cross/avr/avr-gdb
==> Downloading https://raw.githubusercontent.com/osx-cross/homebrew-avr/18d50ba2a168a3b90a25c96e4bc4c053df77d7dc/Patch/avr-binutils-elf-bfd-gdb-fix.patch
######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ftp.gnu.org/gnu/gdb/gdb-10.1.tar.xz
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/d6dfd55ca620ab89b3209b96be8cac6a9b85c636faf527f4c5e4bc7e7ff07cee--gdb-10.1.tar.xz
==> Installing avr-gdb from osx-cross/avr
==> Installing dependencies for osx-cross/avr/avr-gdb: python@3.9 and texinfo
==> Installing osx-cross/avr/avr-gdb dependency: python@3.9
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.19_1
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/7d5ecae27ba7a9eff93afb08c5f49da947202b856cdabac33980ebd081994385--python@3.9-3.9.19_1.bottle_manifest.json
==> Pouring python@3.9--3.9.19_1.arm64_sonoma.bottle.tar.gz
==> /opt/homebrew/Cellar/python@3.9/3.9.19_1/bin/python3.9 -Im ensurepip
==> /opt/homebrew/Cellar/python@3.9/3.9.19_1/bin/python3.9 -Im pip install -v --no-index --upgrade --isolated --target=/opt/homebrew/lib/python3.9/site-packages /opt/homebrew/Cellar/python@3.9/3.9.19_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ensurepip/_bun
🍺  /opt/homebrew/Cellar/python@3.9/3.9.19_1: 3,068 files, 56.7MB
==> Installing osx-cross/avr/avr-gdb dependency: texinfo
==> Downloading https://ghcr.io/v2/homebrew/core/texinfo/manifests/7.1
Already downloaded: /Users/<name>/Library/Caches/Homebrew/downloads/a6ba99ebaacd398154745b25484544963ff1b229ee0e853ecb3e17f744c69f76--texinfo-7.1.bottle_manifest.json
==> Pouring texinfo--7.1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/texinfo/7.1: 494 files, 9.1MB
==> Installing osx-cross/avr/avr-gdb
==> Patching
==> Applying avr-binutils-elf-bfd-gdb-fix.patch
patching file 'bfd/elf-bfd.h'
==> ../configure --target=avr --prefix=/opt/homebrew/Cellar/avr-gdb/10.1 --disable-debug --disable-dependency-tracking --disable-binutils --disable-nls --disable-libssp --disable-install-libbfd --disable-install-libiberty --with-python=/opt/homebrew/opt/python@3.9/bin/py
==> make
Last 15 lines from /Users/<name>/Library/Logs/Homebrew/avr-gdb/02.make:
4 errors generated.
make[2]: *** [ada-exp.o] Error 1
3 errors generated.
make[2]: *** [ada-tasks.o] Error 1
In file included from ../../gdb/addrmap.c:20:
In file included from ../../gdb/defs.h:65:
../../gdb/../gdbsupport/enum-flags.h:85:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
    integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
                                                   ^
1 error generated.
make[2]: *** [addrmap.o] Error 1
4 errors generated.
make[2]: *** [ada-lang.o] Error 1
make[1]: *** [all-gdb] Error 2
make: *** [all] Error 2

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

...I'm not downloading a random file and compiling something from a bitly link. Given the fact that you posted this 1 minute after me I'm assuming this is bot spam

WalderlanSena commented 3 days ago

Same problem !

jeffdech commented 22 hours ago

I get the same issue with slightly different errors. This is on a 2023 MacBook Pro M3 Max, Sonoma 14.6.1

❯ brew install avr-gdb (base) ==> Fetching osx-cross/avr/avr-gdb ==> Downloading https://raw.githubusercontent.com/osx-cross/homebrew-avr/18d50ba2a168a3b90a25c96e4bc4c053df77d7dc/Patch/av Already downloaded: /Users/jefferydech/Library/Caches/Homebrew/downloads/0ca5d8e65886bc674f0ba0ec9f98e4b657920f87f9784a16f9fca756681475b3--avr-binutils-elf-bfd-gdb-fix.patch ==> Downloading https://ftp.gnu.org/gnu/gdb/gdb-10.1.tar.xz Already downloaded: /Users/jefferydech/Library/Caches/Homebrew/downloads/d6dfd55ca620ab89b3209b96be8cac6a9b85c636faf527f4c5e4bc7e7ff07cee--gdb-10.1.tar.xz ==> Installing avr-gdb from osx-cross/avr ==> Patching ==> Applying avr-binutils-elf-bfd-gdb-fix.patch patching file 'bfd/elf-bfd.h' ==> ../configure --target=avr --prefix=/opt/homebrew/Cellar/avr-gdb/10.1 --disable-debug --disable-dependency-tracking --d ==> make Last 15 lines from /Users/jefferydech/Library/Logs/Homebrew/avr-gdb/02.make: make[2]: [arch-utils.o] Error 1 3 errors generated. 4 errors generated. make[2]: [ada-tasks.o] Error 1 make[2]: [ada-exp.o] Error 1 3 errors generated. make[2]: [annotate.o] Error 1 3 errors generated. make[2]: [auto-load.o] Error 1 3 errors generated. make[2]: [auxv.o] Error 1 4 errors generated. make[2]: [ada-lang.o] Error 1 make[1]: [all-gdb] Error 2 make: *** [all] Error 2

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: Homebrew avr-gdb build broken on macOS https://github.com/osx-cross/homebrew-avr/issues/343