KhronosGroup / KhronosGroup/OpenXR-SDK-Source
jsoncpp issue causes OpenXR SDK 1.1.38+ to not compile anymore
- Dominant language
- Python
- Stars
- 825
- Forks
- 306
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Description
[This jsoncpp issue](https://github.com/open-source-parsers/jsoncpp/issues/1568) causes OpenXR SDK 1.1.38 up to 1.1.41 to fail compiling:
```
-- The C compiler identification is GNU 13.3.1
-- The CXX compiler identification is GNU 13.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/bin/python3.12 (found version "3.12.6") found components: Interpreter
-- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB
-- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB - Failed
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS - Success
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS - Failed
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Enabling OpenGL support
-- Found Vulkan: /usr/lib64/libvulkan.so (found version "1.3.290") found components: glslc glslangValidator
-- Enabling Vulkan support
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at /usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake:37 (check_required_components):
Unknown CMake command "check_required_components".
Call Stack (most recent call first):
src/cmake/FindJsonCpp.cmake:68 (find_package)
src/CMakeLists.txt:125 (find_package)
-- Configuring incomplete, errors occurred!
RunExternalCommand failed for script:
export CC="gcc"
export CXX="g++"
export AS="as"
export AR="ar"
export RANLIB="ranlib"
cd "/home/roland/progs/dragengine/extern/openxr/build/OpenXR-SDK-release-1.1.41" || exit 1
cmake -DCMAKE_INSTALL_PREFIX="/home/roland/progs/dragengine/extern/openxr/build" -DCMAKE_INSTALL_LIBDIR="/home/roland/progs/dragengine/extern/openxr/build/lib" -DCMAKE_BUILD_TYPE=Release -DBUILD_API_LAYERS=No -DBUILD_TESTS=No -DBUILD_WITH_STD_FILESYSTEM=No -DBUILD_WITH_SYSTEM_JSONCPP=No -DBUILD_WITH_WAYLAND_HEADERS=No -DBUILD_WITH_XCB_HEADERS=No -DDYNAMIC_LOADER=No -Wno-dev ../OpenXR-SDK-release-1.1.41 || exit 1
make -j 12 install || exit 1
```
The problem started happening after a system update where gcc/cmake has been updated:
```
gcc (Gentoo 13.3.1_p20240614 p17) 13.3.1 20240614
cmake version 3.30.2
```
The only workaround I found so far is [this patch](https://github.com/LordOfDragons/dragengine/blob/master/extern/openxr/patches/1.1.41/01-jsoncpp-cmake-fix.patch). But this requires jsoncpp to be build using BUILD_WITH_SYSTEM_JSONCPP=No and is thus really just a workaround and no fix.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/cmake/FindJsonCpp.cmake and src/CMakeLists.txt, then compare the system jsoncppConfig.cmake failure with the workaround patch linked in the issue. Reproduce the OpenXR SDK 1.1.38–1.1.41 configuration using BUILD_WITH_SYSTEM_JSONCPP=Yes; done means system jsoncpp configuration succeeds without the workaround or disabling system jsoncpp.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100