-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebrew avr-gdb build broken on macOS #343
Comments
...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 |
Same problem ! |
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) If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core): These open issues may also help: |
Looks like this is a known issue with gdb that was patched for gdb 13.2. Also see mention of a workaround by ignoring -Wenum-constexpr-conversion. Unfortunately, I'm not savvy enough with this stuff to modify the Makefile to do the ignore and test it. Happy to help any way I can though. |
Using the link from @jeffdech, I tried manually downloading GDB 10.1 (the version we currently have in our Building and running seemed to work fine; I was able to step thru a simple program built by So hypothetically we could add these patches to our formula. However, I also tried the latest GDB 15.2, and that worked for me too. So I wonder if we should just upgrade our formula to the newer version and match the upstream gdb formula on homebrew-core? Or do like we have for |
If it works I think it makes sense to use the latest version. Sticking to what brew/core is doing is usually the simplest way to go I'll review your or as soon as you make it 🙂 |
This makes our formula match these other cross-built GDBs in homebrew-core: - [riscv64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/r/riscv64-elf-gdb.rb) - [arm-none-eabi-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/arm-none-eabi-gdb.rb) - [x86_64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/x/x86_64-elf-gdb.rb) - [i386-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/i/i386-elf-gdb.rb) Changes from our previous formula: - GDB now requires GMP (as of 11.1, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1b4ac058f7daeb9bac9ab0e63a7e73535208dfef)) and MPFR (as of 14, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;f=configure.ac;h=991180627851801f1999d1ebbc0e569a17e47c74)) - remove `--prefix=#{prefix}` + `--disable-debug` + `--disable-dependency-tracking`. These have been added to a reusable `std_configure_args` (as documented here in the [Formula Cookbook](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#std_configure_args)). - remove `--disable-install-libbfd`. In the [bfd configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/acinclude.m4;h=0ba7957760dfd13a9a97c2c4fbca30f231393c28;hb=HEAD#l62), this looks to be disabled if `host != target` (which is true for us). - remove `--disable-install-libiberty`. In the [libiberty configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=libiberty/configure.ac;h=c27e08e14288ed489e45e23b0c83e009721b47ba;hb=HEAD#l148), this looks to already be disabled by default. I think we're also avoiding installing libiberty and libbfd by using `make install-gdb` instead of `make install`. - remove `--disable-nls` + `--disable-libssp`. I think these flags got copied over from our GCC formulae, but they don't actaully apply to GDB (docs for [GCC configure options](https://gcc.gnu.org/install/configure.html) versus [GDB configure options](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Configure-Options.html)). Same goes for our `avr-binutils` formula dependency. Addresses osx-cross#343, since the newer GDB version has addressed the Clang errors outlined in the issue. I wanted to know if we actually needed to customize all those installation directories in the configure script flags, so I installed to a custom `DESTDIR` and checked out the files. Here's what I found (the [GNU Makefile Conventions docs](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html) were helpful here): GDB installs executables into `bindir`, headers into `includedir` (e.g. for GDB's [JIT interface](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Writing-JIT-Debug-Info-Readers.html#Writing-JIT-Debug-Info-Readers)), data files into `datadir` ([Python helper functions](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Python.html#Python), the [syscall name database](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Set-Catchpoints.html#Set-Catchpoints)), manpages in `mandir`, Info files in `infodir`, and locale files in `localedir`. Some installed files have a disambiguating prefix of the target architecture (e.g. `avr-gdb`), but most files don't, so they would overwrite files from an existing installation of GDB. Therefore, we specify a disambiguating subdirectory for all the installation directories, _except_: `bindir` (the executables already have the appropriate prefix) and `libdir` (`install-gdb` doesn't install anything here). `mandir` needs to be modified, not because the installed manpage files don't have the appropriate prefix (they do), or because they get installed to `#{prefix}/man` instead of `#{prefix}/share/man` (like the [Formula Cookbook cautions against](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#manuals)), but because we're customizing `datarootdir`, which causes `make` to install the files to `#{prefix}/share/#{target}/man` instead of `#{prefix}/share/man` like they should go. So we need to "undo" the change we made to `datarootdir` here (as an alternative, I think we could have left `datarootdir` and `mandir` alone, and instead customized `datadir` / `includedir` / `localedir` / `infodir`).
This makes our formula match these other cross-built GDBs in homebrew-core: - [riscv64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/r/riscv64-elf-gdb.rb) - [arm-none-eabi-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/arm-none-eabi-gdb.rb) - [x86_64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/x/x86_64-elf-gdb.rb) - [i386-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/i/i386-elf-gdb.rb) Changes from our previous formula: - GDB now requires GMP (as of 11.1, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1b4ac058f7daeb9bac9ab0e63a7e73535208dfef)) and MPFR (as of 14, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;f=configure.ac;h=991180627851801f1999d1ebbc0e569a17e47c74)) - remove `--prefix=#{prefix}` + `--disable-debug` + `--disable-dependency-tracking`. These have been added to a reusable `std_configure_args` (as documented here in the [Formula Cookbook](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#std_configure_args)). - remove `--disable-install-libbfd`. In the [bfd configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/acinclude.m4;h=0ba7957760dfd13a9a97c2c4fbca30f231393c28;hb=HEAD#l62), this looks to be disabled if `host != target` (which is true for us). - remove `--disable-install-libiberty`. In the [libiberty configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=libiberty/configure.ac;h=c27e08e14288ed489e45e23b0c83e009721b47ba;hb=HEAD#l148), this looks to already be disabled by default. I think we're also avoiding installing libiberty and libbfd by using `make install-gdb` instead of `make install`. - remove `--disable-nls` + `--disable-libssp`. I think these flags got copied over from our GCC formulae, but they don't actaully apply to GDB (docs for [GCC configure options](https://gcc.gnu.org/install/configure.html) versus [GDB configure options](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Configure-Options.html)). Same goes for our `avr-binutils` formula dependency. Addresses osx-cross#343, since the newer GDB version has addressed the Clang errors outlined in the issue. **Side note about installation directories** I wanted to know if we actually needed to customize all those installation directories in the configure script flags, so I installed to a custom `DESTDIR` and checked out the files. Here's what I found (the [GNU Makefile Conventions docs](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html) were helpful here): GDB installs executables into `bindir`, headers into `includedir` (e.g. for GDB's [JIT interface](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Writing-JIT-Debug-Info-Readers.html#Writing-JIT-Debug-Info-Readers)), data files into `datadir` ([Python helper functions](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Python.html#Python), the [syscall name database](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Set-Catchpoints.html#Set-Catchpoints)), manpages in `mandir`, Info files in `infodir`, and locale files in `localedir`. Some installed files have a disambiguating prefix of the target architecture (e.g. `avr-gdb`), but most files don't, so they would overwrite files from an existing installation of GDB. Therefore, we specify a disambiguating subdirectory for all the installation directories, _except_: `bindir` (the executables already have the appropriate prefix) and `libdir` (`install-gdb` doesn't install anything here). `mandir` needs to be modified, not because the installed manpage files don't have the appropriate prefix (they do), or because they get installed to `#{prefix}/man` instead of `#{prefix}/share/man` (like the [Formula Cookbook cautions against](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#manuals)), but because we're customizing `datarootdir`, which causes `make` to install the files to `#{prefix}/share/#{target}/man` instead of `#{prefix}/share/man` like they should go. So we need to "undo" the change we made to `datarootdir` here (as an alternative, I think we could have left `datarootdir` and `mandir` alone, and instead customized `datadir` / `includedir` / `localedir` / `infodir`).
This makes our formula match these other cross-built GDBs in homebrew-core: - [riscv64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/r/riscv64-elf-gdb.rb) - [arm-none-eabi-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/arm-none-eabi-gdb.rb) - [x86_64-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/x/x86_64-elf-gdb.rb) - [i386-elf-gdb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/i/i386-elf-gdb.rb) Changes from our previous formula: - GDB now requires GMP (as of 11.1, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1b4ac058f7daeb9bac9ab0e63a7e73535208dfef)) and MPFR (as of 14, [commit](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;f=configure.ac;h=991180627851801f1999d1ebbc0e569a17e47c74)) - remove `--prefix=#{prefix}` + `--disable-debug` + `--disable-dependency-tracking`. These have been added to a reusable `std_configure_args` (as documented here in the [Formula Cookbook](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#std_configure_args)). - remove `--disable-install-libbfd`. In the [bfd configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/acinclude.m4;h=0ba7957760dfd13a9a97c2c4fbca30f231393c28;hb=HEAD#l62), this looks to be disabled if `host != target` (which is true for us). - remove `--disable-install-libiberty`. In the [libiberty configure script](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=libiberty/configure.ac;h=c27e08e14288ed489e45e23b0c83e009721b47ba;hb=HEAD#l148), this looks to already be disabled by default. I think we're also avoiding installing libiberty and libbfd by using `make install-gdb` instead of `make install`. - remove `--disable-nls` + `--disable-libssp`. I think these flags got copied over from our GCC formulae, but they don't actaully apply to GDB (docs for [GCC configure options](https://gcc.gnu.org/install/configure.html) versus [GDB configure options](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Configure-Options.html)). Same goes for our `avr-binutils` formula dependency. Addresses #343, since the newer GDB version has addressed the Clang errors outlined in the issue. **Side note about installation directories** I wanted to know if we actually needed to customize all those installation directories in the configure script flags, so I installed to a custom `DESTDIR` and checked out the files. Here's what I found (the [GNU Makefile Conventions docs](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html) were helpful here): GDB installs executables into `bindir`, headers into `includedir` (e.g. for GDB's [JIT interface](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Writing-JIT-Debug-Info-Readers.html#Writing-JIT-Debug-Info-Readers)), data files into `datadir` ([Python helper functions](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Python.html#Python), the [syscall name database](https://sourceware.org/gdb/download/onlinedocs/gdb.html/Set-Catchpoints.html#Set-Catchpoints)), manpages in `mandir`, Info files in `infodir`, and locale files in `localedir`. Some installed files have a disambiguating prefix of the target architecture (e.g. `avr-gdb`), but most files don't, so they would overwrite files from an existing installation of GDB. Therefore, we specify a disambiguating subdirectory for all the installation directories, _except_: `bindir` (the executables already have the appropriate prefix) and `libdir` (`install-gdb` doesn't install anything here). `mandir` needs to be modified, not because the installed manpage files don't have the appropriate prefix (they do), or because they get installed to `#{prefix}/man` instead of `#{prefix}/share/man` (like the [Formula Cookbook cautions against](https://github.com/Homebrew/brew/blob/c81b2e43855f0a9bc86339bda73c3e073b061641/docs/Formula-Cookbook.md#manuals)), but because we're customizing `datarootdir`, which causes `make` to install the files to `#{prefix}/share/#{target}/man` instead of `#{prefix}/share/man` like they should go. So we need to "undo" the change we made to `datarootdir` here (as an alternative, I think we could have left `datarootdir` and `mandir` alone, and instead customized `datadir` / `includedir` / `localedir` / `infodir`). Closes #352. Signed-off-by: osxCrossTestBot <osxCrossTestBot@leka.io>
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 executingbrew install avr-gdb
, all of the home-brew dependencies download and update correctly, but I get an error in the finalmake
call of the build.The text was updated successfully, but these errors were encountered: