pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56785: Python 3.9 build fails with pkgsrc-2022Q1 on Linux



>Number:         56785
>Category:       pkg
>Synopsis:       Python 3.9 build fails with pkgsrc-2022Q1 on Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 10 00:35:00 +0000 2022
>Originator:     Yosuke Kawasaki
>Release:        pkgsrc-2022Q1
>Organization:
>Environment:
Debian linux 11.3 kernel 5.11.0 x86_64
>Description:
This problem appears to be similar to NetBSD Problem Report #56774.
The build of lang/python39 failed with the following error.

--- sharedmods ---
LD_LIBRARY_PATH=/var/pkg/work/lang/python39/work/Python-3.9.12 CC='cc -pthread' LDSHARED='cc -pthread -shared -L. -Wl,-zrelro -L/usr/lib64 -Wl,-R/usr/lib64 -L/var/pkg/lib -Wl,-
R/var/pkg/lib -Wl,-zrelro -L/usr/lib64 -Wl,-R/usr/lib64 -L/var/pkg/lib -Wl,-R/var/pkg/lib  ' OPT='-DNDEBUG -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -I/var/pkg/include -I/var/pkg/
include/ncurses -I/var/pkg/include/db4'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''  ./python -E ./setup.py  build
Traceback (most recent call last):
  File "/var/pkg/work/lang/python39/work/Python-3.9.12/./setup.py", line 17, in <module>
    import subprocess
ModuleNotFoundError: No module named 'subprocess'

>How-To-Repeat:
Run bmake in pkgsrc/lang/python39.
>Fix:
I found commenting out the following line from patch/patch-setup is effective in completing the build.

+sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix + '/').match(p)]

Under my environment, this line makes the sys.path an empty list.
Moreover, it worked fine if I change "if not" to "if".


Home | Main Index | Thread Index | Old Index