-
Notifications
You must be signed in to change notification settings - Fork 599
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
Make it easy to create Rust binaries with rpath set to Qt #566
Labels
a:backend-qt
The Qt backend - including the qt style (mO,bS)
a:platform-linux
issue specific to Linux, X11 or wayland (mO,bT)
a:platform-macos
Issues specific to macOS (mS,bF)
bug
Something isn't working
packaging
Packaging and ease of downloading/obtaining Slint
priority:low
Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
Comments
tronical
added
bug
Something isn't working
a:platform-linux
issue specific to Linux, X11 or wayland (mO,bT)
a:platform-macos
Issues specific to macOS (mS,bF)
labels
Oct 12, 2021
In the short term, we should document that. At least in https://github.com/sixtyfpsui/sixtyfps/blob/master/docs/install_qt.md We could make the sixtyfps-backend-qt to also write a rpath somewhere in a file (like we do for |
tronical
added a commit
that referenced
this issue
Oct 13, 2021
tronical
added a commit
that referenced
this issue
Jan 4, 2022
For C++ apps we apply rpath to the cdylib implicitly via qttypes, but link flags for rust binaries are not transitively propagated but require explicit opt-in by the top-level crate. However we want that convenience, to avoid Rust apps having to deal with Qt backend specific code in their build.rs. Therefore we use the _DEP mechanism to get the qt library path from the qttypes crate and write it into a generic file in the qt backend's build.rs, which is then picked up by sixtyfps-build. We'll use the same mechanism to propagate link flags for the MCU build (such as the linker script). cc #566
tronical
added a commit
that referenced
this issue
Jan 5, 2022
For C++ apps we apply rpath to the cdylib implicitly via qttypes, but link flags for rust binaries are not transitively propagated but require explicit opt-in by the top-level crate. However we want that convenience, to avoid Rust apps having to deal with Qt backend specific code in their build.rs. Therefore we use the _DEP mechanism to get the qt library path from the qttypes crate, forward it to the default backend crate and write it into a generic file in the qt backend's build.rs, which is then picked up by sixtyfps-build. In the future, we'll use the same mechanism to propagate link flags for the MCU build (such as the linker script). cc #566
tronical
added a commit
that referenced
this issue
Jan 5, 2022
For C++ apps we apply rpath to the cdylib implicitly via qttypes, but link flags for rust binaries are not transitively propagated but require explicit opt-in by the top-level crate. However we want that convenience, to avoid Rust apps having to deal with Qt backend specific code in their build.rs. Therefore we use the _DEP mechanism to get the qt library path from the qttypes crate, forward it to the default backend crate and write it into a generic file in the qt backend's build.rs, which is then picked up by sixtyfps-build. In the future, we'll use the same mechanism to propagate link flags for the MCU build (such as the linker script). cc #566
tronical
added a commit
that referenced
this issue
Jan 5, 2022
For C++ apps we apply rpath to the cdylib implicitly via qttypes, but link flags for rust binaries are not transitively propagated but require explicit opt-in by the top-level crate. However we want that convenience, to avoid Rust apps having to deal with Qt backend specific code in their build.rs. Therefore we use the _DEP mechanism to get the qt library path from the qttypes crate, forward it to the default backend crate and write it into a generic file in the qt backend's build.rs, which is then picked up by sixtyfps-build. In the future, we'll use the same mechanism to propagate link flags and extend the linker serach path for the MCU build (such as the linker script). cc #566
ogoffart
added
a:backend-qt
The Qt backend - including the qt style (mO,bS)
packaging
Packaging and ease of downloading/obtaining Slint
labels
Oct 26, 2022
ogoffart
added
the
priority:low
Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
label
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a:backend-qt
The Qt backend - including the qt style (mO,bS)
a:platform-linux
issue specific to Linux, X11 or wayland (mO,bT)
a:platform-macos
Issues specific to macOS (mS,bF)
bug
Something isn't working
packaging
Packaging and ease of downloading/obtaining Slint
priority:low
Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
This originated from #565
Originally posted by jamesblacklock October 12, 2021
I'm getting the following error when I do a
cargo run
(seems to be just therun
;build
works fine):Has anyone seen this error or have any familiarity with getting the sixtyfps qt backend working on macos?
When creating a rust binary with cargo and sixtyfps found Qt available for use, we may want to code the
rpath
to the Qt library/frameworks on Linux and macOS.The path is initially determined in qttypes's
build.rs
and printed viaUnfortunately this has two problems:
rustc-cdylib-link-arg
transitive warning rust-lang/cargo#9562However that cargo issue also suggests a solution that we could implement, which is two fold:
rustc-link-arg
to show up in a stable release of rust/cargo.build.rs
that will emit the correctrustc-link-arg=-Wl,rpath,...
text to stdout. This could be done automatically bysixtyfps_build::compile()
but perhaps there's also a way to offering either a function forbuild.rs
for apps using the macro or the macro could somehow emit#[link_arg(...)]
.The text was updated successfully, but these errors were encountered: