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

Compilation fails with "nightly" feature due to packed-simd dependency #1047

Closed
isislovecruft opened this issue Sep 21, 2020 · 5 comments · Fixed by #1048
Closed

Compilation fails with "nightly" feature due to packed-simd dependency #1047

isislovecruft opened this issue Sep 21, 2020 · 5 comments · Fixed by #1048
Milestone

Comments

@isislovecruft
Copy link

Compiling rand 0.7.3 fails with rustc 1.46.0 (04488afe3 2020-08-24) and later with --features "nightly", due to the packed-simd 0.3.3 dependency failing to build.

error[E0432]: unresolved import `crate::arch::x86_64::__m64`                                                                                                                                                                                   
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/api/into_bits/arch_specific.rs:51:15                                                                                                                    
   |                                                                                                                                                                                                                                           
51 |               $($arch_ty),*                                                                                                                                                                                                               
   |                 ^^^^^^^^ no `__m64` in `arch::x86_64`                                                                                                                                                                                     
...                                                                                                                                                                                                                                            
86 | / impl_arch!(                                                                                                                                                                                                                             
87 | |     [x86["x86"]: __m64], [x86_64["x86_64"]: __m64],                                                                                                                                                                                     
88 | |     [arm["arm"]: int8x8_t, uint8x8_t, poly8x8_t, int16x4_t, uint16x4_t,                                                                                                                                                                 
89 | |      poly16x4_t, int32x2_t, uint32x2_t, float32x2_t, int64x1_t,                                                                                                                                                                         
...  |                                                                                                                                                                                                                                         
96 | |     test: test_v64                                                                                                                                                                                                                      
97 | | );                                                                                                                                                                                                                                      
   | |__- in this macro invocation                                                                                                                                                                                                             
   |                                                                                                                                                                                                                                           
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                     
                                                                                                                                                                                                                                               
error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`                                                                                                                                                                        
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:47:21                                                                                                                
   |                                                                                                                                                                                                                                           
47 |                 use crate::arch::x86_64::_mm_movemask_pi8;                                                                                                                                                                                
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------                                                                                                                                                                                 
   |                     |                    |                                                                                                                                                                                                
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`                                                                                                                                   
   |                     no `_mm_movemask_pi8` in `arch::x86_64`                                                                                                                                                                               
   |                                                                                                                                                                                                                                           
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:41:1                                                                                                                         
   |                                                                                                                                                                                                                                           
41 | impl_mask_reductions!(m8x8);                                                                                                                                                                                                              
   | ---------------------------- in this macro invocation                                                                                                                                                                                     
   |                                                                                                                                                                                                                                           
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                     
                                                                                                                                                                                                                                               
error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`                                                                                                                                                                        
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:62:21                                                                                                                
   |                                                                                                                                                                                                                                           
62 |                 use crate::arch::x86_64::_mm_movemask_pi8;                                                                                                                                                                                
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------                                                                                                                                                                                 
   |                     |                    |                                                                                                                                                                                                
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`                                                                                                                                   
   |                     no `_mm_movemask_pi8` in `arch::x86_64`                                                                                                                                                                               
   |                                                                                                                                                                                                                                           
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:41:1                                                                                                                         
   |
41 | impl_mask_reductions!(m8x8);
   | ---------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:47:21                                                                                                               
   |
47 |                 use crate::arch::x86_64::_mm_movemask_pi8;
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------
   |                     |                    |
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`
   |                     no `_mm_movemask_pi8` in `arch::x86_64`
   |
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:47:1
   |
47 | impl_mask_reductions!(m16x4);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:62:21
   |
62 |                 use crate::arch::x86_64::_mm_movemask_pi8;
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------
   |                     |                    |
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`
   |                     no `_mm_movemask_pi8` in `arch::x86_64`
   |
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:47:1
   |
47 | impl_mask_reductions!(m16x4);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:47:21
   |
47 |                 use crate::arch::x86_64::_mm_movemask_pi8;
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------
   |                     |                    |
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`
   |                     no `_mm_movemask_pi8` in `arch::x86_64`
   |
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:52:1
   |
52 | impl_mask_reductions!(m32x2);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0432]: unresolved import `crate::arch::x86_64::_mm_movemask_pi8`
  --> /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask/x86/sse.rs:62:21
   |
62 |                 use crate::arch::x86_64::_mm_movemask_pi8;
   |                     ^^^^^^^^^^^^^^^^^^^^^----------------
   |                     |                    |
   |                     |                    help: a similar name exists in the module: `_mm_movemask_epi8`
   |                     no `_mm_movemask_pi8` in `arch::x86_64`
   |
  ::: /home/isis/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/codegen/reductions/mask.rs:52:1
   |
52 | impl_mask_reductions!(m32x2);
   | ----------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

It appears that packed-simd has been failing to build on nightlies for a while now. I've worked around this by not forwarding the "nightly" feature in https://github.com/dalek-cryptography/ed25519-dalek to our rand dependency.

@dhardy
Copy link
Member

dhardy commented Sep 22, 2020

Luckily, there's not really any little reason to use nightly. All it does is enable other features which you can depend on directly.

@vks maybe we should remove the nightly feature?

@vks
Copy link
Collaborator

vks commented Sep 22, 2020

@dhardy This is not quite true, we also depend on the nightly feature for implementing TrustedLen and using slice_partition_at_index. These do not have their own features. Furthermore, sometimes nightly is required instead of or in addition to simd_support, but this should be fixed.

I don't think we can do much to avoid breakage like this, it's to be expected when using nightly which lacks the stability guarantees of stable Rust. An option would be to have a feature for each nightly functionality, so breakage can be isolated, but is this worth the complexity?

@vks vks added this to the 0.8 release milestone Sep 22, 2020
@dhardy
Copy link
Member

dhardy commented Sep 22, 2020

Given the complex and unstable state of SIMD support I at least think this should not be implied by nightly.

@vks
Copy link
Collaborator

vks commented Sep 22, 2020

With Rand 0.8, you can consider forwarding the nightly feature again, as it will not longer enable simd_support with the associated stability issues.

@isislovecruft
Copy link
Author

@dhardy @vks Thanks! I think it might be a while before we get to use rand 0.8 since it's part of the underlying curve25519-dalek dependency's public API, so the versions have to match, and to bump it we need to make a breaking change so we're tyring to batch up enough breakage all at once into each major version.

huitseeker pushed a commit to huitseeker/ed25519-dalek that referenced this issue Nov 3, 2020
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 a pull request may close this issue.

3 participants