Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 812119 - dev-libs/jansson-2.14: stabilisation (was: dev-libs/jansson: library using unversioned symbols causing crashes/bugs)
Summary: dev-libs/jansson-2.14: stabilisation (was: dev-libs/jansson: library using un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: David Zero
URL: github.com/akheron/jansson/pull/540
Whiteboard:
Keywords: CC-ARCHES
Depends on:
Blocks:
 
Reported: 2021-09-08 07:35 UTC by Stanislav Ochotnicky
Modified: 2025-05-01 01:41 UTC (History)
5 users (show)

See Also:
Package list:
dev-libs/jansson-2.14
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Ochotnicky 2021-09-08 07:35:44 UTC
Jansson library symbol names clash with json-c and some time ago both projects merged changes to add versioning to their libs. However jansson has not had a release since then (over a year ago).

Missing symbols cause weird problems/crashes. For example in firewalld: github.com/firewalld/firewalld/issues/819

There is an upstream merged PR github.com/akheron/jansson/pull/540 which fixes the issue by adding versioning symbols. It would be good to add this to current jansson gentoo ebuilds to prevent bugs in apps linking with jansson.

Ideally of course upstream would release a new version which I asked about here:
github.com/akheron/jansson/issues/460



Reproducible: Always

Steps to Reproduce:
1. Run readelf -W -s -- /usr/lib64/libjansson.so

Actual Results:  
function names are not versioned (have no @<libjansson version>

Expected Results:  
Each symbol is versioned with something like "<symbol_name>@@libjansson.so.4"

Sorry for non-link links, new account...
Comment 1 David Zero 2021-09-09 01:27:57 UTC
I'll go ahead and ping him myself. If he doesn't cut a new version within a week, I'll create a revision with the required patches.

Naturally, as soon as I take the time to make the revision, *that's* when he'll decide to cut the new version.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-09 02:53:21 UTC
(In reply to David Zero from comment #1)
> I'll go ahead and ping him myself. If he doesn't cut a new version within a
> week, I'll create a revision with the required patches.
> 
> Naturally, as soon as I take the time to make the revision, *that's* when
> he'll decide to cut the new version.

Thank you!

Note that this will require us to:
- add a subslot to jansson (you do this bit for the new revision or new version)
- revbump all consumers and add := to them (I'll do this when I merge the PR)
Comment 3 David Zero 2021-09-09 21:18:29 UTC
New release created: https://github.com/akheron/jansson/releases/tag/v2.14

Busy on a trip, but when I get back in a few days, I'll do a version bump.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-25 19:21:50 UTC
Let's reuse this bug for stabilisation in a little while (a few days at least).
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-07 06:47:36 UTC
Let's proceed.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-08 02:10:31 UTC
amd64 done
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-08 02:10:33 UTC
x86 done
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-08 02:10:35 UTC
ppc done
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-08 02:10:36 UTC
ppc64 done
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-10 00:33:32 UTC
arm64 done
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-10 00:33:34 UTC
arm done
Comment 13 Rolf Eike Beer archtester 2021-10-14 13:57:20 UTC
sparc done
Comment 14 Rolf Eike Beer archtester 2021-11-10 14:42:37 UTC
hppa done, bug done
Comment 15 Larry the Git Cow gentoo-dev 2025-05-01 01:41:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a538523c8039763c9c3bdea27095115cf728c01

commit 3a538523c8039763c9c3bdea27095115cf728c01
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-01 01:37:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-01 01:40:15 +0000

    sys-devel/mold: backport 2 fixes to 2.38.1
    
    * Fix -Wl,--default-symver vs -Wl,--version-script which shows up as breakage
      in dev-libs/jansson vs dev-libs/json-c in net-firewall/firewalld (like in
      bug #812119). Thanks to Chewi for digging into it & reporting it upstream.
    
      There's a chance that it may help with bug #937990 too
      and maybe (but less likely?) bug #933197.
    
    * Fix --omagic hang (upstream report says it was a regression in 2.38.1
      vs 2.38.0, so let's fix it while here).
    
    * Skip test failing for me on one machine (seems to be Clang not picking
      up that it should use mold/lld for the test, or the plugin maybe not
      being around; not going to worry about it for now).
    
    Bug: https://bugs.gentoo.org/812119
    Bug: https://bugs.gentoo.org/933197
    Bug: https://bugs.gentoo.org/937990
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mold/files/mold-2.38.1-default-symver.patch    |  70 ++++++++++++
 sys-devel/mold/files/mold-2.38.1-omagic-loop.patch |  28 +++++
 sys-devel/mold/mold-2.38.1-r1.ebuild               | 122 +++++++++++++++++++++
 sys-devel/mold/mold-9999.ebuild                    |   5 +
 4 files changed, 225 insertions(+)