-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Automatically use execinfo for crash handler on *BSD and musl-based Linux #63983
Automatically use execinfo for crash handler on *BSD and musl-based Linux #63983
Conversation
I'd suggest instead: diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 00e2b9e6eb..8c1b3cbfb6 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -382,7 +382,10 @@ def configure(env):
if platform.system() == "Linux":
env.Append(LIBS=["dl"])
- if platform.system().find("BSD") >= 0:
+ if not env["execinfo"] and platform.libc_ver()[0] != "glibc":
+ # The default crash handler depends on glibc, so if the host uses
+ # a different libc (BSD libc, musl), fall back to libexecinfo.
+ print("Note: Using `execinfo=yes` for the crash handler as required on platforms where glibc is missing.")
env["execinfo"] = True
if env["execinfo"]:
Apparently CPython's A drawback to both proposed changes is that it might prevent cross-compiling for Linux-glibc from a BSD (existing issue) or musl (new issue) system. But that's very niche, we can address it if/when someone wants to do this (e.g. by making |
e06a61b
to
2889af2
Compare
@akien-mga I applied your suggestion and tested it locally, works well 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from last comment, should be good to merge.
…inux Co-authored-by: Rémi Verschelde <[email protected]>
2889af2
to
8e04bff
Compare
Thanks! |
Cherry-picked for 3.6. |
This closes #57193 and closes godotengine/godot-proposals#2439.
Tested on an Alpine Linux container (
docker run -itv $PWD:/opt/godot alpine
in a Godot repository clone, then install dependencies), it works as expected.Unlike my glibc-based desktop, I get a crash on startup when running the project manager with
--headless
:--version
works though: