-
Notifications
You must be signed in to change notification settings - Fork 46
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
Compile fails with target_cpu on GitHub Actions for OSX - illegal instruction #162
Comments
I have just switched typenum to use Github actions. Could you share your setup so I can try to reproduce? |
same here with both 1.12.0 and 1.13.0 details from
|
Sorry, my case has solved itself. It probably comes up a lot with rust n00bs like me. |
Follow-up question ! Is it expected to receive Thanks ! |
@NotSqrt I certainly wouldn't expect it. Typenum doesn't do anything cpu-specific, it just does a lot of type shenanigans. I would guess that your issue lies elsewhere, but if you have a clear repro I'd be happy to take a look. |
Here is an excerpt of the build log, with
Running
This is with |
|
Interesting. The line that points to is just doing some very simple math: Line 83 in c4e2d5c
|
Found the issue ! With this simple hello_wolrd: fn main() {
let highest: u64 = 1024;
let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
println!("{}", first2);
}
The issue is the (files generated with
So potentially, using |
Progress !! but new panic when I add this to my cargo.toml.
(Sorry, I had another panic, but it simply was |
Actual error:
|
And at
|
I also have this problem. I'm trying to build docker container for AWS with AVX512, but my host CPU doesn't have AVX512. Tried using Intel® Software Development Emulator but Docker just ignoring it. |
I'm still a little puzzled by the fact that it's possible to cross-compile entire projects between platforms (eg. from x86 to arm), but it seems much harder to compile for a |
Update: I'm an idiot (and the documentation is shit)If you run (See https://users.rust-lang.org/t/different-rustflags-for-build-rs-and-main-rs/67080) Part 1I have a similar problem on my sandybridge:
Everything works fine without the Any workaround except for removing the Part 2
If I put the code above in main.rs:The code above builds fine, even on my sandybridge with If I put the code above in my build.rsBuilding fails if I add the |
Why? |
Same issue happens to me when cross-compiling to intel with As it's mentioned in the issue setting |
My hope is that this is fixed in typenum 1.15. Please re-open the issue if it persists. |
Version 0.15.0 fixes an issue where code that runs at build-time would be compiled with the target_cpu setting, and the target CPU might support instructions that the host system does not have, causing a SIGILL during the build. See also [1] and [2]. [1]: paholg/typenum#162 [2]: paholg/typenum#177
Version 1.15.0 fixes an issue where code that runs at build-time would be compiled with the target_cpu setting, and the target CPU might support instructions that the host system does not have, causing a SIGILL during the build. See also [1] and [2]. [1]: paholg/typenum#162 [2]: paholg/typenum#177
Bump typenum from 1.14.0 to 1.15.0 Version 1.15.0 fixes an issue where code that runs at build-time would be compiled with the target_cpu setting, and the target CPU might support instructions that the host system does not have, causing a SIGILL during the build. See also [1] and [2]. [1]: paholg/typenum#162 [2]: paholg/typenum#177
Version 1.15.0 fixes an issue where code that runs at build-time would be compiled with the target_cpu setting, and the target CPU might support instructions that the host system does not have, causing a SIGILL during the build. See also [1] and [2]. [1]: paholg/typenum#162 [2]: paholg/typenum#177
When compiling a project using GitHub Actions for OSX and targeting a CPU other than
native
, the compile fails withSame project works locally fine for OSX and GitHub Action build for Ubuntu and Windows.
Investigation shows that GHA OSX is using
ivybridge
hardware, where I haveskylake
and GHA Ubuntu and Windows hardware is been reported asskylake-avx512
The text was updated successfully, but these errors were encountered: