-
Notifications
You must be signed in to change notification settings - Fork 90
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
Disable WebEngine example on Windows + MinGW #167
Labels
A-cross
Area: Cross compilation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
O-windows-gnu
Toolchain: GNU, Operating system: Windows
Comments
If I may, the same fix would be awesome for Qt >= 6.0.0, and that holds so far with 6.2.0 alpha ;-)
… On 3 Jul 2021, at 19:44, ratijas ***@***.***> wrote:
Summary
Qt does not ship pre-built WebEngine component for Windows MinGW target, so we should find a way to exclude it from the list of default targets on that platform's target triple.
Description
Running simple cargo build in qmetaobject-rs repository on Windows with MinGW environment results in build failure:
Compiling qmetaobject v0.2.2 (C:\Users\ratijas\projects\qmetaobject-rs\qmetaobject)
Compiling graph v0.1.0 (C:\Users\ratijas\projects\qmetaobject-rs\examples\graph)
The following warnings were emitted during compilation:
warning: src\webengine.rs:4:10: fatal error: QtWebEngine/QtWebEngine: No such file or directory
warning: #include <QtWebEngine/QtWebEngine>
warning: ^~~~~~~~~~~~~~~~~~~~~~~~~
warning: compilation terminated.
error: failed to run custom build command for `qmetaobject v0.2.2 (C:\Users\ratijas\projects\qmetaobject-rs\qmetaobject)`
Caused by:
process didn't exit successfully: `C:\Users\ratijas\projects\qmetaobject-rs\target\debug\build\qmetaobject-4c86368b25d7a0a5\build-script-build` (exit code: 1)
--- stdout
TARGET = Some("i686-pc-windows-gnu")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-pc-windows-gnu")
[...]
running: "g++.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m32" "-I" "C:\\Users\\ratijas\\projects\\qmetaobject-rs\\qmetaobject" "-I" "C:/Qt/5.15.2/mingw81_32/include" "-Wall" "-Wextra" "-std=c++11" "-o" "C:\\Users\\ratijas\\projects\\qmetaobject-rs\\target\\i686-pc-windows-gnu\\debug\\build\\qmetaobject-54d9dbd8cb0dbb47\\out\\rust_cpp\\cpp_closures.o" "-c" "C:\\Users\\ratijas\\projects\\qmetaobject-rs\\target\\i686-pc-windows-gnu\\debug\\build\\qmetaobject-54d9dbd8cb0dbb47\\out\\rust_cpp\\cpp_closures.cpp"
cargo:warning=src\webengine.rs:4:10: fatal error: QtWebEngine/QtWebEngine: No such file or directory
cargo:warning= #include <QtWebEngine/QtWebEngine>
cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=compilation terminated.
exit code: 1
Workaround
Manually specify packages to exclude from workspace builds:
cargo build --workspace --exclude webengine
Solution
I don't think politely asking Qt to ship pre-built WebEngine for MinGW is a viable solution, so let's try to mitigate the issue with Rust tools.
Cargo supports workspace-level package selection via default-members key. Cons:
Disables package for all platforms and targets;
Requires typing in every package twice, except excluded ones. You might think that there's an exclude key for this task, but turns out it's for something else — preventing directories entirely from even being scanned by cargo.
Anyway, I tried with Cargo.toml and .cargo/config.toml, and none of that works with triple-specific sections.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
ratijas
added a commit
to ratijas/qmetaobject-rs
that referenced
this issue
Jul 10, 2021
This is getting ridiculous. Fixes woboq#167
ratijas
added a commit
to ratijas/qmetaobject-rs
that referenced
this issue
Jul 10, 2021
This is getting ridiculous. Fixes woboq#167
ratijas
added a commit
to ratijas/qmetaobject-rs
that referenced
this issue
Jul 10, 2021
This is getting ridiculous. Fixes woboq#167
ratijas
added a commit
to ratijas/qmetaobject-rs
that referenced
this issue
Jul 13, 2021
This is getting ridiculous. Fixes woboq#167
ratijas
added a commit
to ratijas/qmetaobject-rs
that referenced
this issue
Jul 13, 2021
This is getting ridiculous. Fixes woboq#167
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cross
Area: Cross compilation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
O-windows-gnu
Toolchain: GNU, Operating system: Windows
Summary
Qt does not ship pre-built WebEngine component for Windows MinGW target, so we should find a way to exclude it from the list of default targets on that platform's target triple.
Description
Running simple
cargo build
in qmetaobject-rs repository on Windows with MinGW environment results in build failure:Workaround
Manually specify packages to exclude from workspace builds:
Solution
I don't think politely asking Qt to ship pre-built WebEngine for MinGW is a viable solution, so let's try to mitigate the issue with Rust tools.
Cargo supports workspace-level package selection via
default-members
key. Cons:exclude
key for this task, but turns out it's for something else — preventing directories entirely from even being scanned by cargo.Anyway, I tried with Cargo.toml and .cargo/config.toml, and none of that works with triple-specific sections.
The text was updated successfully, but these errors were encountered: