How to install/fix gdb on Big Sur macport after OS upgrade
The solution that ultimately worked for me was:
- Install the newest security patch for Big Sur - on Nov 22, 2021 a new one was released that claims to fix this exact issue, which it does not... on it's own
- Install the newest Xcode (tested with Xcode 13.1)
-
sudo rm -r /Library/Developer/CommandLineTools
(yes really, installing a new one with the old present seems to break) - Find your proper Xcode Command Line Tools link here and install it: https://developer.apple.com/download/all/?q=command%20line%20tools
sudo xcode-select -switch /Library/Developer/CommandLineTools
sudo port selfupdate
sudo port upgrade outdated
sudo port uninstall gcc6
-
sudo port install gcc8
(because gcc6 and gcc7 still don't install, and I suspect 9 and 10 will not either, as per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061) sudo port install gdb
ggdb
Yes, after all that, it installs it under a name not mentioned ever during installation. For reasons.