Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941642 - dev-libs/jsoncpp-1.9.6 causes cmake builds to fail
Summary: dev-libs/jsoncpp-1.9.6 causes cmake builds to fail
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-16 20:49 UTC by Plüss Roland
Modified: 2024-11-02 20:51 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Plüss Roland 2024-10-16 20:49:53 UTC
This is an upstream bug pouring down into Gentoo.

Upstream bug-fix issue: https://github.com/open-source-parsers/jsoncpp/issues/1568

Bug caused by this fix: https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/509
> This jsoncpp issue causes OpenXR SDK 1.1.38 up to 1.1.41 to fail compiling:
> ...
> 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)

Basically the upstream fix is not really fixing the problem but instead breaking builds.

Reproducible: Always

Steps to Reproduce:
1. Build OpenXR SDK from source.
Actual Results:  
Build fails with error mentioned in OpenXR issue ticket

Expected Results:  
Build succeeds.
Comment 1 Eli Schwartz gentoo-dev 2024-10-16 21:25:59 UTC
Yes. See bug 940272 comment #1:
> The real bug is here:
> 
> https://github.com/KhronosGroup/OpenXR-SDK/blob/
> 7d1c0961351bac61fd7bb72d402649d5ac3f2935/src/cmake/FindJsonCpp.cmake#L274-
> L279
> 
> It considers pkgconfig to be "old-school"...
> 
> Fallout from the original addition in
> https://github.com/open-source-parsers/jsoncpp/pull/1486 which I guess was
> flawed? So now stuff can find this cmake file and fail due to finding it...

And indeed the correct solution is to stop generating cmake files at all since openxr and all the other software involved here can already handle pkg-config detection of jsoncpp.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-10-19 07:00:17 UTC
I'm going to test if removing the cmake files breaks revdeps now.
Comment 3 Larry the Git Cow gentoo-dev 2024-10-19 15:24:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55275ae06878546c4937fadde505758fd1df9beb

commit 55275ae06878546c4937fadde505758fd1df9beb
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-10-19 06:54:56 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-10-19 15:24:13 +0000

    dev-libs/jsoncpp: Remove installed cmake files
    
    Closes: https://bugs.gentoo.org/941642
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-libs/jsoncpp/jsoncpp-1.9.6-r2.ebuild | 57 ++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
Comment 4 Plüss Roland 2024-10-19 20:55:15 UTC
What exactly has been fixed? I can't really tell from the commit.
Comment 5 Eli Schwartz gentoo-dev 2024-10-20 01:05:15 UTC
(In reply to Plüss Roland from comment #4)
> What exactly has been fixed? I can't really tell from the commit.

The cmake files for jsoncpp are broken and inject a non-working dependency into OpenXR.

So, removing the cmake files for jsoncpp means that jsoncpp gets found via other methods -- methods which work and allow OpenXR to build correctly.
Comment 6 Plüss Roland 2024-10-20 10:30:07 UTC
Okay, this works now.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-10-20 10:34:23 UTC
Thanks for the confirmation.  I'll file a stablereq now to fix the regression.