Hi,

It seems that security/py-scrypt has missing WANTLIB for system shared
library. Currently, it doesn't have any WANTLIB, but it is a c module
which depends on crypto and pthread.

With the recent crypto bump, it fails to run:

$ python3 -c 'from scrypt import hash'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/scrypt/__init__.py", line 1, in 
<module>
    from .scrypt import *
  File "/usr/local/lib/python3.9/site-packages/scrypt/scrypt.py", line 24, in 
<module>
    _scrypt = cdll.LoadLibrary(importlib.util.find_spec('_scrypt').origin)
  File "/usr/local/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: Cannot load specified object

$ readelf -d /usr/local/lib/python3.9/site-packages/_scrypt.cpython-39.so
Dynamic section at offset 0x8c78 contains 19 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.48.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.26.1]
 0x0000000000000007 (RELA)               0x1130
 0x0000000000000008 (RELASZ)             312 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          7
 0x0000000000000017 (JMPREL)             0x1268
 0x0000000000000002 (PLTRELSZ)           1344 (bytes)
 0x0000000000000003 (PLTGOT)             0xade0
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x2c0
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0xcf8
 0x000000000000000a (STRSZ)              1079 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x998
 0x0000000000000004 (HASH)               0xaa8
 0x000000000000000c (INIT)               0x9360
 0x000000000000000d (FINI)               0x9370
 0x0000000000000000 (NULL)               0x0


The following diff adds WANTLIB to help the port to update for the
next bump.

Comments or OK ?
-- 
Sebastien Marie



diff daa95d7360cadc2e078e2af54ae83d80339b29e8 /home/semarie/repos/openbsd/ports
blob - 4c68b7a14b82a97691ee56d7f6b210aad18479f8
file + security/py-scrypt/Makefile
--- security/py-scrypt/Makefile
+++ security/py-scrypt/Makefile
@@ -3,7 +3,7 @@
 COMMENT =      support for the scrypt key derivation function
 
 MODPY_EGG_VERSION =    0.8.18
-REVISION =     1
+REVISION =     2
 
 DISTNAME =     scrypt-${MODPY_EGG_VERSION}
 PKGNAME =      py-${DISTNAME}
@@ -15,6 +15,8 @@ HOMEPAGE =    http://bitbucket.org/mhallin/py-scrypt
 # BSD
 PERMIT_PACKAGE =       Yes
 
+WANTLIB +=     crypto pthread
+
 MODULES =              lang/python
 
 MODPY_PI =             Yes


Reply via email to