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

arm64机器静态编译driver插件出错 #216

Closed
mammger opened this issue Apr 15, 2022 · 1 comment
Closed

arm64机器静态编译driver插件出错 #216

mammger opened this issue Apr 15, 2022 · 1 comment

Comments

@mammger
Copy link

mammger commented Apr 15, 2022

Describe the bug
在aws linux2 ARM机器执行 Elkeid/plugins/driver/build.sh 已经改成 aarch64
静态编译有问题,动态没有问题
`
#!/bin/bash
set -e
BUILD_VERSION="1.7.0.1"

mkdir -p output
RUSTFLAGS='-C link-arg=-s' cargo build --target aarch64-unknown-linux-musl --release
`
出错信息:
/root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)',

报错如下:
./build.sh Compiling ring v0.16.20 Compiling protobuf v2.27.1 error: failed to run custom build command forring v0.16.20`

Caused by:
process didn't exit successfully: /home/ec2-user/Elkeid/plugins/driver/target/release/build/ring-d7dce0e5723a1a1f/build-script-build (exit status: 101)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("aarch64-unknown-linux-musl")
HOST = Some("aarch64-unknown-linux-gnu")
CC_aarch64-unknown-linux-musl = None
CC_aarch64_unknown_linux_musl = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_aarch64-unknown-linux-musl = None
CFLAGS_aarch64_unknown_linux_musl = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = None

--- stderr
running "aarch64-linux-musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-U_FORTIFY_SOURCE" "-DNDEBUG" "-c" "-o/home/ec2-user/Elkeid/plugins/driver/target/aarch64-unknown-linux-musl/release/build/ring-564d31c97ae87dc0/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
thread 'main' panicked at 'failed to execute ["aarch64-linux-musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-U_FORTIFY_SOURCE" "-DNDEBUG" "-c" "-o/home/ec2-user/Elkeid/plugins/driver/target/aarch64-unknown-linux-musl/release/build/ring-564d31c97ae87dc0/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', /root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
`

@Percivalll
Copy link
Contributor

ref: briansmith/ring#1414

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

2 participants