Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions ports/qtbase/cmake/qt_install_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function(qt_cmake_configure)
cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "DISABLE_NINJA;DISABLE_PARALLEL_CONFIGURE"
""
"TOOL_NAMES;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_MAYBE_UNUSED")

vcpkg_find_acquire_program(PERL) # Perl is probably required by all qt ports for syncqt
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})
Expand All @@ -79,7 +79,7 @@ function(qt_cmake_configure)
if(_qarg_DISABLE_NINJA)
set(ninja_option WINDOWS_USE_MSBUILD)
endif()

set(disable_parallel "")
if(_qarg_DISABLE_PARALLEL_CONFIGURE)
set(disable_parallel DISABLE_PARALLEL_CONFIGURE)
Expand All @@ -97,14 +97,18 @@ function(qt_cmake_configure)
string(REGEX MATCHALL "CMAKE_REQUIRE_FIND_PACKAGE_[^:=]+(:BOOL)?=OFF" require_find_package "${_qarg_OPTIONS}")
list(TRANSFORM require_find_package REPLACE "(:BOOL)?=OFF" "")
list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${require_find_package})
# Disable unused warnings for disabled features. Qt might decide to not emit the feature variables if other features are deactivated.

# Disable unused warnings for disabled features. Qt might decide to not emit the feature variables if other features are deactivated.
string(REGEX MATCHALL "(QT_)?FEATURE_[^:=]+(:BOOL)?=OFF" disabled_features "${_qarg_OPTIONS}")
list(TRANSFORM disabled_features REPLACE "(:BOOL)?=OFF" "")
list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_features})

list(APPEND _qarg_OPTIONS "-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON")

if(VCPKG_TARGET_IS_ANDROID)
list(APPEND _qarg_OPTIONS "-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}")
endif()
Comment on lines +108 to +110
Copy link
Contributor

@Neumann-A Neumann-A Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is the issue?

The error reads:

CMake Error at cmake/QtBuildInformation.cmake:472 (message):
  Feature "opengles2": Forcing to "ON" breaks its condition:

      NOT WIN32 AND NOT WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND

  Condition values dump:

      WIN32 = ""
      WATCHOS = "0"
      QT_FEATURE_opengl_desktop = "OFF"
      GLESv2_FOUND = "FALSE"

So I see "-DFEATURE_opengles2=ON" in combination with GLESv2_FOUND = "FALSE" more as a problem. Can it be that angle was installed before qtbase which then failed the compile check (since it incorrectly picks up GLESv2 from angle )? Seems like a problem #26693 would have solve ;)

I am more concerned about the errors in https://dev.azure.com/vcpkg/public/_build/results?buildId=80379&view=results where it seems like required dependencies are not restored.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am more concerned about the errors in https://dev.azure.com/vcpkg/public/_build/results?buildId=80379&view=results where it seems like required dependencies are not restored.

Or maybe it is just reinstalling angle after qtbase has been correctly build and then failing the check. So could be the same issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I am not sure this is the actual problem. I just saw that the first line of output is:

-- Android build detected, checking configuration defaults...

and I assumed that may make different stuff happen vis a vis that OpenGL stuff because portfile.cmake does not think it's an Android build, but qt thinks it is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am more concerned about the errors in https://dev.azure.com/vcpkg/public/_build/results?buildId=80379&view=results where it seems like required dependencies are not restored.

The first build failure there is:

Building qtshadertools[core]:x64-linux...
-- Using cached qtshadertools-everywhere-src-6.3.2.tar.xz.
-- Extracting source /mnt/vcpkg-ci/downloads/qtshadertools-everywhere-src-6.3.2.tar.xz
-- Using source at /mnt/vcpkg-ci/buildtrees/qtshadertools/src/here-src-6-681300ef4b.clean
-- Configuring x64-linux
CMake Warning at /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:310 (message):
  The following variables are not used in CMakeLists.txt:

      ANDROID_SDK_ROOT
      INSTALL_MKSPECSDIR
      QT_BUILD_BENCHMARKS
      QT_BUILD_EXAMPLES
      QT_BUILD_TESTS
      QT_MKSPECS_DIR
      QT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS

  Please recheck them and remove the unnecessary options from the
  `vcpkg_cmake_configure` call.

  If these options should still be passed for whatever reason, please use the
  `MAYBE_UNUSED_VARIABLES` argument.
Call Stack (most recent call first):
  /mnt/vcpkg-ci/installed/x64-linux/share/qtbase/qt_install_submodule.cmake:112 (vcpkg_cmake_configure)
  /mnt/vcpkg-ci/installed/x64-linux/share/qtbase/qt_install_submodule.cmake:298 (qt_cmake_configure)
  ports/qtshadertools/portfile.cmake:8 (qt_install_submodule)
  scripts/ports.cmake:147 (include)


-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:131 (message):
    Command failed: /mnt/vcpkg-ci/downloads/tools/cmake-3.24.0-linux/cmake-3.24.0-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j33
    Working Directory: /mnt/vcpkg-ci/buildtrees/qtshadertools/x64-linux-dbg
    See logs for more information:
      /mnt/vcpkg-ci/buildtrees/qtshadertools/install-x64-linux-dbg-err.log

Call Stack (most recent call first):
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  /mnt/vcpkg-ci/installed/x64-linux/share/qtbase/qt_install_submodule.cmake:305 (vcpkg_cmake_install)
  ports/qtshadertools/portfile.cmake:8 (qt_install_submodule)
  scripts/ports.cmake:147 (include)


error: building qtshadertools:x64-linux failed with: BUILD_FAILED

Where install-x64-linux-dbg-err.log says:

ninja: error: unknown target 'install'

and I have no idea what could cause that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong log. You need to check the configure log. There it tells you that the target Qt6::Gui was not found probably because find_package(GLESv2) silently failed. Due to how upstream CI works configure is not allowed to fail if a module is not available. (so all find_package calls are missing the REQUIRED keyword even for internal deps.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I am fine with this change but I don't think it will solve the underlying problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, in that case I'll merge this and watch for the problem still being present...


if(NOT PORT MATCHES "qtbase")
list(APPEND _qarg_OPTIONS "-DQT_MKSPECS_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6/mkspecs")
endif()
Expand All @@ -113,8 +117,8 @@ function(qt_cmake_configure)
SOURCE_PATH "${SOURCE_PATH}"
${ninja_option}
${disable_parallel}
OPTIONS
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to screw with users toolchain settings.
OPTIONS
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to screw with users toolchain settings.
#-DQT_HOST_PATH=<somepath> # For crosscompiling
#-DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc
#-DQT_QMAKE_TARGET_MKSPEC=win32-msvc
Expand All @@ -127,7 +131,6 @@ function(qt_cmake_configure)
-DINSTALL_LIBEXECDIR:STRING=bin
-DINSTALL_PLUGINSDIR:STRING=${qt_plugindir}
-DINSTALL_QMLDIR:STRING=${qt_qmldir}
-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
${_qarg_OPTIONS}
OPTIONS_RELEASE
${_qarg_OPTIONS_RELEASE}
Expand Down Expand Up @@ -188,7 +191,7 @@ function(qt_fixup_and_cleanup)
## Handle PRL files
qt_fix_prl_files()

## Handle CMake files.
## Handle CMake files.
set(COMPONENTS)
file(GLOB COMPONENTS_OR_FILES LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/share/Qt6*")
list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6")
Expand All @@ -203,7 +206,7 @@ function(qt_fixup_and_cleanup)
foreach(_comp IN LISTS COMPONENTS)
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}")
vcpkg_cmake_config_fixup(PACKAGE_NAME "Qt6${_comp}" CONFIG_PATH "share/Qt6${_comp}" TOOLS_PATH "tools/Qt6/bin")
# Would rather put it into share/cmake as before but the import_prefix correction in vcpkg_cmake_config_fixup is working against that.
# Would rather put it into share/cmake as before but the import_prefix correction in vcpkg_cmake_config_fixup is working against that.
else()
message(STATUS "WARNING: Qt component ${_comp} not found/built!")
endif()
Expand All @@ -220,7 +223,7 @@ function(qt_fixup_and_cleanup)
file(GLOB_RECURSE STATIC_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/Qt6Qml/QmlPlugins/*.cmake")
foreach(_plugin_target IN LISTS STATIC_CMAKE_TARGETS)
# restore a single get_filename_component which was remove by vcpkg_cmake_config_fixup
vcpkg_replace_string("${_plugin_target}"
vcpkg_replace_string("${_plugin_target}"
[[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)]]
"get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)")
endforeach()
Expand Down Expand Up @@ -275,7 +278,7 @@ function(qt_fixup_and_cleanup)
file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*")
if(NOT _bin_files STREQUAL "")
message(STATUS "Remaining files in bin: '${_bin_files}'")
else() # Only clean if empty otherwise let vcpkg throw and error.
else() # Only clean if empty otherwise let vcpkg throw and error.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/")
endif()
endif()
Expand All @@ -295,7 +298,7 @@ function(qt_install_submodule)
if(_qis_DISABLE_NINJA)
set(_opt DISABLE_NINJA)
endif()
qt_cmake_configure(${_opt}
qt_cmake_configure(${_opt}
OPTIONS ${_qis_CONFIGURE_OPTIONS}
OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG}
OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE}
Expand Down
2 changes: 1 addition & 1 deletion ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qtbase",
"version": "6.3.2",
"port-version": 2,
"port-version": 3,
"description": "Qt Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6218,7 +6218,7 @@
},
"qtbase": {
"baseline": "6.3.2",
"port-version": 2
"port-version": 3
},
"qtcharts": {
"baseline": "6.3.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtbase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e279c6fed17e9d572a061c482ee73906ffd3e54e",
"version": "6.3.2",
"port-version": 3
},
{
"git-tree": "fdd5dc4e0a94cae2b27acd08ea0c4a7453a6519d",
"version": "6.3.2",
Expand Down