Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Build fails on ARM-based system #44

Open
2 tasks
tomkha opened this issue Nov 16, 2019 · 1 comment
Open
2 tasks

Build fails on ARM-based system #44

tomkha opened this issue Nov 16, 2019 · 1 comment
Assignees
Labels
crate:libargon2-sys Concerns libargon2-sys sub-crate target:arm ARM target

Comments

@tomkha
Copy link

tomkha commented Nov 16, 2019

New issue checklist

General information

  • Library version(s): 0.2
  • Browser version(s): N/A
  • Devices/Simulators/Machine affected: Linux aarch64
  • Reproducible in the testnet? (Yes/No): N/A
  • Related issues:

Bug report

Expected behavior

Build doesn't fail

Actual behavior

Build fails

Steps to reproduce

cargo +nightly build --release

Crash log? Screenshots? Videos? Sample project?

error: failed to run custom build command for `libargon2-sys v0.2.0 (/home/ubuntu/nimiq/libargon2-sys)`

Caused by:
  process didn't exit successfully: `/home/ubuntu/nimiq/target/release/build/libargon2-sys-66ab85cb0894a5ef/build-script-build` (exit code: 1)
--- stdout
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-unknown-linux-gnu")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fp,neon")
running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "native" "-Wall" "-Wextra" "-DARGON2_NO_THREADS" "-o" "/home/ubuntu/nimiq/target/release/build/libargon2-sys-1a40ba79533982af/out/native/argon2.o" "-c" "native/argon2.c"
exit code: 0
running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "native" "-Wall" "-Wextra" "-DARGON2_NO_THREADS" "-o" "/home/ubuntu/nimiq/target/release/build/libargon2-sys-1a40ba79533982af/out/native/core.o" "-c" "native/core.c"
exit code: 0
running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "native" "-Wall" "-Wextra" "-DARGON2_NO_THREADS" "-o" "/home/ubuntu/nimiq/target/release/build/libargon2-sys-1a40ba79533982af/out/native/blake2/blake2b.o" "-c" "native/blake2/blake2b.c"
exit code: 0
running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "native" "-Wall" "-Wextra" "-DARGON2_NO_THREADS" "-o" "/home/ubuntu/nimiq/target/release/build/libargon2-sys-1a40ba79533982af/out/native/opt.o" "-c" "native/opt.c"
cargo:warning=In file included from native/opt.c:26:0:
cargo:warning=native/blake2/blamka-round-opt.h:23:10: fatal error: emmintrin.h: No such file or directory
cargo:warning= #include <emmintrin.h>
cargo:warning=          ^~~~~~~~~~~~~
cargo:warning=compilation terminated.
exit code: 1

--- stderr


error occurred: Command "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "native" "-Wall" "-Wextra" "-DARGON2_NO_THREADS" "-o" "/home/ubuntu/nimiq/target/release/build/libargon2-sys-1a40ba79533982af/out/native/opt.o" "-c" "native/opt.c" with args "cc" did not execute successfully (status code exit code: 1).
@tomkha
Copy link
Author

tomkha commented Nov 16, 2019

Looks like it always uses x86 optimizations that's why.

As a quick fix I copied ref.c to libargon2-sys and changed build.rs

@jeffesquivels jeffesquivels self-assigned this Nov 16, 2019
@jeffesquivels jeffesquivels added crate:libargon2-sys Concerns libargon2-sys sub-crate target:arm ARM target labels Nov 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crate:libargon2-sys Concerns libargon2-sys sub-crate target:arm ARM target
Projects
None yet
Development

No branches or pull requests

2 participants