Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734052 - net-analyzer/wireshark-3.2.5 USE=qt5? - CMake Error at CMakeLists.txt:1097 (find_package): By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Core" [...]
Summary: net-analyzer/wireshark-3.2.5 USE=qt5? - CMake Error at CMakeLists.txt:1097 (f...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mikle Kolyada
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-27 07:52 UTC by Wim van Ravesteijn
Modified: 2021-08-11 07:49 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,13.34 KB, text/plain)
2020-07-27 07:52 UTC, Wim van Ravesteijn
Details
emerge --info (emerge-info,9.18 KB, text/plain)
2020-07-27 07:52 UTC, Wim van Ravesteijn
Details
emerge -pqv (emerge-pqv,411 bytes, text/plain)
2020-07-27 07:53 UTC, Wim van Ravesteijn
Details
environment (environment,154.78 KB, text/plain)
2020-07-27 07:53 UTC, Wim van Ravesteijn
Details
CMakeError.log (CMakeError.log,6.84 KB, text/plain)
2020-07-27 10:21 UTC, Wim van Ravesteijn
Details
CMakeOutput.log (CMakeOutput.log,65.09 KB, text/plain)
2020-07-27 10:21 UTC, Wim van Ravesteijn
Details
build.log from konsole - env has CMAKE_FRAMEWORK_PATH=/usr/lib64/cmake/: (konsole_build.log,574.90 KB, text/plain)
2021-08-09 23:01 UTC, Wim van Ravesteijn
Details
build.log from qtcore - env has CMAKE_FRAMEWORK_PATH=/usr/lib64/cmake/: (qtcore_build.log.gz,70.09 KB, application/gzip)
2021-08-09 23:04 UTC, Wim van Ravesteijn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wim van Ravesteijn 2020-07-27 07:52:04 UTC
Created attachment 650938 [details]
build.log

Build fails due to Qt5 not found.

CMake Error at CMakeLists.txt:1097 (find_package):                                                                                                                 
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has                                                                                       
  asked CMake to find a package configuration file provided by "Qt5Core", but                                                                                      
  CMake did not find one.                                                                                                                                          

  Could not find a package configuration file provided by "Qt5Core" with any                                                                                       
  of the following names:                                                                                                                                          

    Qt5CoreConfig.cmake                                                                                                                                            
    qt5core-config.cmake                                                                                                                                           

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set                                                                                             
  "Qt5Core_DIR" to a directory containing one of the above files.  If                                                                                              
  "Qt5Core" provides a separate development package or SDK, be sure it has                                                                                         
  been installed.
Comment 1 Wim van Ravesteijn 2020-07-27 07:52:54 UTC
Created attachment 650940 [details]
emerge --info
Comment 2 Wim van Ravesteijn 2020-07-27 07:53:16 UTC
Created attachment 650942 [details]
emerge -pqv
Comment 3 Wim van Ravesteijn 2020-07-27 07:53:38 UTC
Created attachment 650944 [details]
environment
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2020-07-27 08:16:47 UTC
Comment on attachment 650942 [details]
emerge -pqv

[ebuild   R   ] net-analyzer/wireshark-3.2.5  USE="capinfos captype dftest dumpcap editcap filecaps lua mergecap minizip netlink pcap plugins qt5* randpkt randpktdump reordercap sharkd ssl text2pcap tshark udpdump zlib zstd -androiddump -bcg729 -brotli -ciscodump -doc -dpauxmon -http2 -kerberos -libxml2 -lz4 -maxminddb -plugin-ifdemo -sbc -sdjournal (-selinux) -smi -snappy -spandsp -sshdump -test -tfshark"
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2020-07-27 08:19:27 UTC
Obviously I would like to now know what version of dev-qt/qtcore is installed and perhaps any other information about your system that relates to Qt.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2020-07-27 08:19:53 UTC
Comment on attachment 650938 [details]
build.log

-- Configuring incomplete, errors occurred!
See also "/tmp/portage/net-analyzer/wireshark-3.2.5/work/wireshark-3.2.5_build/CMakeFiles/CMakeOutput.log".
See also "/tmp/portage/net-analyzer/wireshark-3.2.5/work/wireshark-3.2.5_build/CMakeFiles/CMakeError.log".

It might help to attach those, too.
Comment 7 Wim van Ravesteijn 2020-07-27 10:21:14 UTC
Created attachment 650948 [details]
CMakeError.log
Comment 8 Wim van Ravesteijn 2020-07-27 10:21:34 UTC
Created attachment 650950 [details]
CMakeOutput.log
Comment 9 Wim van Ravesteijn 2020-07-27 10:22:14 UTC
$ emerge -pqv qtcore
[binary   R   ] dev-qt/qtcore-5.14.2  USE="icu systemd -debug -old-kernel -test"
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-16 09:10:33 UTC
(In reply to Wim van Ravesteijn from comment #1)
> Created attachment 650940 [details]
> emerge --info

Looks like it's looking for Qt5 when that ought to be disabled:

net-analyzer/wireshark-3.2.5::gentoo was built with the following:
USE="capinfos captype dftest dumpcap editcap filecaps lua mergecap minizip netlink pcap plugins randpkt randpktdump reordercap sharkd ssl text2pcap tshark udpdump zlib zstd -androiddump -bcg729 -brotli -ciscodump -doc -dpauxmon -http2 -kerberos -libxml2 -lz4 -maxminddb -plugin-ifdemo -qt5 -sbc -sdjournal (-selinux) -smi -snappy -spandsp -sshdump -test -tfshark" ABI_X86="(64)"
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-16 09:15:18 UTC
Comment on attachment 650938 [details]
build.log

But your build log has USE=qt5:

 * USE:        abi_x86_64 amd64 capinfos captype dftest dumpcap editcap elibc_glibc filecaps kernel_linux lua mergecap minizip netlink pcap plugins qt5 randpkt randpktdump reordercap sharkd ssl text2pcap tshark udpdump userland_GNU zlib zstd

What is going on?
Comment 12 Sam James archtester gentoo-dev Security 2021-04-18 03:19:05 UTC
It’s unclear what the issue is/what needs to happen here. Still a problem?
Comment 13 Wim van Ravesteijn 2021-04-20 07:42:23 UTC
Unfortunately, problem is still there, but problem is not in wireshark, but in qt. Also other packages requiring qt have same problem. Unfortunately it is not clear to me what is causing the problem. I did already a full rebuild of the system, but this has not solved the problem.
Maybe someone has a hint where to look for what? When I get this message, which files have been looked up where?
Comment 14 Wim van Ravesteijn 2021-08-09 22:45:43 UTC
I have a new laptop, and it worked fine the first weeks compiling packages requiring qt5. But suddenly it stopped working again, while my desktop all the time did not face any trouble. I've been comparing configurations and strace output, and I noticed the following:

# strace -f emerge -av1 kde-apps/konsole kde-apps/gwenview 2>/tmp/emerge.strace

This failed at my laptop.

# grep Qt5CoreConfig emerge.strace  | cut -f2 -d'"' | uniq -c
      3 /usr/lib/portage/python3.9/ebuild-helpers/xattr/Qt5CoreConfig.cmake
      3 /usr/lib/portage/python3.9/ebuild-helpers/Qt5CoreConfig.cmake
      3 /usr/local/Qt5CoreConfig.cmake
      3 /usr/Qt5CoreConfig.cmake
      3 /Qt5CoreConfig.cmake
      3 /opt/Qt5CoreConfig.cmake
      3 /usr/lib/llvm/12/Qt5CoreConfig.cmake

Apparently, in these folders there is no Qt5CoreConfig.cmake. On my desktop, installation succeeded, there strace has following:

# grep Qt5CoreConfig emerge.strace  | cut -f2 -d'"' | uniq -c
      3 /usr/lib/portage/python3.9/ebuild-helpers/xattr/Qt5CoreConfig.cmake
      3 /usr/lib/portage/python3.9/ebuild-helpers/Qt5CoreConfig.cmake
      3 /usr/local/Qt5CoreConfig.cmake
      3 /usr/Qt5CoreConfig.cmake
      3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake
      3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig-version.cmake
[...]

I cannot figure out what causes this difference, but I did find a fix. Created a new file /etc/profile.d/cmake.sh with content:

export CMAKE_FRAMEWORK_PATH="/usr/lib64/cmake/:${CMAKE_FRAMEWORK_PATH}"

This goes pretty straight to the right path:

# grep Qt5CoreConfig emerge.strace  | cut -f2 -d'"' | uniq -c
      3 /usr/lib64/cmake/Qt5CoreConfig.cmake
      3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake
      3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig-version.cmake
[...]

Maybe this helps figuring out what broke my config, or a hint where to look to properly fix it. And if not, I keep my export.
Comment 15 Sam James archtester gentoo-dev Security 2021-08-09 22:49:06 UTC
(In reply to Wim van Ravesteijn from comment #13)
> Unfortunately, problem is still there, but problem is not in wireshark, but
> in qt. Also other packages requiring qt have same problem. Unfortunately it
> is not clear to me what is causing the problem. I did already a full rebuild
> of the system, but this has not solved the problem.
> Maybe someone has a hint where to look for what? When I get this message,
> which files have been looked up where?

Sorry, I missed this comment!

(In reply to Wim van Ravesteijn from comment #14)
> I have a new laptop, and it worked fine the first weeks compiling packages
> requiring qt5. But suddenly it stopped working again, while my desktop all
> the time did not face any trouble. I've been comparing configurations and
> strace output, and I noticed the following:
> 

Could you upload a fresh build.log for e.g. konsole or gwenview to this bug, along with a build log for dev-qt/qtcore?

> # strace -f emerge -av1 kde-apps/konsole kde-apps/gwenview
> 2>/tmp/emerge.strace
> 
> This failed at my laptop.
> 
> # grep Qt5CoreConfig emerge.strace  | cut -f2 -d'"' | uniq -c
>       3 /usr/lib/portage/python3.9/ebuild-helpers/xattr/Qt5CoreConfig.cmake
>       3 /usr/lib/portage/python3.9/ebuild-helpers/Qt5CoreConfig.cmake
>       3 /usr/local/Qt5CoreConfig.cmake
>       3 /usr/Qt5CoreConfig.cmake
>       3 /Qt5CoreConfig.cmake
>       3 /opt/Qt5CoreConfig.cmake

/opt seems weird...

> 
> # grep Qt5CoreConfig emerge.strace  | cut -f2 -d'"' | uniq -c
>       3 /usr/lib/portage/python3.9/ebuild-helpers/xattr/Qt5CoreConfig.cmake
>       3 /usr/lib/portage/python3.9/ebuild-helpers/Qt5CoreConfig.cmake
>       3 /usr/local/Qt5CoreConfig.cmake

/usr/local should *not* be there, surely, just like /opt?

>       3 /usr/Qt5CoreConfig.cmake
>       3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig.cmake
>       3 /usr/lib64/cmake/Qt5Core/Qt5CoreConfig-version.cmake
> [...]
Comment 16 Wim van Ravesteijn 2021-08-09 23:01:50 UTC
Created attachment 731938 [details]
build.log from konsole - env has CMAKE_FRAMEWORK_PATH=/usr/lib64/cmake/:
Comment 17 Wim van Ravesteijn 2021-08-09 23:04:09 UTC
Created attachment 731941 [details]
build.log from qtcore - env has CMAKE_FRAMEWORK_PATH=/usr/lib64/cmake/:

qtcore has been compiled after konsole.