Summary: | security/luasec-51 broken with openssl from port | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Dirk Meyer <dinoex> |
Component: | Individual Port(s) | Assignee: | David Thiel <lx> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | Flags: | bugzilla:
maintainer-feedback?
(lx) |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | amd64 | ||
OS: | Any |
Description
Dirk Meyer
2019-03-23 21:31:54 UTC
I've updated luasec to 0.8, and I'm able to build luasec with openssl111. Can you test? Sorry, still the same problem. The decencies are recorded, but the linked so always uses libssl.so from base. The same problem also happens on FreeBSD 12.0 amd64 DEFAULT_VERSIONS+= ssl=openssl111 $ pkg which /usr/local/lib/lua/5.1/ssl.so /usr/local/lib/lua/5.1/ssl.so was installed by package lua51-luasec-0.8 $ pkg info -d lua51-luasec lua51-luasec-0.8: openssl111-1.1.1c lua51-5.1.5_9 $ ldd /usr/local/lib/lua/5.1/ssl.so /usr/local/lib/lua/5.1/ssl.so: libssl.so.111 => /usr/lib/libssl.so.111 (0x800679000) libcrypto.so.111 => /lib/libcrypto.so.111 (0x800e00000) libc.so.7 => /lib/libc.so.7 (0x800248000) libthr.so.3 => /lib/libthr.so.3 (0x80070e000) The port builds but fails on usage. Problem is that LDFLAGS are not passed to build. $ make -V OPENSSL_LDFLAGS -Wl,-rpath,/usr/local/lib Because the path to /usr/local/lib ist not set, the so is always linked to the libssl.so from base. I tried to fix this by adding to the Makefile LDFLAGS+= ${OPENSSL_LDFLAGS} But the LDFLAGS are not picked up: [...] --- ssl.so --- cc -O -fPIC -shared -L./luasocket -L/usr/lib -o ssl.so x509.o context.o ssl.o config.o ec.o -lssl -lcrypto -lluasocket ===> Staging for lua51-luasec-0.8 [...] no change I tried to fix this by adding to the Makefile MAKE_ENV+= LIBDIR="${LIBDIR}" Then the port uses the correct path for libssl.so $ ldd /usr/local/lib/lua/5.1/ssl.so /usr/local/lib/lua/5.1/ssl.so: libssl.so.11 => /usr/local/lib/libssl.so.11 (0x800679000) libcrypto.so.11 => /usr/local/lib/libcrypto.so.11 (0x800e00000) libc.so.7 => /lib/libc.so.7 (0x800248000) libthr.so.3 => /lib/libthr.so.3 (0x80070c000) A commit references this bug: Author: lx Date: Mon Aug 26 19:58:14 UTC 2019 New revision: 509967 URL: https://svnweb.freebsd.org/changeset/ports/509967 Log: Fix building with openssl from ports PR: 236741 Submitted by: Dirk Meyer Changes: head/security/luasec/Makefile You're right, I was mistaken. I put that fix in the master port, and it does work now. Thanks! |