Discussion:
[Bug python/19378] New: Not linked on Mac OS X 10.10 with Python 3.5
congeec at live dot com
2015-12-18 16:25:30 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

Bug ID: 19378
Summary: Not linked on Mac OS X 10.10 with Python 3.5
Product: gdb
Version: 7.10
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: congeec at live dot com
Target Milestone: ---

issue: symbol PyMac_Error does not exit in libpython3.dylib, but in
libpython2.7.dylib.

related files:
gdb/python/python-config
config.log in dir gdb/python/
``` config.log
1107 configure:8678: checking for python3.5
1108 configure:8696: gcc -o conftest -g -O2
-I/usr/local/Cellar/python3/3.5.1/Frameworks/Python.fra
mework/Versions/3.5/include/python3.5m
-I/usr/local/Cellar/python3/3.5.1/Frameworks/Python.frame
work/Versions/3.5/include/python3.5m -Wl,-no_pie conftest.c -lncurses -lm
-liconv -L/usr/loc
al/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m
-ldl -framework CoreFoundation -lpython3.5m -u _PyMac_Error
/usr/local/opt/python3/Frameworks/Python. framework/Versions/3.5/Python >&5
1109 Undefined symbols for architecture x86_64:
1110 "_PyMac_Error", referenced from:
1111 -u command line option
1112 ld: symbol(s) not found for architecture x86_64
1113 clang: error: linker command failed with exit code 1 (use -v to see
invocation)
```


``` python3
from distutils import sysconfig
getvar = sysconfig.get_config_var
getvar('LINKFORSHARED')
'-u _PyMac_Error
/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python'
```

It can be built by removing these two lines.
``` diff
diff --git a/gdb/python/python-config.py b/gdb/python/python-config
--- a/gdb/python/python-config.py 2015-12-18 22:46:55.000000000 +0800
+++ b/gdb/python/python-config.py 2015-12-18 22:47:22.000000000 +0800
@@ -72,7 +72,5 @@
libs.insert(0, '-L' + getvar('LIBPL'))
elif os.name == 'nt':
libs.insert(0, '-L' + sysconfig.PREFIX + '/libs')
- if getvar('LINKFORSHARED') is not None:
- libs.extend(getvar('LINKFORSHARED').split())
print (to_unix_path(' '.join(libs)))
```

Any suggestions?
--
You are receiving this mail because:
You are on the CC list for the bug.
congeec at live dot com
2015-12-18 16:28:06 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

Charles <congeec at live dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Not linked on Mac OS X |Not linked aginst Python
|10.10 with Python 3.5 |3.5 on Mac OS X 10.10
--
You are receiving this mail because:
You are on the CC list for the bug.
congeec at live dot com
2015-12-19 01:49:47 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

--- Comment #1 from Charles Wu <congeec at live dot com> ---
Related issues:
https://bugs.python.org/issue3588
https://github.com/Homebrew/homebrew/issues/11855
https://github.com/Homebrew/homebrew/pull/47146
--
You are receiving this mail because:
You are on the CC list for the bug.
congeec at live dot com
2015-12-19 02:17:11 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

--- Comment #2 from Charles Wu <congeec at live dot com> ---
Reason: python-config.py has been outdated.
Solution: updating python-config.py by copying the newest file from official
repo.

Related information:
patch: https://hg.python.org/cpython/rev/bab708624dc4/
newest file: https://hg.python.org/cpython/file/2.7/Misc/python-config.in
--
You are receiving this mail because:
You are on the CC list for the bug.
congeec at live dot com
2015-12-19 02:17:43 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

Charles Wu <congeec at live dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Not linked aginst Python |Not linked aginst Python
|3.5 on Mac OS X 10.10 |3.5 on Mac OS X 10.10
| |(caused by outdated
| |python-config.py)
--
You are receiving this mail because:
You are on the CC list for the bug.
congeec at live dot com
2016-01-13 01:11:55 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

Charles Wu <congeec at live dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |congeec at live dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 04:07:21 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19378

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
CC| |tromey at sourceware dot org

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Is there something gdb's build system can or should do about this?
It seems like a packaging error somewhere else.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...