Coding-Bunker / unofficial-discord-client

Unofficial client for discord build in C++ with Qt.
MIT License
48 stars 9 forks source link

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

Open igorcafe opened 2 years ago

igorcafe commented 2 years ago

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 commented 2 years ago

If you try

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

?

igorcafe commented 2 years ago

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 commented 2 years ago

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