app-text/qpdf: delete upstream's broken GNU ld version script

This version script is insane, for two reasons:

- it marks `global: *` and does nothing else whatsoever, defeating all
  purpose of a version script

- it utilizes the former, to tag all symbols as `LIBQPDF_@qpdf_SOVERSION@`,
  that is to say it inlines the shared library soname into it

Conceptually this is beyond broken. Symbol versioning exists to solve
two cases:

- There is a genuine and paramount need to load two different shared
  library versions exporting identical symbols with different ABI into a
  single process space, and you want to silo off the symbols so they do
  not conflict each other.

- A soname is designed to change when ABI is *broken*, not added to, and
  version scripts allow fine-grained control over when and how your ABI
  evolves.
  - Adding new functions doesn't break ABI, and version scripts can be
    used to mark the version when a new function was added, to make it
    easy to detect the minimum version of the library needed.
  - Modifying functions in a backwards incompatible manner can be done
    by providing both versions of the function; the new version is
    aliased to a new symbol version and is used for new compilation, the
    old version is only available as a binary symbol to satisfy old
    binaries.

Blindly tagging every single function with the soname certainly does not
achieve the latter case. The former case is not realistic except in
niche scenarios that don't apply here.

Problem: marking `*` as versioned cascades into various libstdc++.so
symbols marked as undefined in libqpdf.so, e.g.

```
U std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()@LIBQPDF_30
```

The set of symbols that this applies to is effectively random based on
compiler flags / optimizations. Software which links to libqpdf.so gets
diverted into the libqpdf versions of these functions for their own use,
and error out whenever libqpdf is rebuilt with arbitrarily different
CXXFLAGS.

Gentoo SLOT= rebuilds are useless. Soname is useless.

Remove this ridiculous version script. Bump subslot to force rebuilds.
Revbump straight to stable, since this package is *so* broken right now
that it is impossible for a straight-to-stable bump which is buggy, to
break it even more.

Bug: https://github.com/qpdf/qpdf/issues/1808
Closes: https://bugs.gentoo.org/981565
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
This commit is contained in:
Eli Schwartz
2026-11-18 09:00:43 -05:00
parent 96a898d66f
commit b5c742b593
2 changed files with 12 additions and 4 deletions
@@ -22,8 +22,8 @@ SRC_URI="
LICENSE="|| ( Apache-2.0 Artistic-2 )"
# Subslot for libqpdf soname version (just represent via major version)
# XXX: .1 is a fudge for bug #981565, drop w/ >=qpdf-13
SLOT="0/$(ver_cut 1).1"
# XXX: .2 is a fudge for bug #981565, drop when https://github.com/qpdf/qpdf/issues/1808 is fixed
SLOT="0/$(ver_cut 1).2"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="doc examples gnutls test zopfli"
RESTRICT="!test? ( test )"
@@ -67,6 +67,10 @@ src_unpack() {
src_prepare() {
cmake_src_prepare
# bug 981565, changes ABI every time you rebuild
# https://github.com/qpdf/qpdf/issues/1808
sed -i s'/--version-script/--broken-so-die-horribly-die-die-die/' libqpdf/CMakeLists.txt || die
# broken test
rm qpdf/qtest/completion.test || die
}
@@ -22,8 +22,8 @@ SRC_URI="
LICENSE="|| ( Apache-2.0 Artistic-2 )"
# Subslot for libqpdf soname version (just represent via major version)
# XXX: .1 is a fudge for bug #981565, drop w/ >=qpdf-13
SLOT="0/$(ver_cut 1).1"
# XXX: .2 is a fudge for bug #981565, drop when https://github.com/qpdf/qpdf/issues/1808 is fixed
SLOT="0/$(ver_cut 1).2"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="doc examples gnutls test zopfli"
RESTRICT="!test? ( test )"
@@ -67,6 +67,10 @@ src_unpack() {
src_prepare() {
cmake_src_prepare
# bug 981565, changes ABI every time you rebuild
# https://github.com/qpdf/qpdf/issues/1808
sed -i s'/--version-script/--broken-so-die-horribly-die-die-die/' libqpdf/CMakeLists.txt || die
# broken test
rm qpdf/qtest/completion.test || die
}