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

[Linux] Offline build is failing, failure in name resolution #37

Closed
tinywrkb opened this issue Mar 14, 2021 · 6 comments
Closed

[Linux] Offline build is failing, failure in name resolution #37

tinywrkb opened this issue Mar 14, 2021 · 6 comments

Comments

@tinywrkb
Copy link

I'm updating the qutebrowser Flatpak packaging and enabling python-adblock support.
I need to compile from source as there's no aarch64 binary release.
Flathub forbid network access during build-time so we build in offline mode.

Offline build is failing with

   Compiling rmp-serde v0.13.7
    error: proc-macro derive panicked
 --> /run/build/python3-adblock/cargo/vendor/psl-0.4.1/src/list.rs:6:10
  |
6 | #[derive(Psl, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default)]
  |          ^^^
  |
  = help: message: failed to download the list: failed to lookup address information: Temporary failure in name resolution


error[E0599]: no method named `domain` found for struct `List` in the current scope
  --> /run/build/python3-adblock/cargo/vendor/psl-0.4.1/src/list.rs:28:20
   |
7  | pub struct List;
   | ---------------- method `domain` not found for this
...
28 |         match List.domain(input) {
   |                    ^^^^^^ method not found in `List`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `Psl` defines an item `domain`, perhaps you need to implement it
  --> /run/build/python3-adblock/cargo/vendor/psl-0.4.1/src/lib.rs:48:1
   |
48 | pub trait Psl {
   | ^^^^^^^^^^^^^


error[E0599]: no method named `suffix` found for struct `List` in the current scope
  --> /run/build/python3-adblock/cargo/vendor/psl-0.4.1/src/list.rs:51:20
   |
7  | pub struct List;
   | ---------------- method `suffix` not found for this
...
51 |         match List.suffix(input) {
   |                    ^^^^^^ method not found in `List`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `Psl` defines an item `suffix`, perhaps you need to implement it
  --> /run/build/python3-adblock/cargo/vendor/psl-0.4.1/src/lib.rs:48:1
   |
48 | pub trait Psl {
   | ^^^^^^^^^^^^^


error: aborting due to 3 previous errors


For more information about this error, try `rustc --explain E0599`.rde

error: could not compile `psl`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit code: 101": `cargo rustc --message-format json --manifest-path Cargo.toml --offline --release --lib -- -C link-arg=-s`
Error: module python3-adblock: Child process exited with code 1

Is there anything useful that can help pinpoint the source of this issue? I can try generating a more detailed debug log if needed.

The packaging is in my adblock branch here, and specifically the python-adblock build commands are here.

p.s. It would be nice if binary releases for Linux aarch64 would be available.

@ArniDagur
Copy link
Owner

Thanks for pointing this out in an issue. This has been a pain for other (actual and potential) packagers of python-adblock. The problem is that one of our transitive dependencies tries to fetch the public suffix list from the network. I think this may have been fixed in a recent version of addr. I'm in the process of updating now.

Regarding ARM packaging, I agree. Especially given the new Macs. See #11.

@tinywrkb
Copy link
Author

@ArniDagur thanks for the reply. Let me know if testing is needed.

@rushmorem
Copy link

Yes, the recent versions of the psl crate no longer try to download the list at build time. Once you successfully update adblock-rust, this will go away.

@ArniDagur
Copy link
Owner

Hopefully the problem should be fixed now. If it's not, feel free to reopen this issue or create a new one.

@tinywrkb
Copy link
Author

Thanks, I can confirm that it's now building correctly for me without network.

@tinywrkb
Copy link
Author

p.s. I can successfully build now for aarch64.

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

No branches or pull requests

3 participants