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.
Created on 2018年04月24日 11:06 by Lucian Cristian, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg315693 - (view) | Author: Lucian Cristian (Lucian Cristian) | Date: 2018年04月24日 11:06 | |
trying to compile a utility in Openwrt and when pip-install is selected and zlib is linked to python I get this: staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_crc32': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:1045: undefined reference to `crc32' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:1053: undefined reference to `crc32' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_adler32': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:1013: undefined reference to `adler32' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:1021: undefined reference to `adler32' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `Decomp_dealloc': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:469: undefined reference to `inflateEnd' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `Comp_dealloc': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:459: undefined reference to `deflateEnd' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_objcompress': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:504: undefined reference to `deflate' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_copy': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:772: undefined reference to `deflateCopy' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_uncopy': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:821: undefined reference to `inflateCopy' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_decompressobj': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:434: undefined reference to `inflateInit2_' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_compressobj': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:398: undefined reference to `deflateInit2_' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_objdecompress': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:632: undefined reference to `inflate' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_decompress': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:308: undefined reference to `inflateInit2_' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:335: undefined reference to `inflate' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:360: undefined reference to `inflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:318: undefined reference to `inflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:344: undefined reference to `inflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:349: undefined reference to `inflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:330: undefined reference to `inflateEnd' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o):build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:365: more undefined references to `inflateEnd' follow staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_unflush': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:892: undefined reference to `inflate' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:918: undefined reference to `inflateEnd' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_flush': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:713: undefined reference to `deflate' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:728: undefined reference to `deflateEnd' staging_dir/hostpkg/lib/libpython2.7.a(zlibmodule.o): In function `PyZlib_compress': build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:220: undefined reference to `deflateInit_' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:233: undefined reference to `deflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:250: undefined reference to `deflate' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:245: undefined reference to `deflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:254: undefined reference to `deflateEnd' build_dir/hostpkg/Python-2.7.14/./Modules/zlibmodule.c:265: undefined reference to `deflateEnd' collect2: error: ld returned 1 exit status python has access to zlib headers and libraries |
|||
| msg315705 - (view) | Author: Lucian Cristian (Lucian Cristian) | Date: 2018年04月24日 15:55 | |
it seems that python-config --libs doesn't detect -lz and appending -lz fixes the problem
- PYTHON_LIBS="`\"${PYTHONCONFIG}\" --libs`"
+ PYTHON_LIBS="`\"${PYTHONCONFIG}\" --libs` -lz"
|
|||
| msg363429 - (view) | Author: Martin Ni (Martin Ni) | Date: 2020年03月05日 11:46 | |
Hello sir! I got exactly same issue when compile some ipk in Openwrt. Would tell how to add "-lz" to python-config? I am not so familiar with Python coding. Thanks! |
|||
| msg401581 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2021年09月10日 14:59 | |
The report only shows output for 2.7. Is this issue really relevant to 3.x? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:59 | admin | set | github: 77528 |
| 2021年10月20日 23:34:08 | iritkatriel | set | status: pending -> closed resolution: out of date stage: resolved |
| 2021年09月10日 14:59:27 | iritkatriel | set | status: open -> pending nosy: + iritkatriel messages: + msg401581 |
| 2020年03月05日 11:46:29 | Martin Ni | set | nosy:
+ Martin Ni messages: + msg363429 |
| 2018年04月27日 18:59:07 | terry.reedy | set | nosy:
+ twouters, serhiy.storchaka versions: + Python 3.8, - Python 3.4, Python 3.5 |
| 2018年04月24日 15:55:06 | Lucian Cristian | set | messages: + msg315705 |
| 2018年04月24日 11:06:00 | Lucian Cristian | create | |