This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/19378] New: Not linked on Mac OS X 10.10 with Python 3.5


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]