Bug 1883926 - jsoncpp can't be imported as a CMake package
Summary: jsoncpp can't be imported as a CMake package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: jsoncpp
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sébastien Willmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-30 14:06 UTC by Lukáš Zaoral
Modified: 2020-10-30 20:27 UTC (History)
4 users (show)

Fixed In Version: jsoncpp-1.9.4-2.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-02 00:35:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to fix the issue (1.32 KB, application/mbox)
2020-09-30 14:06 UTC, Lukáš Zaoral
no flags Details

Description Lukáš Zaoral 2020-09-30 14:06:20 UTC
Created attachment 1717884 [details]
Patch to fix the issue

Description of problem:
The latest release of jsoncpp cannot be successfully imported as a CMake package.

Version-Release number of selected component (if applicable):
jsoncpp-1.9.4-1

How reproducible:
Always

Steps to Reproduce:
1. dnf install cmake make jsoncpp-devel 
2. cat > CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.18)
project(test NONE)
list(APPEND CMAKE_PREFIX_PATH "/usr/lib64/cmake/jsoncpp")
find_package(jsoncpp REQUIRED CONFIG)
EOF
3. cmake .

Actual results:
CMake Error at usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake:100 (message):
  The imported target "jsoncpp_static" references the file

     "/usr/lib64/libjsoncpp_static.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  //CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/build/CMakeFiles/CMakeOutput.log".

Expected results:
Everything configures successfully.

Additional info:
Previous release of the package worked fine and the enclosed patch should fix this issue (the BUILD_SHARED_LIBS define was redundant as it is already defined by %cmake).

Comment 1 Fedora Update System 2020-09-30 17:10:45 UTC
FEDORA-2020-9556b5823e has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9556b5823e

Comment 2 Björn 'besser82' Esser 2020-09-30 17:12:12 UTC
Also tagged into f33-buildroot-overrides.

Comment 3 Fedora Update System 2020-10-01 01:20:01 UTC
FEDORA-2020-9556b5823e has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9556b5823e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9556b5823e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2020-10-02 00:35:22 UTC
FEDORA-2020-9556b5823e has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Sébastien Blin 2020-10-30 16:21:46 UTC
Seems still the case but with autotools. I did a minimal reproduce repo:

https://github.com/AmarOk1412/jsoncpp-fed33

Comment 6 Sébastien Blin 2020-10-30 20:27:23 UTC
To complete, this is the pc file on fedora 32:

cat /usr/lib64/pkgconfig/jsoncpp.pc 
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib64
includedir=${prefix}/include

Name: jsoncpp
Description: A C++ library for interacting with JSON
Version: 1.9.2
URL: https://github.com/open-source-parsers/jsoncpp
Libs: -L${libdir} -ljsoncpp
Cflags: -I${includedir}

Fedora 33:

$ cat /usr/lib64/pkgconfig/jsoncpp.pc 
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib64
includedir=${prefix}/include

Name: jsoncpp
Description: A C++ library for interacting with JSON
Version: 
URL: https://github.com/open-source-parsers/jsoncpp
Libs: -L${libdir} -ljsoncpp
Cflags: -I${includedir}

It misses the version


Note You need to log in before you can comment on or make changes to this bug.