This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年02月17日 08:17 by kewang, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| util.diff | kewang, 2009年02月18日 08:34 | |||
| util.diff | kewang, 2009年02月19日 02:48 | Fixed the TabError | ||
| Messages (7) | |||
|---|---|---|---|
| msg82303 - (view) | Author: Ke Wang (kewang) | Date: 2009年02月17日 08:17 | |
Under Solaris, find_library can not give the correct path. Solaris does not have /sbin/ldconfig, so _findLib_gcc is used. def _findLib_gcc(name): expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) fdout, ccout = tempfile.mkstemp() os.close(fdout) cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; else CC=cc; fi;' \ '$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name try: f = os.popen(cmd) trace = f.read() f.close() finally: try: os.unlink(ccout) except OSError, e: if e.errno != errno.ENOENT: raise res = re.search(expr, trace) if not res: return None return res.group(0) I executed these code manually, and after ‘trace = f.read()‘, I printed the content of 'trace', which was just as following: Undefined first referenced symbol in file main /usr/lib/crt1.o ld: fatal: symbol referencing errors. No output written to /tmp/tmpYN85Fm collect2: ld returned 1 exit status |
|||
| msg82317 - (view) | Author: Ke Wang (kewang) | Date: 2009年02月17日 10:54 | |
I tested the command 'gcc -Wl,-t' on Ubuntu, it works fine. But on Solaris, it doesn't work as expected. Finally I find that gcc does not use GNU ld on Solaris, instead, it uses SUN ld. |
|||
| msg82412 - (view) | Author: Ke Wang (kewang) | Date: 2009年02月18日 08:34 | |
On Solaris, we can use crle to find system library path. Attached a patch to get find_library work with Solaris. |
|||
| msg82449 - (view) | Author: Ke Wang (kewang) | Date: 2009年02月19日 02:48 | |
Above patch failed in a TabError. Attached a new one. |
|||
| msg146076 - (view) | Author: Falk Nisius (FalkNisius) | Date: 2011年10月21日 10:02 | |
Under Ubuntu 11.04 is the _findLib_gcc used and not a ldconfig method. Why should I install a gcc only to find a dynamic library ? It seems not a well design. The usage of ldconfig, what is more natural at a server in the net than a c compiler. Perhaps it can be changed in the next version, because I can see that on other os th ldconfig method would be preferred. I'm not an python programmer and have not the possibilities to make a regeression test, thats why I can not help. |
|||
| msg180725 - (view) | Author: Skip Montanaro (skip.montanaro) * (Python triager) | Date: 2013年01月27日 00:23 | |
Is there still time to get this bug fixed in 2.7.3? I patched my 2.7 ctypes/util.py with the latest version (offset a few lines, but no other problems) and verified that it seems to fix the issue. When running util.py as a main program I see this before running patch: % python /opt/TWWfsw/python27/lib/python2.7/ctypes/util.py None None None <CDLL 'libm.so', handle fed807b8 at 82c320c> <CDLL 'libcrypt.so', handle feb703a8 at 82c320c> None After applying the patch: % python /opt/TWWfsw/python27/lib/python2.7/ctypes/util.py libm.so.2 libc.so.1 libbz2.so.1 <CDLL 'libm.so', handle fed807b8 at 82c296c> <CDLL 'libcrypt.so', handle feb703a8 at 82c296c> libcrypt_d.so.1 |
|||
| msg181305 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年02月04日 00:27 | |
New changeset d76fb24d79c3 by Benjamin Peterson in branch '2.7': fix find_library on Solaris (closes #5289) http://hg.python.org/cpython/rev/d76fb24d79c3 New changeset 73574de2068b by Benjamin Peterson in branch '3.3': fix find_library on Solaris (closes #5289) http://hg.python.org/cpython/rev/73574de2068b New changeset 640a80adb9df by Benjamin Peterson in branch 'default': merge 3.3 (#5289) http://hg.python.org/cpython/rev/640a80adb9df |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:45 | admin | set | github: 49539 |
| 2013年02月04日 00:27:26 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg181305 resolution: fixed stage: resolved |
| 2013年01月28日 11:50:36 | trent | set | nosy:
+ trent |
| 2013年01月27日 00:23:38 | skip.montanaro | set | nosy:
+ skip.montanaro messages: + msg180725 |
| 2012年12月13日 11:26:37 | aliles | set | nosy:
+ aliles |
| 2011年10月21日 10:02:36 | FalkNisius | set | nosy:
+ FalkNisius messages: + msg146076 |
| 2011年10月17日 08:25:35 | automatthias | set | nosy:
+ automatthias |
| 2010年08月05日 00:46:44 | terry.reedy | set | versions: + Python 2.7, - Python 2.6 |
| 2009年02月19日 02:48:55 | kewang | set | files:
+ util.diff messages: + msg82449 |
| 2009年02月18日 21:19:46 | laca | set | nosy: + laca |
| 2009年02月18日 08:34:11 | kewang | set | files:
+ util.diff keywords: + patch messages: + msg82412 |
| 2009年02月17日 10:54:30 | kewang | set | messages: + msg82317 |
| 2009年02月17日 08:17:14 | kewang | create | |