Comments (10)
Am I looking at the right thing?
Yes. test_ports are ports build in CI to test usage etc.
system-defined places with no mention of QLibraryInfo.
Probably means PATH
then.
That works for me. What are the existing examples?
vcpkg/ports/qtbase/portfile.cmake
Lines 515 to 525 in 37630ac
from vcpkg.
as we would either have to run qdbuscpp2xml to test directly
That was the idea. I mean you already gave an example.
from vcpkg.
Basically, all DLLs needed by a Qt plugin (DBus) needed by Qt tools (qdbuscpp2xml) must be deployed to the tools dir. By the port which installs the plugin.
from vcpkg.
@Neumann-A, don't you think this is caused by https://github.com/microsoft/vcpkg/pull/38682/files#diff-da814fe5d578d93392e698157af490aeb2f7994eecdf94b272356ae97661ddc4L286? How do you think it should be fixed?
For projects that want to use dbus on Windows, and we are probably very few that do, wouldn't it make sense to be able to use dbus=linked? That should be sufficient to pull the dbus-1-3.dll library into the vcpkg_installed\x64-windows\tools\Qt6\bin
, should it not?
from vcpkg.
As an experiment I applied the following patch and that does indeed solve the problem:
diff --git a/ports/qtbase/portfile.cmake b/ports/qtbase/portfile.cmake
index d23ed5fee6..0e77740424 100644
--- a/ports/qtbase/portfile.cmake
+++ b/ports/qtbase/portfile.cmake
@@ -95,10 +95,8 @@ 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)
+if("dbus" IN_LIST FEATURES)
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()
diff --git a/ports/qtbase/vcpkg.json b/ports/qtbase/vcpkg.json
index 87020883b3..2b7c640a2c 100644
--- a/ports/qtbase/vcpkg.json
+++ b/ports/qtbase/vcpkg.json
@@ -126,8 +126,7 @@
"dependencies": [
{
"name": "dbus",
- "default-features": false,
- "platform": "linux"
+ "default-features": false
},
{
"name": "qtbase",
I understand this may not be an acceptable solution, I am just providing this information as confirmation for what works.
from vcpkg.
three Questions:
a) what is qt's default? (since that is what people expect)
b) I feel like the dbus dll could simply be installed by qtbase into the correct folder (there are already a few other dlls which get manually moved)
c) could this be fixed by adjusting qt.conf somehow or is the dll lookup not using qt.conf paths?
and there should definitely be a test port for this use case.
from vcpkg.
three Questions: a) what is qt's default? (since that is what people expect)
Default is dbus=runtime on Windows, I believe.
b) I feel like the dbus dll could simply be installed by qtbase into the correct folder (there are already a few other dlls which get manually moved)
That works for me. What are the existing examples?
c) could this be fixed by adjusting qt.conf somehow or is the dll lookup not using qt.conf paths?
Looks like no. Grepping the Qt source code for QLibraryInfo::LibrariesPath it is not used in the QLibrary code and the documentation also says it looks in system-defined places with no mention of QLibraryInfo.
and there should definitely be a test port for this use case.
I'm not familiar with test ports, but I can see there is a directory vcpkg.git/scripts/test_ports
. If I exclude all the subdirectories that start with vcpkg-
that directory is very lightly populated. Am I looking at the right thing?
from vcpkg.
@Neumann-A, seems straight-forward to add zlib-1-3.dll to that list as it already checks if the files exist before trying to copy them.
Regard the test_ports it looks like most of them just consist of a vcpkg.conf that enable certain features and a portfile with set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
. The test for this would be a little more elaborate as we would either have to run qdbuscpp2xml to test directly or just check for the presence of dbus-1-3.dll in the vcpkg_installed\x64-windows\tools\Qt6\bin
folder. What are your thoughts on this?
from vcpkg.
I tried this simple patch:
diff --git a/ports/qtbase/portfile.cmake b/ports/qtbase/portfile.cmake
index d23ed5fee6..06f15433bc 100644
--- a/ports/qtbase/portfile.cmake
+++ b/ports/qtbase/portfile.cmake
@@ -513,6 +513,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
# dlls owned but not automatically installed by qtbase
# this is required to avoid ownership troubles in downstream qt modules
set(qtbase_owned_dlls
+ dbus-1-3.dll
double-conversion.dll
icudt74.dll
icuin74.dll
and discovered something ugly that I had not realized - the files become part of the built qtbase package. This is nasty for dbus-1-3.dll as the qtbase port doesn't have a dependency on the dbus port so the dbus-1-3.dll will be included and stored in the package in the binary cache if it was present when qtbase was built. In other words the same package hash is used regardless of whether dbus-1-3.dll is included or not.
I believe the consequence is that dbus should be a formal dependency when the dbus feature is enabled. If we do that we may as well use dbus=linked always. Since dbus is very infrequently used on the Windows platform it would make sense to remove dbus from the default feature list on Windows. What do you think?
Is it possible to have different default features on default platforms? Is it a bad idea?
from vcpkg.
I'll vote for keeping it runtime since that is what upstream Qt shipps. However, I would remove it as a default feature on windows and add the dep to the feature without a platform expressions.
from vcpkg.
Related Issues (20)
- [ms-quic] update to v2.3.5
- [ffmpeg] build failed with x264 and x265 HOT 1
- [brotli] Build failure on x64-windows HOT 5
- [wxwidgets] Build failure on x64-windows HOT 2
- [qt] <qt6> HOT 2
- [openssl] build failure on macOS with triplet arm64-ios HOT 1
- [zlib] find_package(zlib) cannot locate correctly installed library files HOT 10
- [dbus] Build error on arm64-linux HOT 2
- [skia] Build error on wasm32-emscripten HOT 1
- [boost-core:x64-linux] build failure HOT 1
- [boost-coroutine] Build error on x64-windows-static HOT 1
- [boost-cobalt] Build error on x64-windows-static HOT 1
- [fontconfig] Build error on x64-windows-release HOT 1
- [zlib] Build error on x64-mingw-dynamic HOT 1
- [dbus] Download failed, gitlab.freedesktop.org is currently under maintenance HOT 3
- sentry-native port requires zlib dependency on windows + problems on linux HOT 6
- [eigen3] Build error on x64-windows HOT 1
- [spdlog] fmt dependency HOT 2
- [boost-variant2] Build error on x64-windows-static HOT 6
- [libimobiledevice] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcpkg.