[FFe] libevent 2.1.12-stable-5 FTBFS on kinetic

Bug #1990941 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libevent (Debian)
Fix Released
Unknown
libevent (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

libevent 2.1.12-stable-5 fails to build from source on kinetic:

   dh_makeshlibs -a
dpkg-gensymbols: error: some symbols or patterns disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libevent-2.1-7/DEBIAN/symbols doesn't match completely debian/libevent-2.1-7.symbols
--- debian/libevent-2.1-7.symbols (libevent-2.1-7_2.1.12-stable-5_amd64)
+++ dpkg-gensymbolsM1jjt2 2022-09-27 08:36:16.746026078 +0000
@@ -617,7 +617,7 @@
  evutil_parse_sockaddr_port@Base 2.1.8-stable
  evutil_read_file_@Base 2.1.8-stable
  evutil_rtrim_lws_@Base 2.1.8-stable
- evutil_secure_rng_add_bytes@Base 2.1.8-stable
+#MISSING: 2.1.12-stable-5# evutil_secure_rng_add_bytes@Base 2.1.8-stable
  evutil_secure_rng_get_bytes@Base 2.1.8-stable
  evutil_secure_rng_global_setup_locks_@Base 2.1.8-stable
  evutil_secure_rng_init@Base 2.1.8-stable
dpkg-gensymbols: error: some symbols or patterns disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libevent-core-2.1-7/DEBIAN/symbols doesn't match completely debian/libevent-core-2.1-7.symbols
--- debian/libevent-core-2.1-7.symbols (libevent-core-2.1-7_2.1.12-stable-5_amd64)
+++ dpkg-gensymbolseal7TI 2022-09-27 08:36:16.902023091 +0000
@@ -394,7 +394,7 @@
  evutil_parse_sockaddr_port@Base 2.1.8-stable
  evutil_read_file_@Base 2.1.8-stable
  evutil_rtrim_lws_@Base 2.1.8-stable
- evutil_secure_rng_add_bytes@Base 2.1.8-stable
+#MISSING: 2.1.12-stable-5# evutil_secure_rng_add_bytes@Base 2.1.8-stable
  evutil_secure_rng_get_bytes@Base 2.1.8-stable
  evutil_secure_rng_global_setup_locks_@Base 2.1.8-stable
  evutil_secure_rng_init@Base 2.1.8-stable
dh_makeshlibs: error: failing due to earlier errors

Tags: ftbfs patch
Benjamin Drung (bdrung)
Changed in libevent (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Benjamin Drung (bdrung) wrote :

This is the condition for evutil_secure_rng_add_bytes:

#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)

The Debian unstable build says:

checking for arc4random... no
checking for arc4random_buf... no
checking for arc4random_addrandom... no

The kinetic build says:

checking for arc4random... yes
checking for arc4random_buf... yes
checking for arc4random_addrandom... no

Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):

arc4random and arc4random_buf are defined in /usr/include/stdlib.h shipped by libc6-dev 2.36-0ubuntu2.

Graham Inggs (ginggs)
tags: added: ftbfs
Revision history for this message
Benjamin Drung (bdrung) wrote :

Attached a patch to add evutil_secure_rng_add_bytes back.

tags: added: patch
Revision history for this message
Simon Chopin (schopin) wrote :

This patch wouldn't work as intended, as we'd mix arc4random functions from the vendored sources and from glibc, each set having their own internal static data. Sounds like a recipe for disaster :)

Revision history for this message
Benjamin Drung (bdrung) wrote :

Instead of patching libevent to use its own arc4random functions, I prefer to do a library transition to drop evutil_secure_rng_add_bytes. "reverse-depends -b libevent-dev" shows 79 packages.

summary: - libevent 2.1.12-stable-5 FTBFS on kinetic
+ [FFe] libevent 2.1.12-stable-5 FTBFS on kinetic
Graham Inggs (ginggs)
Changed in libevent (Ubuntu):
status: Triaged → New
Revision history for this message
Benjamin Drung (bdrung) wrote :

Reason for proposing the library transition is that this would avoid the possibility to mix glibc's and libevent's arc4random implementation.

Revision history for this message
Graham Inggs (ginggs) wrote :

I understand there's a test rebuild ongoing. Please change this bug's status back to New when you are ready.

Changed in libevent (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):

The rebuild is done in https://launchpad.net/~bdrung/+archive/ubuntu/ppa/+packages

Except for ARM builds of qt6-webengine and qtwebengine-opensource-src the results are there. There are a few build failures, but all build failures are existing build failures:

* libcamera on ppc64el: bug #1955767
* libreswan: bug #1991910
* ladvd: bug #1991909
* tgl on s390x: bug #1991912

Changed in libevent (Ubuntu):
status: Incomplete → New
Revision history for this message
Benjamin Drung (bdrung) wrote :

Attached the debdiff for libevent.

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

telegram-cli also fails on s390x, btw. :(

Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Graham Inggs (ginggs) wrote :

Let's go ahead, FFe granted.

Changed in libevent (Ubuntu):
status: New → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :

Uploaded no-change rebuild packages:
./library-transition --lp 1990941 libevent-2.1-7 libevent-2.1-7a

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libevent - 2.1.12-stable-5ubuntu1

---------------
libevent (2.1.12-stable-5ubuntu1) kinetic; urgency=medium

  * Bump soname for libevent and libevent-core to 2.1-7a for dropping
    evutil_secure_rng_add_bytes (LP: #1990941)

 -- Benjamin Drung <email address hidden> Wed, 05 Oct 2022 19:13:56 +0200

Changed in libevent (Ubuntu):
status: Triaged → Fix Released
Changed in libevent (Debian):
status: Unknown → New
Changed in libevent (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.