Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669612 - mail-filter/opendkim-2.10.3-r4 : opendkim-crypto.c:(.text+<snip>): undefined reference to OPENSSL_thread_stop
Summary: mail-filter/opendkim-2.10.3-r4 : opendkim-crypto.c:(.text+<snip>): undefined ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2018-10-25 17:15 UTC by Toralf Förster
Modified: 2021-04-17 14:15 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.23 KB, text/plain)
2018-10-25 17:15 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,204.13 KB, text/plain)
2018-10-25 17:15 UTC, Toralf Förster
Details
environment (environment,117.79 KB, text/plain)
2018-10-25 17:15 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,13.13 KB, application/x-bzip)
2018-10-25 17:15 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,15.56 KB, application/x-bzip)
2018-10-25 17:15 UTC, Toralf Förster
Details
mail-filter:opendkim-2.10.3-r4:20181025-161313.log (mail-filter:opendkim-2.10.3-r4:20181025-161313.log,40.58 KB, text/plain)
2018-10-25 17:15 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,35.20 KB, application/x-bzip)
2018-10-25 17:15 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-10-25 17:15:21 UTC
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"
Comment 1 Toralf Förster gentoo-dev 2018-10-25 17:15:24 UTC
Created attachment 553000 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-10-25 17:15:26 UTC
Created attachment 553002 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2018-10-25 17:15:29 UTC
Created attachment 553004 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2018-10-25 17:15:32 UTC
Created attachment 553006 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2018-10-25 17:15:35 UTC
Created attachment 553008 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-10-25 17:15:37 UTC
Created attachment 553010 [details]
mail-filter:opendkim-2.10.3-r4:20181025-161313.log
Comment 7 Toralf Förster gentoo-dev 2018-10-25 17:15:40 UTC
Created attachment 553012 [details]
temp.tbz2
Comment 8 Nick Wallingford 2018-12-28 19:51:46 UTC
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.
Comment 9 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2019-03-30 23:55:27 UTC
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.
Comment 10 Reuben Farrelly 2019-03-31 07:26:53 UTC
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).
Comment 11 Cédric Krier gentoo-dev 2019-03-31 09:30:13 UTC
I have also a libressl setup and the patch also fix the issue for me.
Comment 12 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2019-03-31 16:06:22 UTC
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.
Comment 13 Dmitry Grigoriev 2019-04-05 17:53:11 UTC
Patch from Comment #9 works for me too (opendkim-2.10.3-r8, libressl-2.8.3).
Comment 14 Enne Eziarc 2019-04-14 19:50:41 UTC
Successful build for me too with patch in Comment #9, opendkim-2.10.3-r9, and libressl-2.9.0.
Comment 15 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2019-04-19 19:31:48 UTC
I have created a pull request addressing this issue. I need to wait for Michael to  merge it though.
Comment 16 Ralph Seichter 2019-04-19 19:47:00 UTC
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.
Comment 17 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2019-04-19 20:11:31 UTC
(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.
Comment 18 Ralph Seichter 2019-04-19 21:09:48 UTC
As we agreed on, I added your patch to https://github.com/gentoo/gentoo/pull/11742 .
Comment 19 Larry the Git Cow gentoo-dev 2019-04-24 12:46:28 UTC
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(-)