Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613878 - dev-php/pecl-event-2.2.1 : configure: error: bufferevent_openssl_get_ssl not found in event_openssl library, or the library is not installed
Summary: dev-php/pecl-event-2.2.1 : configure: error: bufferevent_openssl_get_ssl not ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ruslan Osmanov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-26 06:57 UTC by Toralf Förster
Modified: 2017-04-01 16:42 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,6.03 KB, text/plain)
2017-03-26 06:57 UTC, Toralf Förster
Details
config.log.tbz2 (config.log.tbz2,4.70 KB, application/x-bzip)
2017-03-26 06:57 UTC, Toralf Förster
Details
dev-php:pecl-event-2.2.1:20170326-054842.log (dev-php:pecl-event-2.2.1:20170326-054842.log,5.91 KB, text/plain)
2017-03-26 06:57 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,290.83 KB, text/plain)
2017-03-26 06:57 UTC, Toralf Förster
Details
environment (environment,74.52 KB, text/plain)
2017-03-26 06:57 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,31.26 KB, application/x-bzip)
2017-03-26 06:57 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,21.60 KB, application/x-bzip)
2017-03-26 06:57 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 2017-03-26 06:57:19 UTC
checking for pkg-config... /usr/bin/pkg-config
checking for bufferevent_openssl_get_ssl in -levent_openssl... no
configure: error: bufferevent_openssl_get_ssl not found in event_openssl library, or the library is not installed

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-php/pecl-event-2.2.1/work/php5.6/config.log

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

  This is an unstable amd64 chroot image (named gnome-systemd-libressl-abi32+64_20170320-195157) at a hardened host acting as a tinderbox.

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

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

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

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 7.2.6.9 [icedtea-bin-7]
2)	IcedTea JDK 3.3.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-7  system-vm
  [2]   icedtea-bin-8
Comment 1 Toralf Förster gentoo-dev 2017-03-26 06:57:22 UTC
Created attachment 468326 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-03-26 06:57:25 UTC
Created attachment 468328 [details]
config.log.tbz2
Comment 3 Toralf Förster gentoo-dev 2017-03-26 06:57:28 UTC
Created attachment 468330 [details]
dev-php:pecl-event-2.2.1:20170326-054842.log
Comment 4 Toralf Förster gentoo-dev 2017-03-26 06:57:31 UTC
Created attachment 468332 [details]
emerge-history.txt
Comment 5 Toralf Förster gentoo-dev 2017-03-26 06:57:34 UTC
Created attachment 468334 [details]
environment
Comment 6 Toralf Förster gentoo-dev 2017-03-26 06:57:37 UTC
Created attachment 468336 [details]
etc.portage.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-03-26 06:57:40 UTC
Created attachment 468338 [details]
temp.tbz2
Comment 8 Ruslan Osmanov 2017-03-26 10:27:05 UTC
(In reply to Toralf Förster from comment #0)

As a maintainer of the PECL extension I can say that there was no intention to support LibreSSL. I have fixed build errors in version 2.3.0 ( https://pecl.php.net/package-changelog.php?package=event&release=2.3.0 ), but I haven't tested it with LibreSSL - use it on your own risk.

I guess dev-libs/libevent was built without libressl USE flag:

> configure:5553: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=native -Wall  -L/usr/lib -Wl,-O1 -Wl,--as-needed -levent_extra conftest.c -levent_openssl   -levent_core >&5
> /usr/lib/libevent_openssl.so: undefined reference to `BIO_set_data'
> ... (skipped)
> /usr/lib/libevent_openssl.so: undefined reference to `BIO_meth_set_create'
> collect2: error: ld returned 1 exit status


Please attach the output of the following command:
emerge --info dev-libs/libevent

You can also try this slightly modified ebuild:
https://github.com/rosmanov/gentoo-overlay/blob/e45fa7459ab558172a3d834964799eea3fbfcaff/dev-php/pecl-event/pecl-event-2.3.0.ebuild
Comment 9 Toralf Förster gentoo-dev 2017-03-26 10:56:25 UTC
(In reply to Ruslan Osmanov from comment #8)

=================================================================
                        Package Settings
=================================================================

dev-libs/libevent-2.1.8::gentoo was built with the following:
USE="libressl ssl threads -debug -static-libs -test" ABI_X86="64 -32 -x32"
Comment 10 Ruslan Osmanov 2017-04-01 16:42:20 UTC
Currently unmasked Libevent packages (<=dev-libs/libevent-2.1.8) fail to build any code using BIO_set_data and friends (https://www.openssl.org/docs/man1.1.0/crypto/BIO_set_data.html) with LibreSSL due to incorrect value of OPENSSL_VERSION_NUMBER in /usr/include/openssl/opensslv.h:

#define OPENSSL_VERSION_NUMBER  0x20000000L

BIO_set_data() function was added in OpenSSL version 1.1.0, and the corresponding block in Libevent's openssl-compat.h is skipped:

#if OPENSSL_VERSION_NUMBER < 0x10100000L
...
#define BIO_get_data(b) (b)->ptr
...
#endif

As a result, the build script (`configure`) fails to build a test program with the following errors:

/usr/lib/libevent_openssl.so: undefined reference to `BIO_set_data'
/usr/lib/libevent_openssl.so: undefined reference to `BIO_set_shutdown'
/usr/lib/libevent_openssl.so: undefined reference to `BIO_meth_set_read'
...

The fix has been committed to master on Jan 28: https://github.com/libevent/libevent/commit/d057c45e8f48aa90d8b340cac4c8ae4cc8b5d0ac . 

Thus, the issue is actually caused by the Libevent build. In order to build dev-php/pecl-event (or any other Libevent's SSL code) with LibreSSL you should emerge >dev-libs/libevent-2.1.8.