|
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
Date: 2011-06-15 14:23 |
Thanks. Have you run the test suite to make sure this doesn’t add bugs?
|
|
| Date |
User |
Action |
Args |
| 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 | nosy:
+ eric.araujo, tarek versions:
+ Python 3.1, Python 2.7, Python 3.2, - Python 2.6 messages:
+ msg114851
assignee: tarek components:
+ Distutils, Distutils2 type: compile error -> behavior |
| 2010-08-24 19:19:45 | mailtome | create | |