rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
732 stars 135 forks source link

Target asmjs-unknown-emscripten fails to compile #141

Closed mashedcode closed 5 years ago

mashedcode commented 5 years ago
   Compiling num-integer v0.1.41 (num-integer)
warning: `#[inline]` is ignored on function prototypes
   --> src/lib.rs:260:5
    |
260 |     #[inline]
    |     ^^^^^^^^^
    |
    = note: `#[warn(unused_attributes)]` on by default

Referencing function in another module!
  call void <badref>(i8* %40), !dbg !51
; ModuleID = 'r5a5ydnla8md0lz'
void (i8*)* <badref>
; ModuleID = '
error: could not compile `num-integer`.

Caused by:
  process didn't exit successfully: `rustc --crate-name num_integer src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=f504e2cc341ea776 -C extra-filename=-f504e2cc341ea776 --out-dir num-integer/target/asmjs-unknown-emscripten/debug/deps --target asmjs-unknown-emscripten -C incremental=num-integer/target/asmjs-unknown-emscripten/debug/incremental -L dependency=num-integer/target/asmjs-unknown-emscripten/debug/deps -L dependency=num-integer/target/debug/deps --extern num_traits=num-integer/target/asmjs-unknown-emscripten/debug/deps/libnum_traits-f59bfd1ff0bed9bd.rmeta --cfg has_i128` (signal: 11, SIGSEGV: invalid memory reference)
CryZe commented 5 years ago

Which rustc version is this? I've been getting stuff like this lately too, so I've completely disabled the asmjs builds for my crate.

cuviper commented 5 years ago

The error is on num-integer, not num-traits, but anyway it should not be possible for any crate code to cause a compiler crash. Please file a bug on rust-lang/rust itself!

mashedcode commented 5 years ago

Sorry for mistakenly creating the issue on this crate. This crate compiles fine.

@cuviper But it only happens for the num-integer crate so I opened the issue on https://github.com/rust-num/num-integer/issues/28 because I'm not sure how and why I'd report this to rust-lang/rust.