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
gdb: fix Add python3 linkage support #17979
Conversation
Not sure I understand this.
|
@ilovezfs sorry I was a bit lazy writing a description. now updated. After applied the patch in the commit, we could choose to build gdb with python3, just another option ;-p |
@ttimasdf Thanks for explaining ❤️. We'll need to get the patch reported and accepted upstream before we can ship this, I'm afraid. |
Debian/Ubuntu guys have already had a patch years ago at version 7.8-0ubuntu2 and 7.6.2-1.1(jessie) But it has never been accepted by upstream, regarding the maybe-broken |
another fix that should work, inspired from original diff --git a/gdb/python/python-config.py.origin b/gdb/python/python-config.py
index c2b2969..554dac9 100644
--- a/gdb/python/python-config.py.origin
+++ b/gdb/python/python-config.py
@@ -72,7 +72,7 @@ for opt in opt_flags:
libs.insert(0, '-L' + getvar('LIBPL'))
elif os.name == 'nt':
libs.insert(0, '-L' + sysconfig.PREFIX + '/libs')
- if getvar('LINKFORSHARED') is not None:
+ if not getvar('PYTHONFRAMEWORK'):
libs.extend(getvar('LINKFORSHARED').split())
print (to_unix_path(' '.join(libs))) Any suggestions? |
@BrewTestBot test this please |
1 similar comment
@BrewTestBot test this please |
We'll need this patch upstreamed before it can be accepted in Homebrew. Sorry @ttimasdf and thanks for the PR nonetheless! |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Description:
I've made a patch to configure process and make it possible to compile gdb against python3. When launched with python3,
gdb/python/python-config.py
in the source file generates some flags that clang may not recognize. I tried to patch it but with no luck. So instead I choose thepython3-config
that comes with python, it works.The difference of their output: