Lost a couple of hours debugging something last night because I failed
to notice that _rust.cpython-310.so linked statically against libssl.
The diff below fixes this.
I wonder if we should also do this in cargo.port.mk next to setting
OPENSSL_NO_VENDOR=1, although my build logs don't seem to show any
'-l static=ssl' or '-l static=crypto' outside py-cryptography.
without diff:
/usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.cpython-310.so:
Start End Type Open Ref GrpRef Name
00000fead9a39000 00000fead9ee9000 dlib 1 0 0 /usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.cpython-310.so
00000feb93ba6000 00000feb93bee000 rlib 0 1 0 /usr/lib/libc++abi.so.7.0
with diff:
/usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.cpython-310.so:
Start End Type Open Ref GrpRef Name
00000886bb818000 00000886bbae3000 dlib 1 0 0 /usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.cpython-310.so
00000885dc0f9000 00000885dc16c000 rlib 0 1 0 /usr/lib/libssl.so.55.0
00000886bf99c000 00000886bfbd2000 rlib 0 2 0 /usr/lib/libcrypto.so.52.0
00000886c2504000 00000886c254c000 rlib 0 1 0 /usr/lib/libc++abi.so.7.0
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/py-cryptography/Makefile,v
diff -u -p -r1.80 Makefile
--- Makefile 31 Jan 2024 17:03:18 -0000 1.80
+++ Makefile 1 Feb 2024 12:51:18 -0000
@@ -4,6 +4,7 @@ MODPY_EGG_VERSION= 42.0.2
DISTNAME= cryptography-${MODPY_EGG_VERSION}
DISTFILES= cryptography-${MODPY_EGG_VERSION}${EXTRACT_SUFX}
PKGNAME= ${MODPY_PY_PREFIX}${DISTNAME}
+REVISION= 0
.include "crates.inc"
@@ -35,7 +36,7 @@ MODCARGO_CARGOTOML= ${WRKSRC}/src/rust/C
MODCARGO_INSTALL= No
MODCARGO_TEST= No
-MAKE_ENV= OPENSSL_DIR="/usr"
+MAKE_ENV= OPENSSL_DIR="/usr" OPENSSL_STATIC=0
BUILD_DEPENDS= ${RUN_DEPENDS} \
devel/py-setuptools-rust${MODPY_FLAVOR}
No comments:
Post a Comment