pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/52755: lang/python27 needs comp.tgz to find shared libraries
>Number: 52755
>Category: pkg
>Synopsis: ctypes.util.find_library() fails without the "comp" set
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 22 23:55:00 +0000 2017
>Originator: Pierre Pronchery <khorben%defora.org@localhost>
>Release: NetBSD 7.1_STABLE
>Organization:
>Environment:
System: NetBSD hostname 7.1_STABLE NetBSD 7.1_STABLE (CGDROOT_XEN3_DOM0) amd64
Architecture: x86_64
Machine: amd64
>Description:
Many Python-based programs and packages will fail to work without the "comp"
set installed, since ctypes.util.find_library() will not find any library
without it being installed.
This is notably the case with sysutils/salt:
hostname# salt-key -F
Traceback (most recent call last):
File "/usr/pkg/bin/salt-key", line 10, in <module>
salt_key()
File "/usr/pkg/lib/python2.7/site-packages/salt/scripts.py", line 361, in salt
_key
[...]
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/rsax931.py", line 49, in
_load_libcrypto
raise OSError('Cannot locate OpenSSL libcrypto')
OSError: Cannot locate OpenSSL libcrypto
The documentation for Python's ctypes says:
> On Linux, find_library tries to run external programs (/sbin/ldconfig, gcc,
> and objdump) to find the library file. It returns the filename of the library
> file. Here are sone examples:
So I suppose on NetBSD it relies on gcc and objdump.
>How-To-Repeat:
hostname# ls /etc/mtree/set.comp
ls: /etc/mtree/set.comp: No such file or directory
hostname# python2.7
Python 2.7.14 (default, Oct 24 2017, 00:11:35)
[GCC 4.8.5] on netbsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes.util
>>> print ctypes.util.find_library("crypto")
None
>>> ^D
hostname# progress -f comp.tgz tar xzpf -
100% |***********************************| 104 MiB 11.44 MiB/s 00:00 ETA
hostname# python2.7
>>> import ctypes.util
>>> print ctypes.util.find_library("crypto")
libcrypto.so.8
>Fix:
To work around the problem, install the "comp" set. However I do not
think we can expect users to have to install it. I avoid installing it
as often as possible myself (notably for security reasons).
I am not sure what the proper fix should be:
- let lang/python* depend on an implementation of lang/gcc
- adding a message when installing lang/python*
I would clearly prefer the former.
Home |
Main Index |
Thread Index |
Old Index