Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build: Failed to find some components and more #65

Open
igorcafe opened this issue Oct 14, 2021 · 3 comments
Open

Can't build: Failed to find some components and more #65

igorcafe opened this issue Oct 14, 2021 · 3 comments

Comments

@igorcafe
Copy link

I was having this issue:

$ cmake -S . -B build 
CMake Error at src/CMakeLists.txt:2 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "Quick".

  Expected Config file at "/usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake"
  does NOT exist

  Failed to find Qt component "QuickControls2".

  Expected Config file at
  "/usr/lib64/cmake/Qt6QuickControls2/Qt6QuickControls2Config.cmake" does NOT
  exist


-- Configuring incomplete, errors occurred!
See also "/home/igor/Git/unofficial-discord-client/build/CMakeFiles/CMakeOutput.log".
See also "/home/igor/Git/unofficial-discord-client/build/CMakeFiles/CMakeError.log".

So I just created the files it wasn't finding and ran again:

$ cmake -S . -B build
-- Configuring done
CMake Error at src/CMakeLists.txt:44 (add_executable):
  Target "unofficial-discord-client" links to target "Qt6::Quick" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?


CMake Error at src/CMakeLists.txt:44 (add_executable):
  Target "unofficial-discord-client" links to target "Qt6::QuickControls2"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

System info

- -
OS Manjaro 21.1
Packages installed cmake=3.21.3, qt6-base=6.2.0-1
@guerinoni
Copy link
Collaborator

If you try

mkdir build
cd build
cmake ..
cmake --build .

?

@igorcafe
Copy link
Author

The folder was created:

$ ls -l build
total 80K
drwxr-xr-x 4 igor igor 4,0K out 14 17:09 .
drwxr-xr-x 7 igor igor 4,0K out 14 16:25 ..
-rw-r--r-- 1 igor igor  32K out 14 16:42 CMakeCache.txt
drwxr-xr-x 5 igor igor 4,0K out 14 17:09 CMakeFiles
-rw-r--r-- 1 igor igor 1,8K out 14 16:42 cmake_install.cmake
-rw-r--r-- 1 igor igor  17K out 14 17:09 compile_commands.json
-rw-r--r-- 1 igor igor 5,3K out 14 17:09 Makefile
drwxr-xr-x 4 igor igor 4,0K out 14 17:09 src

I removed it and tried what you said, but I got the same last error message.
I believe it may be some dependecy missing, since it couldn't find Quick and QuicKControls2 components.

@guerinoni
Copy link
Collaborator

Yes it seems related to your Qt6 installation... Maybe try to build an empty project with QtQuick in order to catch the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants