Skip to content

fix: bump SOVERSION to 28 for removed std::string_view symbols (#1694)#1697

Merged
baylesj merged 1 commit into
masterfrom
fix/1694-soversion-bump
Jun 17, 2026
Merged

fix: bump SOVERSION to 28 for removed std::string_view symbols (#1694)#1697
baylesj merged 1 commit into
masterfrom
fix/1694-soversion-bump

Conversation

@baylesj

@baylesj baylesj commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #1694.

Problem

The std::string_view convenience methods — Value(std::string_view), getString, operator[], get, removeMember, isMember — were exported symbols in 1.9.7 (declared in value.h, defined out-of-line in value.cpp). After 1.9.7 the #1661/#1675 ABI-mismatch fixes made them header-only inline, which removed those symbols from the shared library while SOVERSION stayed at 27.

Verified on master (shared lib, C++17): Value::removeMember(std::string_view) is no longer exported, while the const char* / const String& overloads still are.

Removing exported symbols is an incompatible ABI change. Because the SONAME stayed libjsoncpp.so.27, a binary linked against 1.9.7's .so.27 (e.g. the reporter's system cmake / NFS Ganesha) fails at load with undefined symbol: _ZN4Json5Value12removeMemberESt17basic_string_view... against a later build of .so.27.

Fix

Bump PROJECT_SOVERSION / meson soversion 27 → 28. The changed ABI now gets a distinct SONAME (.so.28), so affected consumers get a clean "can't find .so.27" (rebuild required) instead of a symbol-lookup crash. Rebuilt against 1.10.0 they use the inline methods — no symbol dependency.

The removed symbols are intentionally not restored: an exported std::string_view symbol's presence depends on whether the library was compiled as C++17, which is exactly the mismatch #1661 fixed.

SOVERSION had been bumped every release through 1.9.7 (24→25→26→27) and then stopped; this realigns it with the ABI that actually shipped.

…1694)

The std::string_view convenience methods (Value(std::string_view),
getString, operator[], get, removeMember, isMember) were exported
symbols in 1.9.7 -- declared in value.h and defined out-of-line in
value.cpp. After 1.9.7 the #1661/#1675 ABI-mismatch fixes made them
header-only `inline`, which removed those symbols from the shared
library (e.g. Value::removeMember(std::string_view)), but SOVERSION
stayed at 27.

Removing exported symbols is an incompatible ABI change, so consumers
built against 1.9.7's libjsoncpp.so.27 fail to resolve those symbols
against later builds that still claim SONAME .so.27 (issue #1694: a
system jsoncpp upgrade broke cmake/NFS Ganesha with an undefined-symbol
error). Bump SOVERSION 27 -> 28 so the changed ABI gets a distinct
SONAME; affected consumers then get a clean rebuild requirement instead
of a symbol-lookup crash, and a rebuild against 1.10.0 uses the inline
methods (no symbol dependency).

The symbols are intentionally not restored: an exported std::string_view
symbol's presence depends on whether the library was compiled as C++17,
which is the mismatch #1661 fixed.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 27674752185

Coverage remained the same at 89.903%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2740
Covered Lines: 2615
Line Coverage: 95.44%
Relevant Branches: 2638
Covered Branches: 2220
Branch Coverage: 84.15%
Branches in Coverage %: Yes
Coverage Strength: 23827.05 hits per line

💛 - Coveralls

@baylesj baylesj merged commit 800aa28 into master Jun 17, 2026
48 checks passed
@baylesj baylesj deleted the fix/1694-soversion-bump branch June 17, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing symbol in jsoncpp 1.9.8

2 participants