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 2010年08月24日 19:19 by mailtome, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python-destdir.patch | mailtome, 2010年08月24日 19:19 | |||
| fix-root-prefix.patch | anacrolix, 2011年06月14日 05:37 | |||
| issue9674.patch | George.Peristerakis, 2012年10月29日 03:36 | review | ||
| issue9674.patch | George.Peristerakis, 2012年11月03日 22:03 | review | ||
| issue9674-2.patch | Ivailo.Monev, 2015年02月13日 11:03 | Updated versin of the patch by George Peristerakis so it applies on Python 2.7.9, not tested on Python 3.x | ||
| Python-3.4.3-issue9674-3.patch | mro, 2015年05月29日 11:05 | Ivailo's 2.7.9 patch ported to 3.4.3 | ||
| Messages (20) | |||
|---|---|---|---|
| msg114804 - (view) | Author: aj (mailtome) | Date: 2010年08月24日 19:19 | |
I tried to install python with make install DESTDIR=/home/blah ./python -E ./setup.py install \ --prefix=/ \ --install-scripts=//bin \ --install-platlib=//lib/python2.6/lib-dynload \ --root=//home/blah running install running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Failed to find the necessary bits to build these modules: _tkinter bsddb185 dl imageop sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. running build_scripts running install_lib creating /lib/python2.6 error: could not create '/lib/python2.6': Permission denied make: *** [sharedinstall] Error 1 I asked for help on the mailing list http://groups.google.com/group/comp.lang.python/browse_thread/thread/a0b0e49f7b8153d1#, and according to Martin v. Loewis "If you have / as the prefix, you get two leading slashes, e.g. for //lib/python2.x. Any other prefix would have given you only a single slash: e.g. if it had been /usr, then you end up with /usr/lib/python2.x. Now, the code strips the first character to make it a relative path name (so that join can be used), which fails to work correctly if there are two leading slashes. " I have attached the patch provided by him. |
|||
| msg114851 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年08月24日 23:37 | |
Thank you for the report. I’m not sure I understand the bug. 1) On my linux-based system, doing something on //dir is the same thing as /dir. Is this a cosmetic bug (IOW, you’d like to see /dir and not //dir)? 2) Since I’m not root, creating /lib/python2.6 fails, as it should. (Note that distutils only prints one slash, which is nice.) What is the bug? 3) It’s not clear in your past whether you ran with DESTDIR=/ or DESTDIR=/home/blah. Can you tell what you want to do and what is the bug? Thanks again for the report. |
|||
| msg114853 - (view) | Author: aj (mailtome) | Date: 2010年08月25日 00:13 | |
I ran ./configure --prefix=/ make make install DESTDIR=/home/blah The installation tries to install at /lib/python2.6 which fails because I am not root. It should not try to install anything at / because I specified DESTDIR as /home/blah. |
|||
| msg114854 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年08月25日 00:24 | |
Thanks for the clarification. Can you test the bug with the versions that are still open for bug fixes, that is 2.7, 3.1 and 3.2? I’ll add tests and apply the original patch in distutils2. (distutils is frozen except for bug fixes, which this minor cosmetic change is not.) I’m not a configure or make expert, so I’ll request help from other developers when we have more information. |
|||
| msg114857 - (view) | Author: aj (mailtome) | Date: 2010年08月25日 00:44 | |
Thanks for the reply Eric. It is not a cosmetic thing. It's a bug for sure in python-2.6 disutils. I will try out python-2.7, 3.1, 3.2 and update the bug. |
|||
| msg114861 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年08月25日 00:57 | |
I have no certitude, but a strong intuition that distutils is not guilty at all here, but the makefile is. When I talk about the cosmetic bug, I refer to the double slash thing. |
|||
| msg114903 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2010年08月25日 13:33 | |
See also issue1676135. Seems that the posters were wrong in concluding that the double slashes wouldn't bother anyone using prefix=/ :) |
|||
| msg117679 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年09月30日 00:25 | |
Re-adding distutils since we’re not sure the bug does not apply there. aj, have you add time to test it? |
|||
| msg138291 - (view) | Author: Matt Joiner (anacrolix) | Date: 2011年06月14日 05:08 | |
Just ran into this bug myself with 3.2. Apparently this patch works: http://groups.google.com/group/comp.lang.python/msg/bd8818ab9d4af8d7 |
|||
| msg138292 - (view) | Author: Matt Joiner (anacrolix) | Date: 2011年06月14日 05:37 | |
Attached a patch that fixes it, only the line numbers have changed from Martin v. Loewis's patch. Used on 3.2. |
|||
| msg138374 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年06月15日 14:23 | |
Thanks. Have you run the test suite to make sure this doesn’t add bugs? |
|||
| msg171571 - (view) | Author: Ron Hubbard (anal.phabet) | Date: 2012年09月29日 13:28 | |
this is a very ugly bug and should be fixed ASAP it's not only breaking python itself, but any package that uses this python installer, for example http://seclists.org/nmap-dev/2012/q3/1025 what is preventing a merge of the existing patch ? |
|||
| msg171663 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年09月30日 19:45 | |
A unit test is needed. |
|||
| msg174101 - (view) | Author: George Peristerakis (George.Peristerakis) | Date: 2012年10月29日 03:36 | |
Here's a patch to the problem. I refactored the code to work the same way on posix, nt, os2 environments. Plus a unit test for the posix environment that the bug was initially for. |
|||
| msg174710 - (view) | Author: George Peristerakis (George.Peristerakis) | Date: 2012年11月03日 22:03 | |
Correction a typo error in the test. |
|||
| msg176820 - (view) | Author: Ron Hubbard (anal.phabet) | Date: 2012年12月03日 00:13 | |
George.Peristerakis' patch works please apply |
|||
| msg235887 - (view) | Author: Ivailo Monev (Ivailo.Monev) | Date: 2015年02月13日 11:03 | |
Can you please apply fix-root-prefix.patch? Or the updated version fof issue9674.patch that I've attached? sysconfig tests will still fail and it will return bogus paths with double slash (e.g. //lib/python2.7) but at least Python will be installable with prefix=/ and will not mess up with files on root (/) when DESTDIR is set. That may not be complete solution but it's a step forward to that. |
|||
| msg244367 - (view) | Author: Martin Olsen (mro) | Date: 2015年05月29日 11:05 | |
I have python (2.7.9 & 3.4.3) installed with prefix=/ which causes problems when change_root() doesn't lstrip() the path separators. I have applied Ivailo's patch from 2015年02月13日 and handful of packages without issues. Attached is a port of the patch to 3.4.3. Please note that the test failed (because it used the old distutils package, I suspect) and the win32 path handling is a bit messed up, but I don't have time to fix that ATM. It works as expected during runtime. |
|||
| msg299780 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2017年08月05日 13:10 | |
Issue 31114 is the same issue and proposes a workaround and another fix. |
|||
| msg305364 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2017年11月01日 10:03 | |
The problem is that the build system , Py_GetPath() and the distutils module do not handle correctly the case where the configure prefix is '/'. Closing as a duplicate of issue 31114. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:05 | admin | set | github: 53883 |
| 2017年11月01日 10:03:59 | xdegaye | set | status: open -> closed resolution: duplicate messages: + msg305364 stage: test needed -> resolved |
| 2017年08月05日 13:10:18 | xdegaye | set | nosy:
+ xdegaye messages: + msg299780 |
| 2015年05月29日 11:05:14 | mro | set | files:
+ Python-3.4.3-issue9674-3.patch nosy: + mro messages: + msg244367 |
| 2015年02月13日 11:03:36 | Ivailo.Monev | set | files:
+ issue9674-2.patch nosy: + Ivailo.Monev messages: + msg235887 |
| 2015年02月13日 08:33:21 | ned.deily | link | issue23435 superseder |
| 2012年12月03日 07:52:30 | Arfrever | set | nosy:
+ Arfrever |
| 2012年12月03日 00:13:55 | anal.phabet | set | messages: + msg176820 |
| 2012年11月03日 22:03:05 | George.Peristerakis | set | files:
+ issue9674.patch messages: + msg174710 |
| 2012年10月29日 03:36:02 | George.Peristerakis | set | files:
+ issue9674.patch nosy: + George.Peristerakis messages: + msg174101 |
| 2012年09月30日 19:45:54 | eric.araujo | set | messages:
+ msg171663 versions: + Python 3.4 |
| 2012年09月29日 13:28:25 | anal.phabet | set | messages: + msg171571 |
| 2012年09月28日 16:33:09 | eric.araujo | set | nosy:
+ anal.phabet |
| 2012年09月28日 16:32:46 | eric.araujo | link | issue16065 superseder |
| 2011年06月15日 14:23:33 | eric.araujo | set | versions:
+ Python 3.3, - Python 3.1 messages: + msg138374 assignee: tarek -> eric.araujo components: - Build, Installation, Library (Lib) type: compile error -> behavior stage: test needed |
| 2011年06月14日 05:38:29 | anacrolix | set | nosy:
+ alexis type: behavior -> compile error components: + Build, Library (Lib) |
| 2011年06月14日 05:37:15 | anacrolix | set | files:
+ fix-root-prefix.patch messages: + msg138292 |
| 2011年06月14日 05:08:52 | anacrolix | set | nosy:
+ anacrolix messages: + msg138291 |
| 2010年09月30日 00:25:05 | eric.araujo | set | versions:
+ 3rd party nosy: tarek, eric.araujo, rpetrov, r.david.murray, mailtome messages: + msg117679 assignee: tarek components: + Distutils |
| 2010年08月25日 15:35:26 | rpetrov | set | nosy:
+ rpetrov |
| 2010年08月25日 13:33:26 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg114903 |
| 2010年08月25日 00:57:37 | eric.araujo | set | messages: + msg114861 |
| 2010年08月25日 00:44:56 | mailtome | set | messages: + msg114857 |
| 2010年08月25日 00:24:27 | eric.araujo | set | assignee: tarek -> (no value) messages: + msg114854 components: - Distutils nosy: tarek, eric.araujo, mailtome |
| 2010年08月25日 00:15:14 | mailtome | set | title: make install DESTDIR=/ fails -> make install DESTDIR=/home/blah fails when the prefix specified is / |
| 2010年08月25日 00:14:00 | mailtome | set | messages: + msg114853 |
| 2010年08月24日 23:37:20 | eric.araujo | set | assignee: tarek type: compile error -> behavior components: + Distutils, Distutils2 versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6 nosy: + eric.araujo, tarek messages: + msg114851 |
| 2010年08月24日 19:19:45 | mailtome | create | |