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

m1 arm support #22

Closed
jianshu93 opened this issue Feb 3, 2022 · 6 comments
Closed

m1 arm support #22

jianshu93 opened this issue Feb 3, 2022 · 6 comments

Comments

@jianshu93
Copy link

Hello rust-mdbg team,

It seems that there is no support for ARM structure yet, I have the following error when compiling on ARM64:

The following warnings were emitted during compilation:

warning: cc: error: unrecognized command-line option '-msse4.2'
warning: cc: error: unrecognized command-line option '-maes'
warning: cc: error: unrecognized command-line option '-mavx'
warning: cc: error: unrecognized command-line option '-mavx2'

error: failed to run custom build command for fasthash-sys v0.3.2

Caused by:
process didn't exit successfully: /Users/jianshuzhao/Github/rust-mdbg/target/release/build/fasthash-sys-17495dcf061597dc/build-script-build (signal: 6, SIGABRT: process abort signal)
--- stdout
TARGET = Some("aarch64-apple-darwin")
OPT_LEVEL = Some("3")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("aarch64-apple-darwin")
TARGET = Some("aarch64-apple-darwin")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-apple-darwin = None
CC_aarch64_apple_darwin = None
HOST_CC = None
CC = None
HOST = Some("aarch64-apple-darwin")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("aarch64-apple-darwin")
CFLAGS_aarch64-apple-darwin = None
CFLAGS_aarch64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("false")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wno-implicit-fallthrough" "-Wno-unknown-attributes" "-msse4.2" "-maes" "-mavx" "-mavx2" "-DT1HA0_RUNTIME_SELECT=1" "-DT1HA0_AESNI_AVAILABLE=1" "-Wall" "-Wextra" "-o" "/Users/jianshuzhao/Github/rust-mdbg/target/release/build/fasthash-sys-d509c7de4ba60bc4/out/src/fasthash.o" "-c" "src/fasthash.cpp"
cargo:warning=cc: error: unrecognized command-line option '-msse4.2'
cargo:warning=cc: error: unrecognized command-line option '-maes'
cargo:warning=cc: error: unrecognized command-line option '-mavx'
cargo:warning=cc: error: unrecognized command-line option '-mavx2'
exit status: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wno-implicit-fallthrough" "-Wno-unknown-attributes" "-msse4.2" "-maes" "-mavx" "-mavx2" "-DT1HA0_RUNTIME_SELECT=1" "-DT1HA0_AESNI_AVAILABLE=1" "-Wall" "-Wextra" "-o" "/Users/jianshuzhao/Github/rust-mdbg/target/release/build/fasthash-sys-d509c7de4ba60bc4/out/src/fasthash.o" "-c" "src/fasthash.cpp" with args "cc" did not execute successfully (status code exit status: 1).

', /Users/jianshuzhao/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.55/src/lib.rs:1672:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
warning: build failed, waiting for other jobs to finish...
error: build failed

Any possibilities to provide support?

Thanks,

Jianshu

@rchikhi
Copy link
Collaborator

rchikhi commented Feb 7, 2022

Hi, no support planned here sorry, I don't have access to that hardware. Any pull request is of course welcome.

@jianshu93
Copy link
Author

It seems to me that rust-fasthash (rust binding to smhash) is the only one that is platform specific, I am wondering what hash was used in the smhash because there so many other rust implemented hash repo including murmurhash3 et.al.

Jianshu

@rchikhi
Copy link
Collaborator

rchikhi commented Jun 25, 2022

thanks for the analysis Jianshu! Turns out fasthash was even commented out from the code, so I removed it from the dependencies. Can you compile now?

@asl
Copy link

asl commented Jun 25, 2022

I can confirm it builds now on M1

@jianshu93
Copy link
Author

Hello All,

I can also confirm that it builds on M1 Pro/Max and it works for the testing input.

Many thanks for the work.

Jianshu

@rchikhi
Copy link
Collaborator

rchikhi commented Jun 25, 2022

great!

@rchikhi rchikhi closed this as completed Jun 25, 2022
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

No branches or pull requests

3 participants