clucene-core: please pull in patch to stabilize API on s390x during upgrade to glibc 2.33

Bug #1913388 reported by bugproxy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Undecided
Skipper Bug Screeners
clucene-core (Ubuntu)
Fix Released
Low
Balint Reczey

Bug Description

On s390x, the type float_t has historically been defined as double for no good reason, yet with unexpected and unnecessary impact on performance in some scenarios. The upcoming glibc release 2.33 will be a first step towards cleaning that up, which will change float_t to become float on s390x when compiling C++ code, such as in clucene-core. That would break the ABI of clucene-core on s390x for existing binaries.

Today, clucene-core uses float_t for some parameters in its API; that type is defined as double on s390x today. Together with gcc's default behavior, that contradicts the C standard. To get to a more sane combination, the upcoming glibc release 2.33 will change float_t to become float on s390x (with some exceptions when compiling C code, which do not apply for clucene-core). To my knowledge, glibc 2.33 is a candidate for inclusion in Ubuntu 21.04.

To avoid breaking the API of clucene-core in the process, I have prepared a trivial patch that fixes clucene-core's API to always use double instead of float_t on s390x. That patch effectively persists the current de-facto API on s390x, without changes for other architectures. Note that using float_t in an API is generally "not a great idea", because that type can have different definitions even with the same compiler and glibc version on the same system (e.g., on 32-bit x86, when switching between SSE and x87 FP ops).

Patch submitted in https://sourceforge.net/p/clucene/bugs/233/ and https://sourceforge.net/p/clucene/mailman/message/37153930/
yet upstream clucene is effectively unmaintained.

If Ubuntu 21.04 adopts glibc 2.33, please consider pulling in this patch in clucene-core.

Related request for ImageMagick: https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1913268

bugproxy (bugproxy)
tags: added: architecture-s3903164 bugnameltc-191033 severity-medium targetmilestone-inin2104
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in linux (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
Changed in ubuntu-z-systems:
status: New → Triaged
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Frank Heimes (fheimes) wrote :

Please notice that clucene (clucene-core) belongs to Ubuntu Desktop (ubuntu-desktop).

affects: linux (Ubuntu) → clucene-core (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-01-27 05:05 EDT-------
The clucene packages are built and shipped on s390x as part of the "main" repository (just verified in an Ubuntu 20.04 -- http://ports.ubuntu.com/pool/main/c/clucene-core/). I do not know how what role the grouping into Ubuntu Desktop plays.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Typically a source package (.dsc) publishes all binary packages (.deb) for all architectures into the same component. That is the default behavior of launchpad. We try to avoid split-publishing of .deb into main/universe where possible, or split-publishing across different architectures. Especially since some otherwise graphical/desktop stack packages at times end up in the reverse build-dependencies cycles to build otherwise CLI-only software. The obvious example being cmake.

s390x is explicitly an Ubuntu Server architecture only. Thus whilst many desktop packages are built automatically on s390x they are provided on the best effort basis out of convenience. It would require manual interventions and changes to exclude them on s390x.

Similar caveats apply on other architectures too. At the moment we only fully support Ubuntu Desktop on amd64; Pi 4+ arm64.

Changed in clucene-core (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
Steve Langasek (vorlon)
tags: added: fr-1088
Revision history for this message
Matthias Klose (doko) wrote :

if the ABI changes without changing the soname, we should rename the library packages:

Package: clucene-core
Format: 3.0 (quilt)
Binary: libclucene-dev, libclucene-core1v5, libclucene-contribs1v5

Changed in clucene-core (Ubuntu):
status: Confirmed → In Progress
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

clucene-core (2.3.3.4+dfsg-1ubuntu1) hirsute; urgency=medium

  * Fix float_t abi to double ahead of glibc change.

 -- Dimitri John Ledkov <email address hidden> Mon, 01 Feb 2021 10:22:06 +0000

Changed in clucene-core (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2021-02-11 03:27 EDT-------
IBM Bugzilla status->closed, Fix Released

Changed in clucene-core (Ubuntu):
status: Fix Released → Triaged
Changed in ubuntu-z-systems:
status: Fix Released → Triaged
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Proposed patch breaks things on s390x

See https://bugs.launchpad.net/ubuntu/+source/clucene-core/+bug/1915927 for more details.

Did you receive any response from upstream if they want to break/bump abi on s390x to switch to float? Or change all of their headers from float_t to clucene_float_t which has mixed double/float on per-arch basis?

Revision history for this message
Balint Reczey (rbalint) wrote :

I'd go with renaming the package as mentioned in #4.

Revision history for this message
Marius Hillenbrand (mhillen) wrote :

Indeed, my patch is just broken. I have not received any upstream feedback about the patch or the proposed alternatives -- unfortunately, clucene's community appears rather inactive, with 0 emails on the developer list in the last three months.

Revision history for this message
Balint Reczey (rbalint) wrote :

@mhillen Thanks, I'm doing the package renames in LP: #1915927. This is minimally intrusive, but breaks not packaged software, they need to be rebuilt.

Revision history for this message
Marius Hillenbrand (mhillen) wrote :

fyi, fixed patch for clucene to keep the ABI constant on s390x is attached to https://sourceforge.net/p/clucene/bugs/233/.

The patch requires that clucene uses a separate type clucene_float_t in its API, with multiple yet trivial changes all across the code base.

None of the packages that depend on clucene required modifications to cope with that API change; sword, bibletime, dovecot, and libreoffice just build in a current hirose with a modified clucene.

Changed in clucene-core (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Balint Reczey (rbalint)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Revision history for this message
Balint Reczey (rbalint) wrote :

This have been fixed in Ubuntu in clucene-core 2.3.3.4+dfsg-1ubuntu3 by breaking the ABI on s390x and providing the new shared library in a different package.

Changed in clucene-core (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → 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.