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.

classification
Title: zlib missing when --enable--optimizations option appended
Type: behavior Stage: resolved
Components: Versions: Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, kyren, kyren 原子喵, ned.deily, vstinner
Priority: normal Keywords:

Created on 2017-03-25 05:19 by kyren 原子喵, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
config.log kyren, 2017-03-27 11:46
make.log kyren, 2017-03-27 11:47
Messages (9)
msg290465 - (view) Author: kyren 原子喵 (kyren 原子喵) Date: 2017-03-25 05:19
i think it happens to all versions that recognizes the optimizations option. At least I confirmed python version 3.4.6, 3.5.3, 3.6.1, when `--enable-optimizations` is appended, `zlib` cannot be imported, `No module named zlib`. I'm working on Ubuntu 14.04 by the way. I don't know if it's system specific.
msg290485 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-03-25 14:22
--enable-optimizations does not exist in Python 3.4.x so any failures there must be due to something else.  Are there any build errors?  Can you show exactly where the message comes from?
msg290516 - (view) Author: kyren (kyren) Date: 2017-03-26 08:14
There's no build errors. The compiling and installing process is error-free. Take 3.5.3 as example, it's all good until you enter 3.5.3 python shell and type `import zlib`, it gives `No module name zlib`. I solved by make a `libz.so` link in my `/lib` dir to the `libz.so.1` file in my `/lib/x86_64-linux-gnu` dir according to a thread in Ubuntu forum. It may be system specific, I don't know yet.
msg290581 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-27 10:52
Can you please attach config.log file? And maybe also redirect the output of "make" into a log file and then attach this log file as well? Example: make 2>&1 >make.log.
msg290591 - (view) Author: kyren (kyren) Date: 2017-03-27 11:46
This is the config.log.
msg290592 - (view) Author: kyren (kyren) Date: 2017-03-27 11:47
This is make.log.
msg290597 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-27 12:01
Strange, I don't see any obvious error related to the C "z" lib or to the Python "zlib" module.

Example on my system:

haypo@selma$ python3
Python 3.5.2 (default, Sep 14 2016, 11:28:32) 
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> zlib
<module 'zlib' from '/usr/lib64/python3.5/lib-dynload/zlib.cpython-35m-x86_64-linux-gnu.so'>
>>> 
haypo@selma$ ldd /usr/lib64/python3.5/lib-dynload/zlib.cpython-35m-x86_64-linux-gnu.so
	linux-vdso.so.1 (0x00007fff22f2e000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f88e1fe0000)
	libpython3.5m.so.1.0 => /lib64/libpython3.5m.so.1.0 (0x00007f88e1b13000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f88e18f5000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f88e152f000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f88e132b000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007f88e1126000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f88e0e1d000)
	/lib64/ld-linux-x86-64.so.2 (0x000055d00b915000)
haypo@selma$ ldd /usr/lib64/python3.5/lib-dynload/zlib.cpython-35m-x86_64-linux-gnu.so^C
haypo@selma$ ls -l /lib64/libz.so.1
lrwxrwxrwx. 1 root root 13  5 févr.  2016 /lib64/libz.so.1 -> libz.so.1.2.8

Can you check if you have a "zlib.(...).so" file in /usr/lib64/python3.5/lib-dynload/? (ajust to the right directory)
msg290598 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-27 12:02
See also the issue #29641 "make install failure when using ./configure --enable-optimizations".
msg408057 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-12-09 00:20
Version 3.3 is no longer supported, and it doesn't look like there is enough information here for core devs to understand what happened.

I'll close this, but please create a new issue if you are still having this problem with a current version (>= 3.9).
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 74085
2021-12-09 00:20:27iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg408057

resolution: out of date
stage: resolved
2017-03-27 12:02:21vstinnersetmessages: + msg290598
2017-03-27 12:01:40vstinnersetmessages: + msg290597
2017-03-27 11:47:09kyrensetfiles: + make.log

messages: + msg290592
2017-03-27 11:46:39kyrensetfiles: + config.log

messages: + msg290591
2017-03-27 10:52:13vstinnersetnosy: + vstinner
messages: + msg290581
2017-03-26 08:14:29kyrensetnosy: + kyren
messages: + msg290516
2017-03-25 14:22:55ned.deilysetnosy: + ned.deily
messages: + msg290485
2017-03-25 05:19:41kyren 原子喵create