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 2005年10月13日 19:07 by slanger, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| build_ext.diff | slanger, 2005年10月13日 19:07 | patch for build_ext.py | ||
| Messages (18) | |||
|---|---|---|---|
| msg48863 - (view) | Author: Stephen A. Langer (slanger) | Date: 2005年10月13日 19:07 | |
It's impossible to specify more than one external library to link using build_ext --libraries. Bug 716634 says that the problem is fixed, but it isn't. Assuming that the desired format is --libraries="lib1 lib2 etc", then there's a simple one line fix which I've attached. The problem exists in python 2.3.5, 2.4.1, 2.4.2 and in cvs HEAD. |
|||
| msg59315 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年01月05日 19:40 | |
Another bug day task |
|||
| msg121221 - (view) | Author: Palm Kevin (palm.kevin) | Date: 2010年11月15日 11:17 | |
This one is really annoying. Could you please consider fixing this one for the next release? (=lightweight change) |
|||
| msg121223 - (view) | Author: Tarek Ziadé (tarek) * (Python committer) | Date: 2010年11月15日 11:37 | |
Distutils is frozen and we fix only bugs. This case is a little bit at the edge. Can you show us an example of a call you are trying to make, and the gcc command line output that fails ? I want to see if we can find a workaround. If so, this will be changed only in Distutils2. If not I'll change this to a bug and we'll fix it in distutils too. |
|||
| msg121225 - (view) | Author: Palm Kevin (palm.kevin) | Date: 2010年11月15日 12:31 | |
I applied the patch proposed by slanger. This one is working. Now, I'm executing this instruction to build my extension: "%pythonRoot%\python.exe" setup.py build_ext --include-dirs "C:\MyApp\include" --library-dir "C:\MyApp\lib" --libraries "myLib1 myLib2" If I don't use the patch, then the error I get is 'unresolved external symbol _xxx referenced in function _abc'. Which is quite normal since I can only point to one library... |
|||
| msg121236 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年11月15日 16:26 | |
Since "--libraries" is plural, and since the help text says: --libraries (-l) external C libraries to link with it should IMO be considered a bug. (Standard UNIX linkers have a different convention: you can specify -l several times in order to link against several libraries; however, distutils seems to ignore all but the last -l option) |
|||
| msg121260 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月16日 03:08 | |
I agree this is a bug: it’s a broken feature, not a new one, even if it can be argued that fixing a long-standing behavior enables new usages, and is thus comparable to a new feature.
I found no mention of --libraries in the docs, so I looked at the file history, and it’s clear that the intent of the code does not match its behavior. The fix is simple:
- if isinstance(self.libraries, str):
- self.libraries = [self.libraries]
+ self.ensure_string_list('libraries')
I guess Greg forgot to change that line of code when he invented the ensure_* methods. No test is broken by this change. Do we need a regression test for this? It’s not strictly required IMO.
FTR, in distutils2, I want to make the types and formats clear for everything. For example, build_ext.swig_opts is defined as "a list" in the current docs, this time with an example that shows it’s space-separated ("--swig-opts="-modern -I../include""). The code does not use ensure_string_list, and hence does not support comma-separated. IMO, any value described as list should accept space-separated and comma-separated. This is probably out of scope for distutils, but something I definitely want to improve in distutils2. Supporting multiple options (-lm -lfoo) is IMO feasible too.
|
|||
| msg121262 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月16日 03:40 | |
I’ve reviewed other modules for the same error and found two candidates: config.libraries, the same thing as build_ext.libraries, and install.extra_path, for which I’m not sure. (More distutils2 thoughts: A number of options are split on os.pathsep, a new ensure_dirs_list method looks in order. Regarding the type system, an angry comment in build_py confirmed the need :) |
|||
| msg153367 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2012年02月14日 19:37 | |
Ran into this bug today in 2.7 (building python-sybase with freetds). The fix in msg121260 took care of it (didn't try the patch). Thanks, Éric. Is this something that could get patched in the upcoming micro releases? It's not so important for me at this point, and I'm not sure how often it will come up, but it's also a very simple fix. |
|||
| msg153408 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 16:15 | |
New changeset 53df93a9c002 by Éric Araujo in branch '3.2': Fix parsing of build_ext --libraries option (#1326113) http://hg.python.org/cpython/rev/53df93a9c002 New changeset f7163afecb97 by Éric Araujo in branch 'default': Merge fixes for #1326113 and #12297 from 3.2 http://hg.python.org/cpython/rev/f7163afecb97 |
|||
| msg153409 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 16:15 | |
New changeset 96f5718bf005 by Éric Araujo in branch '2.7': Fix parsing of build_ext --libraries option (#1326113) http://hg.python.org/cpython/rev/96f5718bf005 |
|||
| msg153411 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 16:25 | |
New changeset 4ba43318e56b by Éric Araujo in branch 'default': Fix parsing of packaging’s build_ext --libraries option (#1326113) http://hg.python.org/cpython/rev/4ba43318e56b |
|||
| msg153412 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 16:39 | |
New changeset 60dd0041c9bc by Éric Araujo in branch 'default': Fix parsing of build_ext --libraries option (#1326113) http://hg.python.org/distutils2/rev/60dd0041c9bc New changeset 158697fd8fa1 by Éric Araujo in branch 'python3': Merge #1326113 fix from default http://hg.python.org/distutils2/rev/158697fd8fa1 |
|||
| msg153413 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月15日 16:41 | |
Here you are! Thanks for the testing. |
|||
| msg153418 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 17:13 | |
New changeset 77ac369fbbf1 by Éric Araujo in branch '3.2': Fix test failure for shared builds caused by #1326113 fix http://hg.python.org/cpython/rev/77ac369fbbf1 |
|||
| msg153419 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 17:14 | |
New changeset 98fb1c0fc7a0 by Éric Araujo in branch 'default': Fix for packaging test failure on shared builds (#1326113) http://hg.python.org/cpython/rev/98fb1c0fc7a0 |
|||
| msg153420 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 17:15 | |
New changeset db1c52aa4d2a by Éric Araujo in branch '2.7': Fix test failure for shared builds caused by #1326113 fix http://hg.python.org/cpython/rev/db1c52aa4d2a |
|||
| msg158949 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年04月22日 05:58 | |
Another instance of this is #1703178. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:13 | admin | set | github: 42479 |
| 2012年04月22日 05:58:51 | eric.araujo | set | messages: + msg158949 |
| 2012年02月15日 17:15:04 | python-dev | set | messages: + msg153420 |
| 2012年02月15日 17:14:57 | python-dev | set | messages: + msg153419 |
| 2012年02月15日 17:13:13 | python-dev | set | messages: + msg153418 |
| 2012年02月15日 16:41:29 | eric.araujo | set | status: open -> closed versions: + Python 3.3, - Python 3.1 messages: + msg153413 resolution: fixed stage: test needed -> resolved |
| 2012年02月15日 16:39:58 | python-dev | set | messages: + msg153412 |
| 2012年02月15日 16:25:34 | python-dev | set | messages: + msg153411 |
| 2012年02月15日 16:15:55 | python-dev | set | messages: + msg153409 |
| 2012年02月15日 16:15:07 | python-dev | set | nosy:
+ python-dev messages: + msg153408 |
| 2012年02月14日 19:37:30 | eric.snow | set | nosy:
+ eric.snow messages: + msg153367 |
| 2010年11月16日 03:40:50 | eric.araujo | set | messages: + msg121262 |
| 2010年11月16日 03:08:31 | eric.araujo | set | assignee: tarek -> eric.araujo type: enhancement -> behavior components: + Distutils2 versions: + 3rd party, Python 3.1, Python 2.7 nosy: slanger, pitrou, christian.heimes, tarek, eric.araujo, palm.kevin messages: + msg121260 stage: test needed |
| 2010年11月16日 02:23:25 | eric.araujo | link | issue716634 superseder |
| 2010年11月15日 16:26:21 | pitrou | set | nosy:
+ pitrou, eric.araujo messages: + msg121236 |
| 2010年11月15日 12:31:26 | palm.kevin | set | messages: + msg121225 |
| 2010年11月15日 11:37:37 | tarek | set | messages: + msg121223 |
| 2010年11月15日 11:17:01 | palm.kevin | set | nosy:
+ palm.kevin messages: + msg121221 |
| 2010年07月10日 22:56:48 | terry.reedy | set | versions: + Python 3.2, - Python 2.6, Python 3.0, Python 3.1, Python 2.7 |
| 2009年02月08日 19:32:41 | tarek | set | assignee: tarek versions: + Python 3.0, Python 3.1, Python 2.7 |
| 2009年02月08日 18:57:48 | akitada | set | nosy:
+ tarek type: enhancement |
| 2008年01月05日 19:40:31 | christian.heimes | set | nosy:
+ christian.heimes messages: + msg59315 versions: + Python 2.6 |
| 2005年10月13日 19:07:43 | slanger | create | |