-
Notifications
You must be signed in to change notification settings - Fork 4
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
macOS Big Sur and Xcode/CLT 12.5 does not compile/build #2
Comments
Hey Paul, Dominque, Ultimately my goal is to get Eclipse/CDT reliable, having seen the 2020/06 Eclipse/CDT to have instability issues on start-up of a debug session. I noticed that when I gdb'd gdb (debugged gdb using gdb) that the system would often hang too, which apparently your changes resolve. So, maybe I can help save some time by merging the changes into my tree, and build/share for your use. I also reached out the Homebrew and Macports -which to get the net result updated on their distributions sites. Hi Paul, After I had working gdb built from these tools I copied the Paralle's guest, then installed the beta Xcode. The build still functions if I am careful to mimic the 1st guests environment. Yet, doing so removes many of the SDKs content supplied when installing Xcode. For the moment, I tabled the effort of getting the Xcode build to function - but I intend to get this working. Perhaps we can collaborate more. |
I think the core of the issue is that Homebrew always builds with clang/clang++, and so uses libc++, but almost nobody that develops GDB works on macOS (or another systems whose default C++ standard library is libc++), and so the codebase just does not work with lib++ (only with libsdc++). I don't think there is any way to convince Homebrew to use GCC (the real one, not So, as @srwarner describes, it's really easier to download the GDB tarball, apply the patches in https://github.com/domq/homebrew-gdb/blob/master/Formula/gdb.rb manually, then |
And for anyone wondering, "that Mike Myers spot" that @swarner mentions is https://gist.github.com/mike-myers-tob/9a6013124bad7ff074d3297db2c98247 |
Thanks for these fixes. Would be great if gdb is functional again after all this time.
However, compiling gdb failed for me on Big Sur 11.4. I first had to remove CommandLineTools (10.15 from my previous Catalina install) to reinstall it again to get rid of the warning that a newer version was available. Once CLT were reinstalled, homebrew attempted to compile gdb using the brew command of this post but it fails with a few errors:
From the created logfile I can see that homebrew uses the following CLT and Xcode versions (also reported by
brew doctor
):Currently xcrun uses the Xcode.APP SDK which doesn't affect HOMEBREW_SDKROOT apparently:
However, I've also tried setting it the the CLT SDK but the error persist. I have no idea how to change HOMEBREW_SDKROOT.
Another attempt to resolve this was by upgrading gcc and g++ through homebrew since the previously installed versions had the old sysroot when running
gcc/g++ -v
. The new versions of gcc and g++ (11+) did not resolve the error though.Anyone any other ideas?
The text was updated successfully, but these errors were encountered: