Public bug reported:

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

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: New


** Tags: architecture-s3903164 bugnameltc-191033 severity-medium 
targetmilestone-inin2104

** Tags added: architecture-s3903164 bugnameltc-191033 severity-medium
targetmilestone-inin2104

** Changed in: ubuntu
     Assignee: (unassigned) => Skipper Bug Screeners (skipper-screen-team)

** Package changed: ubuntu => linux (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1913388

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1913388/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to