Stream: git-wasmtime

Topic: wasmtime / issue #4226 build failed on aarch64 centos 7.9


view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 06:47):

bxq2011hust opened issue #4226:

Thanks for filing a bug report! Please fill out the TODOs below.

Note: if you want to report a security issue, please read our security policy!

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 build

the 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 06:47):

bxq2011hust labeled issue #4226:

Thanks for filing a bug report! Please fill out the TODOs below.

Note: if you want to report a security issue, please read our security policy!

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 build

the 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 06:48):

bxq2011hust edited issue #4226:

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 build

the 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 07:11):

cfallin commented on issue #4226:

@bxq2011hust thanks for the report! Can you show the output of cc --version and as --version?

I suspect that really old versions of GNU as may not support referring to the fp and lr registers as fp and lr -- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512

If so, we could modify our assembly to always spell these as x29 and x30 respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 07:12):

cfallin edited a comment on issue #4226:

@bxq2011hust thanks for the report! Can you show the output of cc --version and as --version?

I suspect that really old versions of GNU as may not support referring to the fp and lr registers as fp and lr -- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512

If so, we could modify our assembly to always spell these as x29 and x30 respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 07:27):

bxq2011hust commented on issue #4226:

@bxq2011hust thanks for the report! Can you show the output of cc --version and as --version?

I suspect that really old versions of GNU as may not support referring to the fp and lr registers as fp and lr -- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512

If so, we could modify our assembly to always spell these as x29 and x30 respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?

Thanks very much. I compare ubuntu 20.04 and CentOS7 and found that ubuntu 20.04 use gcc9. I tried gcc9 on aarch64 CentOS7, now it works fine.

cc --version
cc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


as --version
GNU assembler version 2.28-11.el7
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `aarch64-redhat-linux'.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 07:28):

bxq2011hust edited a comment on issue #4226:

@bxq2011hust thanks for the report! Can you show the output of cc --version and as --version?

I suspect that really old versions of GNU as may not support referring to the fp and lr registers as fp and lr -- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512

If so, we could modify our assembly to always spell these as x29 and x30 respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?

Thanks very much. I compare ubuntu 20.04 and CentOS7 and found that ubuntu 20.04 use gcc9. I tried gcc9 on aarch64 CentOS7, now it works fine. @cfallin

cc --version
cc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


as --version
GNU assembler version 2.28-11.el7
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `aarch64-redhat-linux'.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 06 2022 at 14:12):

akirilov-arm commented on issue #4226:

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 fp and lr correspond 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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2022 at 01:56):

bxq2011hust edited a comment on issue #4226:

@bxq2011hust thanks for the report! Can you show the output of cc --version and as --version?

I suspect that really old versions of GNU as may not support referring to the fp and lr registers as fp and lr -- see e.g. the patch in Comment 8 on this WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=175512

If so, we could modify our assembly to always spell these as x29 and x30 respectively, though that's a bit unfortunate... cc @akirilov-arm , thoughts on this re: aarch64 toolchain requirements/expectations?

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

cc --version
cc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


as --version
GNU assembler version 2.28-11.el7
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `aarch64-redhat-linux'.

Last updated: Nov 22 2024 at 17:03 UTC