'gdb - Can't install on MacOS - Error: Empty installation

I ma running macOS Monterey 12.3.1.

I am following this guide: https://gist.github.com/mike-myers-tob/9a6013124bad7ff074d3297db2c98247

When I run:

brew install --force --build-from-source domq/gdb/gdb

I get this error:

☁  ~  brew install --force --build-from-source domq/gdb/gdb
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated Homebrew from 3.4.10 (5760e6eb9) to 3.4.11 (87bcd1935).
Updated 4 taps (shivammathur/php, homebrew/core, homebrew/cask and homebrew/services).
==> New Formulae
arxiv_latex_cleaner        mbw                        sse2neon
libapplewm                 minimap2                   stanc3
libxcvt                    mkfontscale                tradcpp
libxfont2                  monika                     xkbcomp
mbt                        primecount
==> Updated Formulae
Updated 508 formulae.
==> New Casks
aethersx2                                mp3tag
avifquicklook                            mx-power-gadget
dcp-o-matic-combiner                     nitro-pdf-pro
dcp-o-matic-disk-writer                  oxwu
dcp-o-matic-playlist-editor              plus42-binary
detail                                   plus42-decimal
ferdium                                  podman-desktop
groestlcoin-core                         protokol
jquake                                   tomatobar
manila                                   vieb
medis                                    yandex-music-unofficial
miln-movie-splitter                      yattee
miniwol
==> Updated Casks
Updated 339 casks.
==> Deleted Casks
twitch


==> Homebrew was updated to version 3.4.11
The changelog can be found at:
  https://github.com/Homebrew/brew/releases/tag/3.4.11
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1o
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:d8bb66
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.38.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:ec526591d77
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.12
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:711db89
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ftp.gnu.org/gnu/gdb/gdb-10.1.tar.xz
######################################################################## 100.0%
==> Installing gdb from domq/gdb
Warning: Your Xcode (13.2.1) is outdated.
Please update to Xcode 13.3 (or delete it).
Xcode can be updated from the App Store.

==> Installing dependencies for domq/gdb/gdb: [email protected], sqlite and [email protected]
==> Installing domq/gdb/gdb dependency: [email protected]
==> Pouring [email protected]_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/[email protected]/1.1.1o: 8,089 files, 18MB
==> Installing domq/gdb/gdb dependency: sqlite
==> Pouring sqlite--3.38.5.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/sqlite/3.38.5: 11 files, 4.4MB
==> Installing domq/gdb/gdb dependency: [email protected]
==> Pouring [email protected]_monterey.bottle.tar.gz
==> /opt/homebrew/Cellar/[email protected]/3.9.12/bin/python3 -m ensurepip
==> /opt/homebrew/Cellar/[email protected]/3.9.12/bin/python3 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/opt/homebrew/lib/python3.9/site-package
🍺  /opt/homebrew/Cellar/[email protected]/3.9.12: 3,090 files, 57.4MB
==> Installing domq/gdb/gdb
==> Patching
==> ../configure --enable-targets=all --prefix=/opt/homebrew/Cellar/gdb/10.1_1 --disable-debug --disable-dependency-tracking --with-lzma --with-python=/opt/homebrew
==> make
==> make install-gdb maybe-install-gdbserver
Error: Empty installation

Is it even possible to install gdb on macOS for M1 chips ? How can I fix this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source