You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
ae8ab48a05
jsoncpp >= 1.9.6 (MacPorts ships 1.9.7) only exports its std::string_view
overloads when built as C++17, e.g. Json::Value::get(std::string_view,
const Value&). qpid-proton 0.39.0 hardcodes CMAKE_CXX_STANDARD 11, so its
C++ binding compiles against the removed const char* overloads and fails
to link:
Undefined symbols for architecture arm64:
"Json::Value::get(char const*, Json::Value const&) const",
referenced from: proton::parse(...) in connect_config.cpp.o
Patch the bundled CMakeLists.txt to build as C++17 and bump
compiler.cxx_standard to 2017 so the binding matches the jsoncpp ABI.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
413 B
Diff
14 lines
413 B
Diff
--- CMakeLists.txt.orig
|
|
+++ CMakeLists.txt
|
|
@@ -76,7 +76,9 @@
|
|
enable_language(CXX)
|
|
|
|
# This effectively checks for cmake version 3.1 or later
|
|
- set(CMAKE_CXX_STANDARD 11)
|
|
+ # jsoncpp (>= 1.9.6) exposes a std::string_view ABI under C++17; building the
|
|
+ # C++ binding as C++11 references removed const char* overloads -> link errors.
|
|
+ set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
endif()
|
|
|