Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878753 - dev-qt/qt-creator-8.0.1 fails to compile: Unknown CMake command "pkg_check_modules"
Summary: dev-qt/qt-creator-8.0.1 fails to compile: Unknown CMake command "pkg_check_mo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Davide Pesavento
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-10-29 20:02 UTC by Agostino Sarubbo
Modified: 2022-11-05 06:35 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,59.14 KB, text/plain)
2022-10-29 20:02 UTC, Agostino Sarubbo
Details
1-CMakeOutput.log (1-CMakeOutput.log,47.68 KB, text/plain)
2022-10-29 20:02 UTC, Agostino Sarubbo
Details
Build log file for version 8.0.2 (dev-qt:qt-creator-8.0.2:20221101-004701.log,7.02 KB, text/x-log)
2022-11-01 00:59 UTC, Francois Chenier
Details
Build log file for version 8.0.2 - dev-cpp/yasm-cpp not installed (Emerge_No_YAML-CPP.log,14.03 KB, text/plain)
2022-11-01 22:45 UTC, Francois Chenier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-10-29 20:02:00 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-qt/qt-creator-8.0.1 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-10-29 20:02:03 UTC
CC'ing also the author of the commit (157b590574f3ca93b77040d9cc788e367d02c51b)
Comment 2 Agostino Sarubbo gentoo-dev 2022-10-29 20:02:04 UTC
Created attachment 826071 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2022-10-29 20:02:05 UTC
Created attachment 826073 [details]
1-CMakeOutput.log

1-CMakeOutput.log
Comment 4 Peter Levine 2022-10-31 00:06:14 UTC
Based on what I see from similar bugs, I likely should have placed 'find_package(PkgConfig REQUIRED)' above 'pkg_check_modules(gumbo REQUIRED IMPORTED_TARGET gumbo)' and included 'virtual/pkgconfig' as a bdep when building without webwngine support. I'll take the opportunity to bump 8.0.2.
Comment 5 Francois Chenier 2022-10-31 22:58:17 UTC
(In reply to Peter Levine from comment #4)
> Based on what I see from similar bugs, I likely should have placed
> 'find_package(PkgConfig REQUIRED)' above 'pkg_check_modules(gumbo REQUIRED
> IMPORTED_TARGET gumbo)' and included 'virtual/pkgconfig' as a bdep when
> building without webwngine support. I'll take the opportunity to bump 8.0.2.

Doesn't work. Same error. The funny thing is there is no file in src/libs/qlitehtml/src directory; just an empty CMakeFiles directory

-- Check for working CXX compiler: /usr/local/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Could NOT find Clang (missing: Clang_DIR)
-- Performing Test QTC_LINKER_SUPPORTS_NO_UNDEFINED
-- Performing Test QTC_LINKER_SUPPORTS_NO_UNDEFINED - Success
CMake Error at src/libs/qlitehtml/src/CMakeLists.txt:15 (pkg_check_modules):
  Unknown CMake command "pkg_check_modules".


-- Configuring incomplete, errors occurred!
Comment 6 Peter Levine 2022-11-01 00:37:24 UTC
That's weird.  The ebuild only edits 'src/libs/qlitehtml/src/CMakeLists.txt' but doesn't delete anything.  There should exist the files container_qpainter.cpp, container_qpainter_p.h, qlitehtml.pri, qlitehtmlwidget.cpp, CMakeLists.txt  container_qpainter.h, qlitehtml_global.h, qlitehtml.qbs, and qlitehtmlwidget.h.

Try running `emerge` or `ebuild` with the `--debug` parameter and post the log, or a link to the compressed log if it exceeds the attachment size limit.
Comment 7 Francois Chenier 2022-11-01 00:59:34 UTC
Created attachment 826261 [details]
Build log file for version 8.0.2

Created the ebuild from 8.0.1 w/o any change on the file.
Comment 8 Francois Chenier 2022-11-01 01:13:49 UTC
(In reply to Peter Levine from comment #6)
> Try running `emerge` or `ebuild` with the `--debug` parameter and post the
> log, or a link to the compressed log if it exceeds the attachment size limit.

Definitively at 7K not too long. Problem is straight at the beginning. I exclude any problem with my build system; I upgraded to KDE 5.26.2 yesterday w/o any compiling issue. I'm on Qt 5.15.5.

Might be relevant or not but I'm compiling w/o clang, git & lsp flags on and added imageviewer, serialterminal flags to the default Gentoo flags for this package.
Comment 9 Francois Chenier 2022-11-01 03:37:23 UTC
(In reply to Peter Levine from comment #6)

So far I found 2 issues, one in the code, the other in the ebuild

1) There is another one "find_package(PkgConfig REQUIRED)" issue in src/qlitehtml/src/CmakeList.txt in 8.0.2. Adding the line before "pkg_check_modules(gumbo REQUIRED IMPORTED_TARGET gumbo)" helped me to go further.

2) This package depends on dev-cpp/yaml-cpp (RDEPEND) which is a missing dependency on 8.0.1 ebuild.

Crossed fingers ... still compiling at [707/1868]
Comment 10 Francois Chenier 2022-11-01 04:07:00 UTC
(In reply to Francois Chenier from comment #9)

8.0.2 is all good for me with the 2 things I found in comment #9.
Comment 11 Peter Levine 2022-11-01 04:37:20 UTC
(In reply to Francois Chenier from comment #8)
> Definitively at 7K not too long. Problem is straight at the beginning.

My mistake.  Could you run it again and append the command with " | tee /tmp/output.log".  Then upload /tmp/output.log.

(In reply to Francois Chenier from comment #9)
> (In reply to Peter Levine from comment #6)
> 
> So far I found 2 issues, one in the code, the other in the ebuild
> 
> 1) There is another one "find_package(PkgConfig REQUIRED)" issue in
> src/qlitehtml/src/CmakeList.txt in 8.0.2. Adding the line before
> "pkg_check_modules(gumbo REQUIRED IMPORTED_TARGET gumbo)" helped me to go
> further.

That's the issue already addressed with the PR commit https://github.com/gentoo/gentoo/pull/28047/commits/28a5d85a9418fcab52f0ce0ac64858bd340dde1a.  It's then copied over to 8.0.2 with https://github.com/gentoo/gentoo/pull/28047/commits/757bcd8701e82e63bc6acc3f3b924b134f0152b2

> 2) This package depends on dev-cpp/yaml-cpp (RDEPEND) which is a missing
> dependency on 8.0.1 ebuild.

dev-cpp/yaml-cpp is only needed with USE=clang.  It's dep logic is already handled in 'src/plugins/clangtools/CMakeLists.txt'. And  "clang? ( >=dev-cpp/yaml-cpp-0.6.2:= )" has been included in CDEPEND (i.e., DEPEND and RDEPEND) for quite some time.
Comment 12 Peter Levine 2022-11-01 04:42:59 UTC
(In reply to Francois Chenier from comment #10)
> (In reply to Francois Chenier from comment #9)
> 
> 8.0.2 is all good for me with the 2 things I found in comment #9.

Could you try testing with the qt-creator-8.0.2.ebuild from https://raw.githubusercontent.com/gentoo/gentoo/757bcd8701e82e63bc6acc3f3b924b134f0152b2/dev-qt/qt-creator/qt-creator-8.0.2.ebuild and report if it resolves the issue on your end?
Comment 13 Francois Chenier 2022-11-01 22:43:41 UTC
(In reply to Peter Levine from comment #12)

qt-creator-8.0.2.ebuild from Git compile fine only if dev-cpp/yaml-cpp is installed. Clang logic for the one who disable the flag seems broken in qt-creator ver. 8 (was working in ver. 6.0). Emerge spit the dummy at (see also full log as attachement on top) : 

-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C               -march=corei7-avx -O2 -fomit-frame-pointer -pipe
C++             -march=corei7-avx -O2 -fomit-frame-pointer -pipe
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring done
CMake Error at cmake/QtCreatorAPI.cmake:168 (add_library):
  Cannot find source file:

    /mnt/vram/portage/dev-qt/qt-creator-8.0.2/work/qt-creator-opensource-src-8.0.2/src/libs/3rdparty/yaml-cpp/include/yaml-cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
  cmake/Findyaml-cpp.cmake:24 (add_qtc_library)
  src/plugins/clangtools/CMakeLists.txt:1 (find_package)


CMake Error at cmake/QtCreatorAPI.cmake:168 (add_library):
  No SOURCES given to target: yaml-cpp
Call Stack (most recent call first):
  cmake/Findyaml-cpp.cmake:24 (add_qtc_library)
  src/plugins/clangtools/CMakeLists.txt:1 (find_package)
Comment 14 Francois Chenier 2022-11-01 22:45:55 UTC
Created attachment 826569 [details]
Build log file for version 8.0.2 - dev-cpp/yasm-cpp not installed

However this ebuild compile fine if yaml-cpp is intalled ...
Comment 15 Peter Levine 2022-11-02 00:21:59 UTC
(In reply to Francois Chenier from comment #14)
> Created attachment 826569 [details]
> Build log file for version 8.0.2 - dev-cpp/yasm-cpp not installed
> 
> However this ebuild compile fine if yaml-cpp is intalled ...

OK. I can reproduce it. The problem is that the clangtools plugin's CMakeLists.txt unnecessarily depends yaml-cpp, whether or not the plugin is built.  i have updated the PR.  If you could, please test the ebuild without yaml-cpp installed and without the clang USE flag enabled.  

https://raw.githubusercontent.com/gentoo/gentoo/94df14b146ca7d3239c5651f0be667d9b9fbb879/dev-qt/qt-creator/qt-creator-8.0.2.ebuild
Comment 16 Francois Chenier 2022-11-02 01:26:22 UTC
(In reply to Peter Levine from comment #15)

All good for me w/o yaml-cpp installed & clang flag disabled which is my default configuration. Time to close this bug and release 8.0.2. Thanks.
Comment 17 Larry the Git Cow gentoo-dev 2022-11-05 06:35:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166a265815ff2e354e8d83e4fb6b076f058774bc

commit 166a265815ff2e354e8d83e4fb6b076f058774bc
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2022-10-31 00:48:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-05 06:32:43 +0000

    dev-qt/qt-creator: fix pkgconfig bdep
    
    virtual/pkgconfig should be included as a build dependency if building
    without qtwebengine support.  Also, such a dep should be explicitly
    searched for by cmake with the 'find_package' command.
    
    Closes: https://bugs.gentoo.org/878753
    Signed-off-by: Peter Levine <plevine457@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-qt/qt-creator/qt-creator-8.0.1.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

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

commit e41b0b28956d54254c714b6dc6b0fd3983c614c7
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2022-11-01 23:36:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-05 06:32:43 +0000

    dev-qt/qt-creator: fix unnecessary dependence on dev-cpp/yaml-cpp
    
    Including the clangtools plugin's CMakeLists.txt causes an
    unconditional dependence on dev-cpp/yaml-cpp, whether or not the plugin
    is enabled.  Removing 'add_subdirectory(clangtools)' from the parent
    directory's CMakeLists.txt when the clangtools USE flag is disabled
    resolves it.
    
    Bug: https://bugs.gentoo.org/878753
    Signed-off-by: Peter Levine <plevine457@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-qt/qt-creator/qt-creator-8.0.1.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)