easybuild-easyblocks
easybuild-easyblocks copied to clipboard
Cargo EasyBlock doesn't support most non-empty `optarch`'s
See this build failure.
Snippet from that log:
== 2023-06-05 12:03:05,327 build_log.py:171 ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): cmd " cargo build --profile=release --tests -j 8 -Z unstable-options " exited with exit code 101 and output:
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -C 'target-cpu={'\''Intel'\'':' ''\''march=core-avx2'\''}' --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are `-` and `'march=core-avx2'}`)
I.e. it ends up with -C 'target-cpu={'\''Intel'\'':' ''\''march=core-avx2'\''}' and has no idea what to do with that.
I'm not sure, maybe something like self.toolchain.get_flag('optarch') should be done (which then returns march=core-avx2 for Intel based toolchains, and nothing for GCCcore I suppose) instead?
@Micket I hear you're the Cargo expert, care to have a look?
I.e. it ends up with -C 'target-cpu={'''Intel''':' ''''march=core-avx2'''}' and has no idea what to do with that.
The problem is that makes two of us. I have no idea what that optarch even means
Same as #2759
Possible fix proposed: https://github.com/easybuilders/easybuild-easyblocks/pull/2947
Can this be closed now #2947 is merged?