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

[qtbase] Fix a few details #38682

Merged
merged 34 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
79d08e4
Remove pulgin deployment into tools. Using qt.conf will work
Neumann-A May 10, 2024
4bec3d8
fix Cups casing
Neumann-A May 10, 2024
7aced28
bump port version
Neumann-A May 10, 2024
03215ea
v db
Neumann-A May 10, 2024
f54f0d3
make osx work
Neumann-A May 10, 2024
1918363
v db
Neumann-A May 10, 2024
2bdb1a0
remove duplicated options
Neumann-A May 11, 2024
eaff4f8
add cppwinrt as a dependency
Neumann-A May 11, 2024
9547c97
v db
Neumann-A May 11, 2024
2fb1516
remove cppwinrt dependency
Neumann-A May 13, 2024
bba4ed2
control dbus linkage on linux
Neumann-A May 13, 2024
ae08c1b
remove trailing ,
Neumann-A May 13, 2024
e7f2104
v db
Neumann-A May 13, 2024
18206b3
fix qtdeclarative now depending on qtsvg
Neumann-A May 14, 2024
750199e
dbus only for linux
Neumann-A May 14, 2024
d6f01eb
political correctness wording
Neumann-A May 14, 2024
86334f0
Add cups as a default feature
Neumann-A May 14, 2024
7d59d59
v db
Neumann-A May 14, 2024
2d20cd8
fix missing keyword
Neumann-A May 14, 2024
9aacc92
v db
Neumann-A May 14, 2024
0c0550a
move qtwebengine rescources to location expected by qt.conf
Neumann-A May 14, 2024
f9474a4
v db
Neumann-A May 14, 2024
9d7aa2f
fix logic
Neumann-A May 14, 2024
4417ebb
disable cups as a default feature on linux (CI does not have it insta…
Neumann-A May 14, 2024
3593ba3
v db
Neumann-A May 14, 2024
210b592
Fix typo
Neumann-A May 15, 2024
598db88
v db
Neumann-A May 15, 2024
043da0a
Merge remote-tracking branch 'upstream/master' into fix_qt_details
Neumann-A May 21, 2024
826de0f
Merge branch 'microsoft:master' into fix_qt_details
Neumann-A May 22, 2024
1d94895
Merge branch 'fix_qt_details' of https://github.com/Neumann-A/vcpkg i…
Neumann-A May 25, 2024
0700012
Merge remote-tracking branch 'upstream/master' into fix_qt_details
Neumann-A May 25, 2024
51332d3
bump port version after merge
Neumann-A May 25, 2024
74d32cf
add patch to fix deployment script on windows
Neumann-A May 25, 2024
8847482
v db
Neumann-A May 25, 2024
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
5 changes: 1 addition & 4 deletions ports/qtbase/cmake/qt_install_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function(qt_cmake_configure)
${disable_parallel}
OPTIONS
-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to screw with users toolchain settings.
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to mess with users toolchain settings.
Copy link
Member

Choose a reason for hiding this comment

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

interfere

Suggested change
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to mess with users toolchain settings.
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to interfere with users toolchain settings.

Copy link
Member

Choose a reason for hiding this comment

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

On second thought, let's change this the next time, no point blocking over this and triggering a new run.

-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Because Qt doesn't correctly scope find_package calls.
#-DQT_HOST_PATH=<somepath> # For crosscompiling
#-DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc
Expand Down Expand Up @@ -282,9 +282,6 @@ function(qt_fixup_and_cleanup)
if(_qarg_TOOL_NAMES)
set(tool_names ${_qarg_TOOL_NAMES})
vcpkg_copy_tools(TOOL_NAMES ${tool_names} SEARCH_DIR "${qt_searchdir}" DESTINATION "${qt_tooldest}" AUTO_CLEAN)
if(EXISTS "${CURRENT_PACKAGES_DIR}/${qt_plugindir}" AND NOT PORT STREQUAL "qtdeclarative") #qmllint conflict
file(COPY "${CURRENT_PACKAGES_DIR}/${qt_plugindir}/" DESTINATION "${qt_tooldest}")
endif()
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
endif()

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Expand Down
20 changes: 15 additions & 5 deletions ports/qtbase/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ INVERTED_FEATURES
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libudev:BOOL=ON)
list(APPEND FEATURE_OPTIONS -DFEATURE_xml:BOOL=ON)

if("dbus" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX)
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=linked)
elseif("dbus" IN_LIST FEATURES)
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=runtime)
else()
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=no)
endif()

if(VCPKG_QT_NAMESPACE)
list(APPEND FEATURE_OPTIONS "-DQT_NAMESPACE:STRING=${VCPKG_QT_NAMESPACE}")
endif()
Expand Down Expand Up @@ -121,8 +129,6 @@ list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd:BOOL=ON
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapBacktrace:BOOL=ON)
#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapAtomic:BOOL=ON) # Cannot be disabled on x64 platforms
#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt:BOOL=ON) # Cannot be disabled on osx
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_PPS:BOOL=ON)
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Slog2:BOOL=ON)

# Network features:
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_NET_OPTIONS
Expand Down Expand Up @@ -255,9 +261,13 @@ foreach(_db IN LISTS DB_LIST)
endforeach()

# printsupport features:
# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS
# )
list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_CUPS:BOOL=ON)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS
FEATURES
"cups" FEATURE_cups
INVERTED_FEATURES
"cups" CMAKE_DISABLE_FIND_PACKAGE_Cups
)


vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_WIDGETS_OPTIONS
FEATURES
Expand Down
14 changes: 14 additions & 0 deletions ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtbase",
"version": "6.7.0",
"port-version": 1,
"description": "Qt Base (Core, Gui, Widgets, Network, ...)",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down Expand Up @@ -52,6 +53,10 @@
"default-features": [
"brotli",
"concurrent",
{
"name": "cups",
"platform": "osx"
},
"dbus",
"default-features",
"doubleconversion",
Expand Down Expand Up @@ -112,9 +117,18 @@
}
]
},
"cups": {
"description": "Provides support for the Common Unix Printing System.",
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correctly this means the application will be linked with the system provided version of cups, as there is no cups port in vcpkg.git. In Qt 5 I believe cups is only linked into plugins/printsupport/libcupsprintersupport.so and it is probably the same in Qt 6. However, when libcupsprintersupport.so is loaded into the process it brings with it a bunch of shared libraries.

On RHEL 9.4 the distribution provided libcups.so pulls in an unpleasant amount of shared libraries:

# ldd /usr/lib64/libcups.so.2
        linux-vdso.so.1 (0x00007fffb9be8000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fdef2c71000)
        libavahi-common.so.3 => /lib64/libavahi-common.so.3 (0x00007fdef2c63000)
        libavahi-client.so.3 => /lib64/libavahi-client.so.3 (0x00007fdef2c4e000)
        libgnutls.so.30 => /lib64/libgnutls.so.30 (0x00007fdef2a18000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fdef29fe000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fdef2923000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fdef2718000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fdef263d000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fdef2624000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fdef261d000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fdef260c000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fdef2605000)
        libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007fdef21d0000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fdef21bc000)
        libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007fdef2169000)
        libp11-kit.so.0 => /lib64/libp11-kit.so.0 (0x00007fdef1fd2000)
        libidn2.so.0 => /lib64/libidn2.so.0 (0x00007fdef1fb1000)
        libunistring.so.2 => /lib64/libunistring.so.2 (0x00007fdef1e2c000)
        libtasn1.so.6 => /lib64/libtasn1.so.6 (0x00007fdef1e12000)
        libnettle.so.8 => /lib64/libnettle.so.8 (0x00007fdef1dbb000)
        libhogweed.so.6 => /lib64/libhogweed.so.6 (0x00007fdef1d23000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdef2d73000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fdef1cf6000)
        libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fdef1c19000)
        libffi.so.8 => /lib64/libffi.so.8 (0x00007fdef1c0b000)
        libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fdef1b6f000)
        libcap.so.2 => /lib64/libcap.so.2 (0x00007fdef1b65000)
        libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007fdef1a2c000)
        liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fdef1a00000)
        libzstd.so.1 => /lib64/libzstd.so.1 (0x00007fdef1929000)
        liblz4.so.1 => /lib64/liblz4.so.1 (0x00007fdef1903000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fdef18e8000)
        libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007fdef18c2000)

So a Qt application that dynamically loads the libcups.so.2 plugin will have two versions loaded of several of these libraries - one version from the system and one version from vcpkg. That sounds concerning to me.

"supports": "linux | osx"
},
"dbus": {
"description": "Qt D-Bus",
"dependencies": [
{
"name": "dbus",
"default-features": false,
"platform": "linux"
},
{
"name": "qtbase",
"default-features": false,
Expand Down
1 change: 1 addition & 0 deletions ports/qtdeclarative/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set(${PORT}_PATCHES
qmltc
qmlls
qmljsrootgen
svgtoqml
)

qt_install_submodule(PATCHES ${${PORT}_PATCHES}
Expand Down
4 changes: 3 additions & 1 deletion ports/qtdeclarative/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtdeclarative",
"version": "6.7.0",
"port-version": 1,
"description": "Qt Declarative (Quick 2)",
"homepage": "https://www.qt.io/",
"license": null,
Expand All @@ -22,6 +23,7 @@
{
"name": "qtshadertools",
"default-features": false
}
},
"qtsvg"
]
}
2 changes: 2 additions & 0 deletions ports/qtwebengine/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_BUILD_TYPE)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/QtWebEngineProcessd.pdb" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/debug/QtWebEngineProcessd.pdb")
endif()

file(RENAME "${CURRENT_PACKAGES_DIR}/resources" "${CURRENT_PACKAGES_DIR}/share/Qt6/resources") # qt.conf wants it there and otherwise the QtWebEngineProcess cannot start

qt_install_copyright("${SOURCE_PATH}")

##### qt_install_submodule
1 change: 1 addition & 0 deletions ports/qtwebengine/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$comment": "x86-windows is not within the upstream support matrix of Qt6",
"name": "qtwebengine",
"version": "6.7.0",
"port-version": 1,
"description": "Qt WebEngine provides functionality for rendering regions of dynamic web content.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7318,7 +7318,7 @@
},
"qtbase": {
"baseline": "6.7.0",
"port-version": 0
"port-version": 1
},
"qtcharts": {
"baseline": "6.7.0",
Expand All @@ -7338,7 +7338,7 @@
},
"qtdeclarative": {
"baseline": "6.7.0",
"port-version": 0
"port-version": 1
},
"qtdeviceutilities": {
"baseline": "6.7.0",
Expand Down Expand Up @@ -7482,7 +7482,7 @@
},
"qtwebengine": {
"baseline": "6.7.0",
"port-version": 0
"port-version": 1
},
"qtwebsockets": {
"baseline": "6.7.0",
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": "4e0d88e660589ab993d4ca52e36632f2bcb5061e",
"version": "6.7.0",
"port-version": 1
},
{
"git-tree": "2143fc719b61ad45e2f017348969a393b243e1d7",
"version": "6.7.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtdeclarative.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8e424ab10dbe84d19523259d630a09d23ab0c623",
"version": "6.7.0",
"port-version": 1
},
{
"git-tree": "c7735c31022b2d41f5e0af9e727fc73cd4146a52",
"version": "6.7.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtwebengine.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b61e58b440a17281f3379b920b593765599f4f3f",
"version": "6.7.0",
"port-version": 1
},
{
"git-tree": "100603c883257132007e43ace417903c75e99d94",
"version": "6.7.0",
Expand Down