Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 629982

Summary: dev-libs/libevent-2.1.8[libressl,test]: undefined reference to `BIO_set_init' etc.
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Jeroen Roovers (RETIRED) <jer>
Status: RESOLVED FIXED    
Severity: minor CC: jstein, libressl, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-libs:libevent-2.1.8:20170905-005355.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2

Description Toralf Förster gentoo-dev 2017-09-05 17:04:13 UTC
test/test_regress-regress_ssl.o: In function `bio_rwcount_new':
regress_ssl.c:(.text+0x939): undefined reference to `BIO_set_init'
regress_ssl.c:(.text+0x945): undefined reference to `BIO_set_data'
test/test_regress-regress_ssl.o: In function `bio_rwcount_ctrl':
regress_ssl.c:(.text+0x963): undefined reference to `BIO_get_shutdown'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop_libressl_20170903-100751

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.4.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)




emerge -qpv dev-libs/libevent
[ebuild  N    ] dev-libs/libevent-2.1.8  USE="libressl ssl {test} threads -debug -static-libs" ABI_X86="(64) -32 (-x32)"
Comment 1 Toralf Förster gentoo-dev 2017-09-05 17:04:16 UTC
Created attachment 492478 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-09-05 17:04:19 UTC
Created attachment 492480 [details]
dev-libs:libevent-2.1.8:20170905-005355.log
Comment 3 Toralf Förster gentoo-dev 2017-09-05 17:04:22 UTC
Created attachment 492482 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-09-05 17:04:26 UTC
Created attachment 492484 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-09-05 17:04:30 UTC
Created attachment 492486 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-09-05 17:04:33 UTC
Created attachment 492488 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-09-05 17:04:36 UTC
Created attachment 492490 [details]
temp.tbz2
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-27 15:21:48 UTC
The problem starts a bit earlier, with:

/var/tmp/portage/dev-libs/libevent-2.1.8/work/libevent-2.1.8-stable/bufferevent_openssl.c: In function 'bio_bufferevent_new':
/var/tmp/portage/dev-libs/libevent-2.1.8/work/libevent-2.1.8-stable/bufferevent_openssl.c:113:2: warning: implicit declaration of function 'BIO_set_init' [-Wimplicit-function-declaration]
  BIO_set_init(b, 0);
  ^

and likes indicating that libevent is calling functions that do not exist in libressl. Which means it can't work with libressl, it breaks all applications linking to it and the libressl flag on the package is an awful fake that can't work.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-27 15:21:59 UTC
*** Bug 621314 has been marked as a duplicate of this bug. ***
Comment 10 Toralf Förster gentoo-dev 2018-02-27 17:20:40 UTC
Oop,s and I recently switched my KDE desktop to LibreSSL ...
Comment 11 Stephan Lukasczyk 2018-03-22 17:20:26 UTC
Do you have a solution for this problem? Besides migrating the system back from libressl to openssl? I would be interested in such a solution.
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-22 17:36:30 UTC
OpenBSD apparently is still at 2.0.22, so they don't have a patch.
Comment 13 Aaron Bauman (RETIRED) gentoo-dev 2018-04-20 16:17:14 UTC
runs and builds fine against dev-libs/libressl-{2.6.4, 2.7.2}
Comment 14 Aaron Bauman (RETIRED) gentoo-dev 2018-04-30 00:52:46 UTC
whoops
Comment 15 Stefan Strogin gentoo-dev 2019-02-16 19:00:47 UTC
Builds fine with libressl-2.8.3 without the patch from the libressl overlay (https://github.com/gentoo/libressl/blob/master/dev-libs/libevent/files/libevent-2.1.8-libressl.patch)

Seems the problem is only with <libressl-2.7.0.
Comment 16 Stefan Strogin gentoo-dev 2019-02-21 17:58:00 UTC
Oops, I see, forgot about USE=test.

Anyway the fix is applied in upstream: https://github.com/libevent/libevent/commit/28b8075400c70b2d2da2ce07e590c2ec6d11783d
- got into 2.1.9_beta. Builds fine with USE=test and libressl-2.8.3.