Repository navigation
build failed on aarch64 centos 7.9 with gcc7.3 #4226
Copy link
Copy link
Closed
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixing
Description
Steps to Reproduce
# build on aarch64 centos 7.9
yum install -y epel-release centos-release-scl
yum install -y git make llvm-toolset-7 devtoolset-7
source /opt/rh/devtoolset-7/enable
export LIBCLANG_PATH=/opt/rh/llvm-toolset-7.0/root/lib64/
source /opt/rh/llvm-toolset-7.0/enable
cd crates/fiber
cargo buildthe output is
$ cargo build
Downloaded cc v1.0.68 (registry `ustc`)
Downloaded semver v1.0.3 (registry `ustc`)
Downloaded 2 crates (84.9 KB) in 1.12s
Compiling semver v1.0.3
Compiling cc v1.0.68
Compiling linux-raw-sys v0.0.36
Compiling bitflags v1.3.2
Compiling wasmtime-fiber v0.32.0 (/data/home/xingqiangbai/wasmtime/crates/fiber)
Compiling rustc_version v0.4.0
The following warnings were emitted during compilation:
warning: src/arch/aarch64.S: Assembler messages:
warning: src/arch/aarch64.S:21: Error: operand 1 must be a floating-point register -- `stp lr,fp,[sp,-16]!'
warning: src/arch/aarch64.S:50: Error: operand 1 must be a floating-point register -- `ldp lr,fp,[sp],16'
warning: src/arch/aarch64.S:90: Error: bad register expression
error: failed to run custom build command for `wasmtime-fiber v0.32.0 (/data/home/xingqiangbai/wasmtime/crates/fiber)`
Caused by:
process didn't exit successfully: `/data/home/xingqiangbai/wasmtime/target/debug/build/wasmtime-fiber-5d0a77b56f840026/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("aarch64-unknown-linux-gnu")
OPT_LEVEL = Some("0")
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("true")
CARGO_CFG_TARGET_FEATURE = Some("neon,pmuv3")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-Wall" "-Wextra" "-DCFG_TARGET_OS_linux" "-DCFG_TARGET_ARCH_aarch64" "-o" "/data/home/xingqiangbai/wasmtime/target/debug/build/wasmtime-fiber-3beb5f998a225eb9/out/src/arch/aarch64.o" "-c" "src/arch/aarch64.S"
cargo:warning=src/arch/aarch64.S: Assembler messages:
cargo:warning=src/arch/aarch64.S:21: Error: operand 1 must be a floating-point register -- `stp lr,fp,[sp,-16]!'
cargo:warning=src/arch/aarch64.S:50: Error: operand 1 must be a floating-point register -- `ldp lr,fp,[sp],16'
cargo:warning=src/arch/aarch64.S:90: Error: bad register expression
exit status: 1
--- stderr
error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-Wall" "-Wextra" "-DCFG_TARGET_OS_linux" "-DCFG_TARGET_ARCH_aarch64" "-o" "/data/home/xingqiangbai/wasmtime/target/debug/build/wasmtime-fiber-3beb5f998a225eb9/out/src/arch/aarch64.o" "-c" "src/arch/aarch64.S" with args "cc" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...Expected Results
Build successfully.
It works on m1 mac and a virtual machine(ubuntu 20.04 aarch64) on m1 mac.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixing
Activity
cfallin commentedon Jun 6, 2022
@bxq2011hust thanks for the report! Can you show the output of
cc --versionandas --version?I suspect that really old versions of GNU
asmay not support referring to thefpandlrregisters asfpandlr-- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512If so, we could modify our assembly to always spell these as
x29andx30respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?bxq2011hust commentedon Jun 6, 2022
Thanks very much. I compare ubuntu 20.04 with CentOS7 and found that ubuntu 20.04 use gcc9. I tried gcc9 on aarch64 CentOS7, now it works fine. @cfallin
akirilov-arm commentedon Jun 6, 2022
I think it is reasonable to support older toolchain versions, provided that it is not too much of a hassle, which seems to be the case here. Personally, I think I have found myself wondering what register numbers
fpandlrcorrespond to more often than the other way round, so I'd say that the proposed fix wouldn't even necessarily diminish readability.I will incorparate the fix in PR #4195, since I am tinkering with the fiber code anyway.
[-]build failed on aarch64 centos 7.9[/-][+]build failed on aarch64 centos 7.9 with gcc7.3[/+]alexcrichton commentedon Jun 9, 2022
Fixed in #4195 so closing (thanks @akirilov-arm!)