Issue 11934: build with --prefix=/dev/null and zlib enabled in Modules/Setup failed (original) (raw)

Created on 2011-04-27 10:09 by ysj.ray, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (9)
msg134544 - (view) Author: ysj.ray (ysj.ray) Date: 2011-04-27 10:09
The development guide(http://docs.python.org/devguide/setup.html) suggested that one can build with "--prefix=/dev/null" in order to avoid accidentally install it. But in the Modules/Setup.dist the zlib module is defined as: zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz So configure with "--prefix=/dev/null " and enable zlib in Module/Setup and then make results in such error: (debian 5) cc1: error: /dev/null/include: Not a directory Not sure if this is really a problem. But I need to modify the Module/Setup zlib line to """ zlib zlibmodule.c -L$(exec_prefix)/lib -lz """ instead of just uncomment it to make my build process success. I think it's better to be improved.
msg137456 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-06-01 19:20
Well, IIUC the Setup lines indicate where to find the system version of the libraries (otherwise the included zlib is used). So I'm not at all sure that there is a bug here. If you change Setup, you need to change it correctly for your intended installation.
msg137651 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-04 15:42
Isn’t zlib built by setup.py anyway?
msg138316 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-06-14 14:34
Well, using $(prefix)/include to fetch development headers sounds like the wrong strategy anyway. Just because you e.g. install into /usr/local doesn't mean your zlib is inside /usr/local too. And if that makes people use our own zlib headers by mistake, then it's doubly wrong IMO.
msg138359 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-06-15 08:17
FWIW, I recall that I built 2.7 a while back with --prefix=/home/user/something and it also failed to find zlib. Due to lack of time, I didn't debug it very deeply then, though.
msg138370 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-06-15 13:45
I normally build using --prefix, often with --prefix=/dev/null, and I can't recall any version not building zlib. Of course, I don't uncomment the zlib entry in Modules/Setup. As far as I can see the zlib entry is unique in Setup in using prefix, so it probably is a bug (or, rather, a holdover from when there were various issues with the platform zlib).
msg138379 - (view) Author: ysj.ray (ysj.ray) Date: 2011-06-15 14:47
Isn’t zlib built by setup.py anyway? If can be build by Modules/Setup first as a builtin module, then the setup.py woun't build it.
msg141049 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-24 18:09
ysj.ray: As you're on Debian, the real cause of this might be issue 11715. The Modules/Setup.dist line for zlib is commented out, so it's only an example of how to enable zlib if it's not found automatically. Can you try again now that issue 11715 has been fixed?
msg199759 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-10-13 18:35
Closing due to lack of feedback.
History
Date User Action Args
2022-04-11 14:57:16 admin set github: 56143
2013-10-13 18:35:01 georg.brandl set status: pending -> closednosy: + georg.brandlmessages: + resolution: works for me
2011-07-24 18:09:21 petri.lehtinen set status: open -> pendingmessages: +
2011-06-15 14:47:06 ysj.ray set messages: +
2011-06-15 13:45:34 r.david.murray set messages: + versions: - Python 2.6, Python 3.1
2011-06-15 08:17:43 petri.lehtinen set messages: +
2011-06-14 14:34:08 pitrou set nosy: + pitrou, loewismessages: + stage: needs patch
2011-06-14 06:27:16 petri.lehtinen set nosy: + petri.lehtinen
2011-06-04 15:42:40 eric.araujo set status: pending -> opennosy: + eric.araujomessages: + resolution: not a bug -> (no value)
2011-06-01 19:20:35 r.david.murray set status: open -> pendingnosy: + r.david.murraymessages: + resolution: not a bug
2011-06-01 06:31:55 terry.reedy set versions: - Python 2.5
2011-04-27 10:09:31 ysj.ray create