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

Compiling fails on FreeBSD when the websocket-rustls feature is enabled #335

Closed
yonas opened this issue Feb 18, 2024 · 10 comments
Closed

Compiling fails on FreeBSD when the websocket-rustls feature is enabled #335

yonas opened this issue Feb 18, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@yonas
Copy link

yonas commented Feb 18, 2024

Describe the bug
Following #330 , compiling fails on FreeBSD when the websocket-rustls feature is enabled.

To Reproduce
Steps to reproduce the behavior:

  1. cargo build --release --features rustls,websocket-rustls

Logs

error[E0658]: use of unstable library feature 'stdsimd'                                                                                                                                                              
  --> /code/rathole/work/rathole-4ac53a5/cargo-crates/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:26:5                                                                               
   |                                                                                                                                                                                                                 
26 |     _mm256_madd52lo_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'stdsimd'
  --> /code/rathole/work/rathole-4ac53a5/cargo-crates/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:25:9
   |
25 |     use core::arch::x86_64::_mm256_madd52lo_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'stdsimd'
  --> /code/rathole/work/rathole-4ac53a5/cargo-crates/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:34:5
   |
34 |     _mm256_madd52hi_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'stdsimd'
  --> /code/rathole/work/rathole-4ac53a5/cargo-crates/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:33:9
   |
33 |     use core::arch::x86_64::_mm256_madd52hi_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable

error[E0635]: unknown feature `stdarch_x86_avx512`
  --> /code/rathole/work/rathole-4ac53a5/cargo-crates/curve25519-dalek-4.1.2/src/lib.rs:19:13
   |
19 |     feature(stdarch_x86_avx512)
   |             ^^^^^^^^^^^^^^^^^^

Environment:

  • OS: FreeBSD 14
  • rathole --version output: 4ac53a5
  • CPU architecture: amd64
@yonas yonas added the bug Something isn't working label Feb 18, 2024
@yonas yonas changed the title Yonas Compiling fails on FreeBSD when the websocket-rustls feature is enabled Feb 18, 2024
@rapiz1
Copy link
Owner

rapiz1 commented Feb 18, 2024

it looks pretty like a dependency issue. could you please try the latest rust toolchain and compile after a cargo update? cc @sunmy2019

I honestly have no idea why this is happening given we have tested it on ubuntu

name: Run tests with rustls
        run: cargo test --verbose --no-default-features --features server,client,rustls,noise,websocket-rustls,hot-reload

there's a great chance it's a packaging thing.

@yonas
Copy link
Author

yonas commented Feb 18, 2024

could you please try the latest rust toolchain and compile after a cargo update?

@rapiz1 Thanks, I'm getting the same error after running cargo update.

@rapiz1
Copy link
Owner

rapiz1 commented Feb 18, 2024

Would you mind also sharing your rustc version? @yonas

@sunmy2019
Copy link
Contributor

sunmy2019 commented Feb 18, 2024

Enabling rustls requiring disabling default features. Can you try this?

cargo build --release  --no-default-features --features websocket-rustls

@sunmy2019
Copy link
Contributor

See similar situations in jdx/mise#1630

@yonas
Copy link
Author

yonas commented Feb 18, 2024

Would you mind also sharing your rustc version?

rustc 1.76.0-nightly (37b2813a7 2023-11-24) (built from a source tarball)

Can you try cargo build --release --no-default-features --features websocket-rustls

I'm getting the same errors.

@rapiz1
Copy link
Owner

rapiz1 commented Feb 18, 2024

rustc 1.76.0-nightly (37b2813a7 2023-11-24) (built from a source tarball)

I can build using rustc 1.76.0 (07dca489a 2024-02-04) without issues. You may want to update to the latest stable or nightly.

It's meant to break nightly as per dalek-cryptography/curve25519-dalek#619 (comment) I agree the their argument as well: no point of supporting out of date nightly

@sunmy2019
Copy link
Contributor

sunmy2019 commented Feb 18, 2024

rustc 1.76.0-nightly (37b2813a7 2023-11-24) (built from a source tarball)

One of our dependencies only supports the latest nightly. Others have filed report here: dalek-cryptography/curve25519-dalek#619

Use something other than nightly will be good.

@yonas
Copy link
Author

yonas commented Feb 18, 2024

Upgrading to nightly on linux fixed the issue.

FreeBSD ports doesn't yet have the latest nightly, so I've resorted to pinning curve25519-dalek to v4.1.1.

Use something other than nightly will be good.

I agree, it should be optional. For example, I wonder if rathole's build.rs / Cargo.toml could detect if nightly is being used and then switch the version of curve25519-dalek from =v4.1.1 to >=v4.1.2.

@rapiz1
Copy link
Owner

rapiz1 commented Feb 18, 2024

Glad to hear that it worked for you. That is possible but we will not introduce the maintenance burden for an outdated nightly build. Whenever FreeBSD gets to the latest nightly or stable of rustc, it will work seamlessly. The build should never fail on stable toolchain. Once you opt in for nightly, you're mostly responsible for resolving dependencies on your own because there's no compatibility promise for nightly. I will strongly suggest you use stable toolchain to compile rathole, if you don't have special needs.

@rapiz1 rapiz1 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants