
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-08-16 21:29 byJohn.Malmberg, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Messages (3) | |||
|---|---|---|---|
| msg225417 -(view) | Author: John Malmberg (John.Malmberg)* | Date: 2014-08-16 21:29 | |
If the zlib.so fails to build while building python, subsequent runs of setup.py fail, which prevents a trying again to build zlib.so after the issue is fixed unless all the .so modules built are deleted. File "/PRJ_ROOT/CPYTHON/Lib/zipfile.py", line 20, in <module> crc32 = zlib.crc32AttributeError: module 'zlib' has no attribute 'crc32'make: *** [sharedmods] Error 1zipfile.py is trying to test for a missing zlib.so by checking if the import fails.The problem is that while the zlib module did not get built, the import of it succeeds because the directory is now in the module path at thispoint in the build.Using -v on Python shows the import succeeding.Python 3.5.0a0 (default, Aug 13 2014, 19:13:13) [C] on openvms0Type "help", "copyright", "credits" or "license" for more information. >>> import zlib# possible namespace for /PRJ_ROOT/CPYTHON/Modules/zlibimport 'zlib' # None.In order to get setup.py to work in this case, the following patch isneeded for zipfile.py--- /src_root/cpython/Lib/zipfile.py Mon Jun 16 18:00:20 2014+++ /vms_root/cpython/Lib/zipfile.py Thu Aug 14 20:39:47 2014@@ -18,7 +18,7 @@ try: import zlib # We may need its compression method crc32 = zlib.crc32-except ImportError:+except (ImportError, AttributeError): zlib = None crc32 = binascii.crc32This is not a complete solution for zlib.so module not building. The run_tests.py also fails when zlib.so is not present.Setup.py reports that zlib.so is an optional module, so not being build should not cause the setup.py to fail. | |||
| msg226544 -(view) | Author: Alex LordThorsen (Alex.LordThorsen)* | Date: 2014-09-07 21:03 | |
Just adding that I have also run into this problem. | |||
| msg226550 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2014-09-08 00:28 | |
This problem has been introduced by the initial changes forIssue17095. That issue has been re-opened and the resolution will be covered there. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:07 | admin | set | github: 66408 |
| 2014-09-08 00:28:28 | ned.deily | set | status: open -> closed superseder:Shared modules built with Modules/Setup are not found when run from build directory nosy: +ned.deily messages: +msg226550 resolution: duplicate stage: needs patch -> resolved |
| 2014-09-07 21:03:01 | Alex.LordThorsen | set | nosy: +Alex.LordThorsen messages: +msg226544 |
| 2014-08-17 18:15:50 | ezio.melotti | set | nosy: +ezio.melotti type: behavior stage: needs patch |
| 2014-08-16 21:29:12 | John.Malmberg | create | |