Summary: | lang/python3*: install fails if archivers/lzmalib is installed | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Eir Nym <eirnym> | ||||||
Component: | Individual Port(s) | Assignee: | Kubilay Kocak <koobs> | ||||||
Status: | In Progress --- | ||||||||
Severity: | Affects Some People | CC: | arved, dbaio, doctor, eirnym, eserte12, koobs, loader, python, tech-lists, w.schwarzenfeld | ||||||
Priority: | --- | Keywords: | needs-qa | ||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
URL: | https://reviews.freebsd.org/D26477 | ||||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210626 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243817 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217244 |
||||||||
Attachments: |
|
Description
Eir Nym
2016-05-07 09:51:06 UTC
It seems to be old bug, but I haven't found it. I think this is because you can find liblzma in /usr/lib and in /usr/local/lib and the latest doesn't want to be compiled with Python over to python maintainers lzmalib is only need by two ports: /archivers/p5-Compress-Raw-Lzma and databases/tokyocabinet. Both have OPTIONS to change. I want to install and use databases/tokyocabinet with LZMA support and it doesn't accept lzmalib from base. and Python doesn't accept lzmalib from ports. deadlock? it seems to work if you add to the lang/python35/Makefile LIB_DEPENDS= liblzma.so.1:archivers/lzmalib \ libbz2.so:archivers/bzip2 and create a new pkg-plist with make makeplist or genplist. I provide no diff, cause I am not sure if the "new" pkg-plist is ok. Note: I have only compiled it with python35. Not really tested. This could only be a workaround for the moment. find /usr/ports/lang/python34/work/stage/* -type f|grep lzma /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/__pycache__/lzma.cpython-34.pyc /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/__pycache__/lzma.cpython-34.pyo /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/lib-dynload/_lzma_failed.so /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/lzma.py /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/test/test_lzma.py /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/test/__pycache__/test_lzma.cpython-34.pyc /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/test/__pycache__/test_lzma.cpython-34.pyo ---- lib/python3.4/__pycache__/lzma.cpython-34.pyc lib/python3.4/__pycache__/lzma.cpython-34.pyo /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/lib-dynload/_lzma_failed.so lib/python3.4/lzma.py lib/python3.4/test/__pycache__/test_lzma.cpython-34.pyc lib/python3.4/test/__pycache__/test_lzma.cpython-34.pyo lib/python3.4/test/test_lzma.py --- the difference is: /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/lib-dynload/_lzma_failed.so and lib/python3.4/lzma.py It seems it is only mispelled in pkg-plist. Compare it with python35 pkg-plist (has _lzma_failed.so) correct a typo: the difference is: stage: /usr/ports/lang/python34/work/stage/usr/local/lib/python3.4/lib-dynload/_lzma_failed.so and pkg-plist lib/python3.4/_lzma.py It looks it tries to link the /usr/local/lib/liblzma.so instead of /usr/lib/liblzma.so. and liblzma.so from the port archives/lzmalib doesn't have "lzma_properties_size". The first "-L/usr/local/lib" in the "cc -shared" comes from Mk/readline.mk, it make the linker to search this directory before the default directories. ------------------------------------------------------------- building '_lzma' extension cc -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O -pipe -fno-strict-aliasing -Werror=declaration-after-statement -I./Include -I. -IInclude -I/usr/local/include -I/usr/ports/lang/python35/work/Python-3.5.2/Include -I/usr/ports/lang/python35/work/Python-3.5.2 -c /usr/ports/lang/python35/work/Python-3.5.2/Modules/_lzmamodule.c -o build/temp.freebsd-12.0-CURRENT-arm-3.5/usr/ports/lang/python35/work/Python-3.5.2/Modules/_lzmamodule.o cc -shared -lpthread -Wl,-rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -lpthread -Wl,-rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -O -pipe -fno-strict-aliasing -I/usr/local/include -I/usr/local/include build/temp.freebsd-12.0-CURRENT-arm-3.5/usr/ports/lang/python35/work/Python-3.5.2/Modules/_lzmamodule.o -L. -L/usr/local/lib -llzma -lpython3.5m -o build/lib.freebsd-12.0-CURRENT-arm-3.5/_lzma.so *** WARNING: renaming "_lzma" since importing it failed: build/lib.freebsd-12.0-CURRENT-arm-3.5/_lzma.so: Undefined symbol "lzma_properties_size" Created attachment 174374 [details]
link liblzma.so.5
workaround 1
The port archives/lzmalibs provides /usr/local/lib/liblzma.so.1
and the base has /usr/lib/liblzma.so.5.
If there exists a /usr/local/lib/liblzma.so.1. then pass the "-l:liblzma.so.5"
to make it link the library in the base.
Created attachment 174375 [details]
archives/py35-lzma
workaround 2
disable compiling _lzma in lang/python35 and move it to a separate port.
there would be no USES= readline in that port and no version number of
the base liblzma.so in the patch.
Just my thoughts, not proposing these workarounds as the fix.
(In reply to Fukang Chen from comment #9) s|Mk/readlink.mk|Mk/Uses/readline.mk| Any news here? removed expired python34 from subject. *** Bug 243817 has been marked as a duplicate of this bug. *** *** Bug 249042 has been marked as a duplicate of this bug. *** Python 2.x doesn't provide an lzma module (vbia dbaio) |