libtool: link: x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=native -pthread -Wl,-O1 -o .libs/opendkim-testkey opendkim_testkey-config.o opendkim_testkey-opendkim-crypto.o opendkim_testkey-opendkim-db.o opendkim_testkey-opendkim-dns.o opendkim_testkey-opendkim-lua.o opendkim_testkey-opendkim-testkey.o opendkim_testkey-util.o -L/usr/local/BerkeleyDB/lib -Wl,--as-needed ../libopendkim/.libs/libopendkim.so -lssl -lcrypto -ldb -L/usr/lib -lldap -llber ../libvbr/.libs/libvbr.so -lresolv -lbsd -pthread opendkim_testkey-opendkim-crypto.o: In function `dkimf_crypto_free_id': opendkim-crypto.c:(.text+0x24e): undefined reference to `OPENSSL_thread_stop' opendkim_testkey-opendkim-crypto.o: In function `dkimf_crypto_free': opendkim-crypto.c:(.text+0x3f7): undefined reference to `OPENSSL_thread_stop' collect2: error: ld returned 1 exit status ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0-desktop-gnome_libressl-test_20181021-101929 ------------------------------------------------------------------- Please see the tracker bug for details. gcc-config -l: [1] x86_64-pc-linux-gnu-8.2.0 * Available Python interpreters, in order of preference: [1] python3.7 [2] python3.6 [3] python2.7 (fallback) [4] pypy3 (fallback) [5] jython2.7 (fallback) Available Ruby profiles: [1] ruby23 (with Rubygems) [2] ruby25 (with Rubygems) * java-config: The following VMs are available for generation-2: 1) IcedTea JDK 3.9.0 [icedtea-8] *) IcedTea JDK 3.9.0 [icedtea-bin-8] Available Java Virtual Machines: [1] icedtea-8 [2] icedtea-bin-8 system-vm emerge -qpvO mail-filter/opendkim [ebuild U ] mail-filter/opendkim-2.10.3-r4 [2.10.3-r3] USE="berkdb ldap libressl ssl -gnutls -lmdb -lua -memcached -opendbx -poll -sasl (-selinux) -static-libs -unbound"
Created attachment 553000 [details] emerge-info.txt
Created attachment 553002 [details] emerge-history.txt
Created attachment 553004 [details] environment
Created attachment 553006 [details] etc.portage.tbz2
Created attachment 553008 [details] logs.tbz2
Created attachment 553010 [details] mail-filter:opendkim-2.10.3-r4:20181025-161313.log
Created attachment 553012 [details] temp.tbz2
This is a result of unconditionally applying the /usr/portage/mail-filter/opendkim/files/opendkim-2.10.3-openssl-1.1.1.patch patch. OpenDKIM builds fine against libressl out of the box. The ebuild simply needs to be modified to only apply that patch if the ssl USE flag is set and the libressl USE flag is unset. Additionally, it should probably also modified to only apply the gnutls patch if the gnutls USE flag is set.
Hi Toralf! I have no libressl system to test this, but there is this simple patch on upstream: https://github.com/trusteddomainproject/OpenDKIM/issues/32 can you check it works for you? If yes then I'll merge it with the current one.
The simple patch in Comment #9 fixed the build issue for me. However as Nick Wallingford has noted in Comment #8, removing the opendkim-2.10.3-openssl-1.1.1.patch also resolves the problem (with LibreSSL-2.9.0).
I have also a libressl setup and the patch also fix the issue for me.
Thanks for your input on comment #10 and comment #11 ! I'll make sure to merge these fixes in the current openssl patch then and test on openssl. I'll try to have this done somewhere tomorrow. I think it's better to avoid conditional patching as such is usually unlikely to be acceptable upstream, hence why I prefer to have a single unconditional patch.
Patch from Comment #9 works for me too (opendkim-2.10.3-r8, libressl-2.8.3).
Successful build for me too with patch in Comment #9, opendkim-2.10.3-r9, and libressl-2.9.0.
I have created a pull request addressing this issue. I need to wait for Michael to merge it though.
I already created a pull request with an *r11.ebuild and many changes to the build files earlier today, based on work me and Michael did over the last week or so. Your PR will probably see conflicts once mine is merged.
(In reply to Ralph Seichter from comment #16) > I already created a pull request with an *r11.ebuild and many changes to the > build files earlier today, based on work me and Michael did over the last > week or so. Your PR will probably see conflicts once mine is merged. I can the recreate it then. If you see the only change it does with respect to r11 is using the new openssl patch.
As we agreed on, I added your patch to https://github.com/gentoo/gentoo/pull/11742 .
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9eac6ff89b85a592d236e1a475981fbd0a99415 commit d9eac6ff89b85a592d236e1a475981fbd0a99415 Author: Ralph Seichter <github@seichter.de> AuthorDate: 2019-04-19 21:02:56 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2019-04-24 12:45:53 +0000 mail-filter/opendkim: OPENSSL_thread_stop reference fix dev-libs/libressl lacks support for OPENSSL_thread_stop which was used by the patch adding support for dev-libs/openssl-1.1.1 In order to address this problem we modify the patch to default to the old deinitialization code when dev-libs/libressl is used. Closes: https://bugs.gentoo.org/669612 Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> .../files/opendkim-2.10.3-openssl-1.1.1.patch.r2 | 170 +++++++++++++++++++++ mail-filter/opendkim/opendkim-2.10.3-r11.ebuild | 2 +- 2 files changed, 171 insertions(+), 1 deletion(-)