cmake is saying I don't have required packages, but doesn't show what they are
-
I'm trying to compile QtNetwork for a project. However, I get the error
CMake Error at /opt/homebrew/Cellar/cmake/3.26.4/share/cmake/Modules/FeatureSummary.cmake:464 (message): feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run. Call Stack (most recent call first): cmake/QtBuildInformation.cmake:16 (feature_summary) cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:603 (qt_print_feature_summary) CMakeLists.txt:213 (qt_build_repo_end)
Usually, this means that I forgot to install some package. However, this time, it doesn't show any packages, so I'm not sure where the error comes from.
-
@DrownedSuccess Figured it out --- I needed to enable building a non-system pcre2 (I could only see it with --trace-expand). Setting
-DINPUT_pcre2=on -DINPUT_system_pcre2=no
fixed the problem. -
You can't compile QtNetwork as standalone lib - you have to compile the complete QtBase package. But why do you want to compile Qt by yourself at all instead using some pre-build packages (e..g through Qt online installer or your distro packages?)
-
@Christian-Ehrlicher 1. I know this is not true, since I was able to compile Qt Network by itself on Linux (I only have this problem on MacOS), and 2. I want to compile static libs for an app (Arch Linux, as far as I can tell, doesn't offer QtNetwork as a static lib).
-
@DrownedSuccess said in cmake is saying I don't have required packages, but doesn't show what they are:
- I know this is not true, since I was able to compile Qt Network by itself on Linux
No, this is not possible. QtNetwork is a module of QtCore and can not be compiled standalone. Look at the CMakeLists.txt of qtbase/src/network and you will see that this can't work as standalone lib.
If you need a static version (for whatever reason) then you have to compile the whole QtBase as static. Otherwise you have a static QtNetwork module but still need a shared QtCore lib (and I'm pretty sure this will crash because mixing static and shared qt libs will not work).
-
@Christian-Ehrlicher Yes, the QtCore static lib was also compiled, if that's what you meant (on Linux).
Also, even if I try to compile everything, I get the same error (I cleaned the folder before trying again). -
Start over with a clean source and build dir and then post the whole configure line + output.
-
@Christian-Ehrlicher Full output:
system@macbook build % cmake -DBUILD_SHARED_LIBS=OFF -DINPUT_gui=OFF -DINPUT_network=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DINPUT_widgets=no -DINPUT_dbus=no -DINPUT_timezone=no -DINPUT_icu=no -DINPUT_opengl=no -DINPUT_harfbuzz=no -DINPUT_zstd=no -DINPUT_libb2=qt -DINPUT_mimetype_database_compression=none -DINPUT_system_zlib=no -DINPUT_pcre2=no -DINPUT_png=qt -DINPUT_glib=no -DINPUT_vnc=no -DINPUT_directfb=no -DINPUT_linuxfb=no -DINPUT_testlib=no -DINPUT_sql=no -DINPUT_textmarkdownreader=no -DINPUT_imageformatplugin=no -DINPUT_libinput=no -DINPUT_system_xcb_xinput=on -DINPUT_fontconfig=no -DINPUT_freetype=no -DINPUT_evdev=no -DINPUT_tslib=no -DINPUT_vulkan=no -DFEATURE_concurrent=OFF -DFEATURE_xml=OFF -G "Ninja" -DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=ON .. -- The CXX compiler identification is AppleClang 12.0.5.12050022 -- The C compiler identification is AppleClang 12.0.5.12050022 -- The ASM compiler identification is Clang with GNU-like command-line -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -DCMAKE_C_FLAGS_DEBUG=-g -DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG -DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG -DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG -DCMAKE_C_STANDARD=11 -DCMAKE_C_STANDARD_REQUIRED=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_MODULE_PATH:STRING=/Users/system/Repos/vulkan-stream/external/qtbase/cmake/platforms -DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH:BOOL=OFF CMake Error at /opt/homebrew/Cellar/cmake/3.26.4/share/cmake/Modules/FeatureSummary.cmake:464 (message): feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run. Call Stack (most recent call first): cmake/QtBuildInformation.cmake:16 (feature_summary) cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:603 (qt_print_feature_summary) CMakeLists.txt:213 (qt_build_repo_end) -- Configuring incomplete, errors occurred!
-
@DrownedSuccess Figured it out --- I needed to enable building a non-system pcre2 (I could only see it with --trace-expand). Setting
-DINPUT_pcre2=on -DINPUT_system_pcre2=no
fixed the problem. -