Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install tries to install files outside of --prefix #48108

Closed
jjlee mannequin opened this issue Sep 13, 2008 · 3 comments
Closed

make install tries to install files outside of --prefix #48108

jjlee mannequin opened this issue Sep 13, 2008 · 3 comments
Labels
topic-installation type-bug An unexpected behavior, bug, or error

Comments

@jjlee
Copy link
Mannequin

jjlee mannequin commented Sep 13, 2008

BPO 3858
Nosy @pitrou

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-09-14.00:34:43.199>
created_at = <Date 2008-09-13.11:17:16.157>
labels = ['invalid', 'type-bug', 'expert-installation']
title = 'make install tries to install files outside of --prefix'
updated_at = <Date 2008-09-14.00:34:43.169>
user = 'https://bugs.python.org/jjlee'

bugs.python.org fields:

activity = <Date 2008-09-14.00:34:43.169>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2008-09-14.00:34:43.199>
closer = 'pitrou'
components = ['Installation']
creation = <Date 2008-09-13.11:17:16.157>
creator = 'jjlee'
dependencies = []
files = []
hgrepos = []
issue_num = 3858
keywords = []
message_count = 3.0
messages = ['73175', '73200', '73202']
nosy_count = 2.0
nosy_names = ['jjlee', 'pitrou']
pr_nums = []
priority = 'critical'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3858'
versions = ['Python 2.6']

@jjlee
Copy link
Mannequin Author

jjlee mannequin commented Sep 13, 2008

./configure --prefix=DIR && make && make install tries to install files
in directories outside of DIR. This happens both with trunk (r66412)
and 2.6b3. This is a problem for users of GNU stow, for example. I
know that certainly this worked fairly recently on the py3k branch, for
example, and I believe it also used to work on trunk.

I'm not certain whether in this particular run the --prefix directory
existed or not prior to make install, but I certainly get essentially
the same failure regardless of whether that directory exists.

~/src/Python-2.6b3$ ./configure --prefix=/home/john/stow/python26b3
...
~/src/Python-2.6b3$ make
...
~/src/Python-2.6b3$ make install
/usr/bin/install -c python-config
/home/john/stow/python26b3/bin/python2.6-config
rm python-config
./python -E ./setup.py install \
--prefix=/home/john/stow/python26b3 \
--install-scripts=/home/john/stow/python26b3/bin \
--install-platlib=/home/john/stow/python26b3/lib/python2.6/lib-dynload \
--root=/
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:
_bsddb _tkinter bsddb185
dbm gdbm sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

running build_scripts
running install_lib
copying build/lib.linux-i686-2.6/_random.so ->
/home/john/lib/python2.6/site-packages
error: could not delete
'/home/john/lib/python2.6/site-packages/_random.so': Permission denied
make: *** [sharedinstall] Error 1

@pitrou pitrou added topic-installation type-bug An unexpected behavior, bug, or error labels Sep 13, 2008
@jjlee
Copy link
Mannequin Author

jjlee mannequin commented Sep 13, 2008

OK, this was because I had a .pydistutils.cfg file containing the
following (ironically, put there following somebody's recipe for
installing setuptools packages using stow):

[install]
install_lib=/lib/python$py_version_short/site-packages
install_scripts=
/bin

[easy_install]
site_dirs=~/lib/python$py_version_short/site-packages

Removing that file, make install no longer tries to install files
outside of the directory passed to --prefix

So this bug is not valid, and I don't think there's any regression.

There's probably another bug about making it awkward to invent a
consistent way of installing Python software using tools like stow, but
I'm not sure whether that bug lies with Python or with setuptools, or both.

@pitrou
Copy link
Member

pitrou commented Sep 14, 2008

OK, thanks for the report anyway :)

@pitrou pitrou closed this as completed Sep 14, 2008
@pitrou pitrou added the invalid label Sep 14, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant