Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.68k stars 12.38k forks source link

gdb Catalina bottle compiled without LZMA #50449

Closed mikeryan closed 4 years ago

mikeryan commented 4 years ago

What you were trying to do (and why)

Trying to run GDB against binaries with LZMA compressed debugging symbols.

What happened (include command output)

GDB prints out the following warning:

warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time

GDB configuration shows that it was compiled --without-lzma

Command output

warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time,

gdb> show configuration
This GDB was configured as follows:
   configure --host=x86_64-apple-darwin19.3.0 --target=x86_64-apple-darwin19.3.0
             --with-auto-load-dir=:${prefix}/share/auto-load
             --with-auto-load-safe-path=:${prefix}/share/auto-load
             --with-expat
             --with-gdb-datadir=/usr/local/Cellar/gdb/9.1/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/local/Cellar/gdb/9.1/lib/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --without-babeltrace
             --without-intel-pt
             --without-mpfr
             --without-xxhash
             --with-python=/System/Library/Frameworks/Python.framework/Versions/2.7
             --without-guile
             --disable-source-highlight
             --with-separate-debug-dir=/usr/local/Cellar/gdb/9.1/lib/debug (relocatable)

  

What you expected to happen

GDB can load the symbols due to being compiled with LZMA support

Step-by-step reproduction instructions (by running brew install commands)

  1. brew install gdb
  2. inside gdb run show configuration
  3. look for --without-lzma

Workaround

Reinstall gdb from source, making sure the xz package (with liblzma) is installed.

Example: brew reinstall -s gdb

bayandin commented 4 years ago

Thanks for the report @mikeryan, it should be fixed in https://github.com/Homebrew/homebrew-core/pull/50458