Bug 1292107

Summary: Packages of qjdns for both Qt4 and Qt5 can not co-exist in the same system
Product: [Fedora] Fedora Reporter: Raphael Groner <projects.rg>
Component: jdnsAssignee: Ivan Romanov <drizt72>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: drizt72, extras-qa, jgrulich, rdieter, sven
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1292106 Environment:
Last Closed: 2015-12-17 08:38:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1292095    

Description Raphael Groner 2015-12-16 13:48:12 UTC
Description of problem:
# grep Name /usr/lib64/pkgconfig/qjdns-qt5.pc 
Name: qjdns
# grep Name /usr/lib64/pkgconfig/qjdns.pc 
Name: qjdns
# rpm -qf /usr/lib64/pkgconfig/qjdns-qt5.pc 
qjdns-qt5-devel-2.0.3-1.fc23.x86_64
# rpm -qf /usr/lib64/pkgconfig/qjdns.pc 
qjdns-qt4-devel-2.0.3-1.fc23.x86_64

Version-Release number of selected component (if applicable):
see above

How reproducible:
yes

Steps to Reproduce:
1. dnf install qjdns-qt4-devel qjdns-qt5-devel
2. do cmake pkg_search_module(qjdns qjdns)
3.

Actual results:
no idea if it collects Qt4 or Qt5 packages and is it randomly.

Expected results:
No error, both packages can co-exist.

Additional info:

Comment 1 Raphael Groner 2015-12-16 13:53:15 UTC
Sorry for reassign, this happened accidently cause of bug clone.

Comment 2 Ivan Romanov 2015-12-17 08:33:57 UTC
Do you mean that you doesn't know what version of qjdns (Qt4 or Qt5) you use?
You can always do ldd /usr/lib64/libqjdns.so.2 to check it.
Also in CMake world you shouldn't use pkg-config. Use CMake module always when it is possible. For qjdns you can do 
find_package(QJDns).

Full CMakeLists.txt example

project(test)
cmake_minimum_required(VERSION 2.8.11)
find_package(Qt5Core REQUIRED)
find_package(QJDns REQUIRED)