polybarFull: fix gcc15 build by bumping i3ipcpp to C++17
The i3ipcpp submodule (used when i3Support=true) forces -std=c++11, but the jsoncpp library is compiled with C++17 (JSONCPP_HAS_STRING_VIEW=1). This causes an ABI mismatch: i3ipcpp resolves operator[](const char*) but the jsoncpp library only exports operator[](std::string_view), resulting in undefined references at link time. Fix by changing i3ipcpp's compile standard from C++11 to C++17 to match the jsoncpp ABI. Polybar itself already uses C++17.
This commit is contained in:
@@ -102,8 +102,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# Replace hardcoded /etc when copying and reading the default config.
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace "/etc" $out
|
||||
substituteInPlace CMakeLists.txt --replace-fail "/etc" $out
|
||||
substituteAllInPlace src/utils/file.cpp
|
||||
# Fix gcc15 build: i3ipcpp forces -std=c++11 but the jsoncpp library was
|
||||
# compiled with C++17 (JSONCPP_HAS_STRING_VIEW=1), causing ABI mismatch.
|
||||
# The i3ipcpp code resolves operator[](const char*) but the library only
|
||||
# exports operator[](std::string_view). Bump i3ipcpp to C++17 to match.
|
||||
substituteInPlace lib/i3ipcpp/CMakeLists.txt --replace-fail \
|
||||
"-std=c++11" \
|
||||
"-std=c++17"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
||||
Reference in New Issue
Block a user