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

issues compiling for tvOS #671

Open
EbrahimTahernejad opened this issue Jan 14, 2025 · 1 comment
Open

issues compiling for tvOS #671

EbrahimTahernejad opened this issue Jan 14, 2025 · 1 comment

Comments

@EbrahimTahernejad
Copy link
Contributor

EbrahimTahernejad commented Jan 14, 2025

Hello, I've been trying to compile this code for tvos as well, well, first I added tvos to cfg rules of iOS, and then I upgraded quinn and quinn-proto to latest versions (latest version supports visionOS and tvOS):

not I'm having issues with this while compiling:

error[E0599]: no function or associated item named `new_with_session_id_generator` found for struct `rustls::ClientConnection` in the current scope
   --> /Users/ebi/.cargo/git/checkouts/tokio-rustls-865aaf7c68e4558e/6b9af8a/src/lib.rs:129:51
    |
129 | ...lientConnection::new_with_session_id_generator(
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ClientConnection`
    |
note: if you're trying to build a new `rustls::ClientConnection`, consider using `rustls::ClientConnection::new` which returns `Result<rustls::ClientConnection, rustls::Error>`
   --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.21/src/client/client_conn.rs:689:9
    |
689 | ...   pub fn new(config: Arc<ClientConfig>, name: ServerName<'static>) -> Result<Self, Error...
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Compiling p384 v0.13.0
error[E0107]: struct takes 3 generic arguments but 2 generic arguments were supplied
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-0.4.13/src/ready_cache/cache.rs:65:25
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx>,
   |                         ^^^^^^^^ -  -------- supplied 2 generic arguments
   |                         |
   |                         expected 3 generic arguments
   |
note: struct defined here, with 3 generic parameters: `K`, `V`, `S`
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indexmap-1.9.3/src/map.rs:76:12
   |
76 | pub struct IndexMap<K, V, S> {
   |            ^^^^^^^^ -  -  -
help: add missing generic argument
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx, S>,
   |                                             +++

error[E0107]: struct takes 3 generic arguments but 2 generic arguments were supplied
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-0.4.13/src/ready_cache/cache.rs:73:12
   |
73 |     ready: IndexMap<K, (S, CancelPair)>,
   |            ^^^^^^^^ -  --------------- supplied 2 generic arguments
   |            |
   |            expected 3 generic arguments
   |
note: struct defined here, with 3 generic parameters: `K`, `V`, `S`
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indexmap-1.9.3/src/map.rs:76:12
   |
76 | pub struct IndexMap<K, V, S> {
   |            ^^^^^^^^ -  -  -
help: add missing generic argument
   |
73 |     ready: IndexMap<K, (S, CancelPair), S>,
   |                                       +++

For more information about this error, try `rustc --explain E0599`.
error: could not compile `tokio-rustls` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
For more information about this error, try `rustc --explain E0107`.
error: could not compile `tower` (lib) due to 2 previous errors

Then I saw you're replacing rustls with an older version as you've made adjustments to it for utls.
I'm kinda new to rust so I'd appriciate some help regarding making this compilable for tvOS

PATCHED:

nix = { git = "https://github.com/nix-rust/nix.git", rev = "52f43802c94867ae884a418dd4800855b5898d58" 

Replaced:

quinn = { version = "0.11.6", default-features = false, features = ["futures-io", "runtime-tokio", "rustls"] }
quinn-proto = "0.11.9"
@EbrahimTahernejad EbrahimTahernejad changed the title tvOS issues compiling for tvOS Jan 14, 2025
@ibigbug
Copy link
Member

ibigbug commented Jan 19, 2025

Had a Quick check and our forked rustls version isn't that old. Might be something else.

Will take a look again when I get back access to my comouter.

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

2 participants