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

Build Rust stuff offline #593

Merged
merged 5 commits into from
Sep 16, 2023
Merged

Build Rust stuff offline #593

merged 5 commits into from
Sep 16, 2023

Conversation

Hofer-Julian
Copy link
Contributor

@Hofer-Julian Hofer-Julian commented Sep 14, 2023

Fixes #591

cargo-c works fine, but gst-plugin-gtk4 does not
See https://github.com/flathub/io.gitlab.daikhan.stable for existing manifest
See https://github.com/flatpak/flatpak-builder-tools/tree/master/cargo for tool to generate cargo sources

cargo-c works fine, but gst-plugin-gtk4 does not
See https://github.com/flathub/io.gitlab.daikhan.stable for existing manifest
@Hofer-Julian
Copy link
Contributor Author

I will give up on that, 2h was my personal limit I wanted to spend on it.
If someone else is interested, feel free to pick it up from where I stopped :)

@sonnyp
Copy link
Contributor

sonnyp commented Sep 15, 2023

Running: cargo cinstall --offline --release --features=wayland,x11glx,x11egl --library-type=cdylib --prefix=/app
Error: CliError { error: Some(no matching package named gdk4-x11 found
location searched: registry crates-io
required by package gst-plugin-gtk4 v0.11.0 (/run/build/gst-plugins-rs)
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.), exit_code: 101 }
Error: module gst-plugins-rs: Child process exited with code 1

Error: Child process exited with code 1

> Make sure to override CARGO_HOME env variable to point it to /run/build/$module-name/cargo where $module-name is the flatpak module name, quickstart in this example.

https://github.com/flatpak/flatpak-builder-tools/tree/de56f4702638739f930f4afa648686f12ac4d724/cargo
@sonnyp
Copy link
Contributor

sonnyp commented Sep 16, 2023

I'll rename ours to gst-plugin-gtk4 too - do some cleanup and merge if you don't mind

Good idea.

Two things that come to mind:

I've used the cargo-c that was used in the manifest, because I thought that might be the reason for the error, might be good to switch to the last release instead and add x-checker
same for gst-plugin-gtk4

The cargo lock file can be created by checking out the tag locally and running cargo update

@sonnyp sonnyp marked this pull request as ready for review September 16, 2023 15:44
@sonnyp sonnyp self-requested a review as a code owner September 16, 2023 15:44
@sonnyp sonnyp changed the title Attempt to build Rust stuff offline Build Rust stuff offline Sep 16, 2023
Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

I upgraded cargo-c to the latest release.
I didn't setup x-checker-data because I don't like auto-updates, specially without tests.

We can consider later.

@sonnyp sonnyp merged commit 0b83072 into main Sep 16, 2023
1 check passed
@sonnyp sonnyp deleted the cargo-offline branch September 16, 2023 15:48
sonnyp added a commit that referenced this pull request Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not request network at build time
2 participants