Skip to content

Commit 800aa28

Browse files
authored
fix: bump SOVERSION to 28 for the removed std::string_view symbols (#1694) (#1697)
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.
1 parent 22c7ec3 commit 800aa28

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ project(jsoncpp
6161
LANGUAGES CXX)
6262

6363
message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
64-
set(PROJECT_SOVERSION 27)
64+
set(PROJECT_SOVERSION 28)
6565

6666
include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInSourceBuilds.cmake)
6767
include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInBuildInstalls.cmake)

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jsoncpp_lib = library(
5151
'src/lib_json/json_value.cpp',
5252
'src/lib_json/json_writer.cpp',
5353
]),
54-
soversion : 27,
54+
soversion : 28,
5555
install : true,
5656
include_directories : jsoncpp_include_directories,
5757
cpp_args: dll_export_flag)

0 commit comments

Comments
 (0)