Created attachment 202050 [details] Makefile patch for net-p2p/libtorrent net-p2p/libtorrent is broken with FreeBSD 12+ and/or OpenSSL 1.1.1 I've patched the Makefile to add warnings about 'openssl111' and modified the USES section to enable ssl and force localbase for ldflags. It seems to still look for base SSL otherwise. No other changes. poudriere build works for me on FreeBSD 11.2 with SSL=openssl and 12.0 with SSL=openssl
I couldn't replicate this issue with: Jail Poudriere: 1102000 / 1200086 / 1300003 DEFAULT_VERSIONS+= ssl=openssl111 0x0000000000000001 NEEDED Shared library: [libcrypto.so.11] openssl111-1.1.1a DEFAULT_VERSIONS+= ssl=openssl 0x0000000000000001 NEEDED Shared library: [libcrypto.so.9] openssl-1.0.2q,1 DEFAULT_VERSIONS+= 0x0000000000000001 NEEDED Shared library: [libcrypto.so.111] $openssl version OpenSSL 1.1.1a-freebsd 20 Nov 2018 Actually I'm running libtorrent/rtorrent on CURRENT 1300010 without issues. Could you share your poudriere build logs, without the patch?
If you have more information, please, reopen this PR.
Sorry, took a bit to run builds again. I backed out my local port changes and attached is my poudriere log. I get similar errors for net/xmlrpc-c and the fix was to force the lib path to /usr/local/ for both. It seems to pick up the base SSL vs. honoring the ports SSL.
Created attachment 202357 [details] poudriere build log
(In reply to Henrik Hudson from comment #3) Thank you Henrik. In fact, my libtorrent port was with this change: -USES= autoreconf compiler:c++11-lang libtool pathfix pkgconfig ssl +USES= autoreconf compiler:c++11-lang libtool localbase:ldflags pathfix pkgconfig ssl I was dealing with cppunit dependency some time ago and I let the Makefile dirty. =/ The BROKEN part of your patch is not necessary, as you can see on comment 1, it's linking right. Is that ok?
No worries. Without that warning won't it still break for people using openssl111 though even on 11.x or 12.x?
With this change, libtorrent can be built with openssl-1.1.X or openssl-1.0.X in base or not: https://svnweb.freebsd.org/ports?view=revision&revision=484484 https://svnweb.freebsd.org/ports/head/net-p2p/libtorrent/files/patch-openssl-1.1.x?revision=484484&view=markup&pathrev=484484 Is there another issue am I not seeing?
Sorry, I guess I don't understand the purpose of the 'localbase:ldflags' then. I thought it was just forcing it to use /usr/local/ for SSL library paths and that the base SSL 1.1.x was what was breaking the compilation.
(In reply to Henrik Hudson from comment #8) If you not set `ssl=openssl111` or `ssl=openssl`, the framework will use `ssl=base` for default. `localbase:ldflags` will help libtorrent to link properly with openssl from ports (if users desire that), not conflicting with the base one. When you change `DEFAULT_VERSIONS+= ssl=???`, look at this: $ make -V OPENSSLBASE /usr $ make -V OPENSSLDIR /etc/ssl $ make -V OPENSSLINC /usr/include $ make -V OPENSSLLIB /usr/lib ./configure --help [...] OPENSSL_CFLAGS C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS linker flags for OPENSSL, overriding pkg-config build log: --CONFIGURE_ENV-- OPENSSL_LIBS="-L/usr/lib -lcrypto" OPENSSL_CFLAGS="-I /usr/include" ... So we are not forcing users to use OpenSSL from ports, we are just letting them to choose what they want. And IMHO I recommend to use OpenSSL from base unless you have a compelling reason for not doing that.
A commit references this bug: Author: dbaio Date: Sun Jun 23 21:42:15 UTC 2019 New revision: 504994 URL: https://svnweb.freebsd.org/changeset/ports/504994 Log: net-p2p/libtorrent: Unbreak with ssl other than base PR: 235765 Changes: head/net-p2p/libtorrent/Makefile