intel / isa-l

Intelligent Storage Acceleration Library
Other
957 stars 301 forks source link

aarch64 compilation failures - relocation truncated to fit #302

Open tkekan opened 3 weeks ago

tkekan commented 3 weeks ago

Hello while linking a bazel test that needs an spdk client I'm getting below errors during linking. Please let me know if you need extra information in debugging this further.

Env: OL8 docker running on Apple M3 Silicon. The same build runs fine on X86_64 docker running on X86 host but this build fails on aarch64. docker on Darwin arm64

bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x1_ce.o): in function `sha256_mb_ce_x1':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x1_ce.S:115:(.text+0xc): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x2_ce.o): in function `sha256_mb_ce_x2':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x2_ce.S:144:(.text+0x28): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x3_ce.o): in function `sha256_mb_ce_x3':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x3_ce.S:166:(.text+0x34): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x4_ce.o): in function `sha256_mb_ce_x4':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x4_ce.S:195:(.text+0x40): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha512_mb_x1_ce.o): in function `sha512_mb_ce_x1':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha512_mb/aarch64/sha512_mb_x1_ce.S:140:(.text+0xc): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha512_mb_x2_ce.o): in function `sha512_mb_ce_x2':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha512_mb/aarch64/sha512_mb_x2_ce.S:230:(.text+0x28): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
collect2: error: ld returned 1 exit status
pablodelara commented 3 weeks ago

@liuqinfei could you look into this issue? Thanks!

liuqinfei commented 2 weeks ago

Hello while linking a bazel test that needs an spdk client I'm getting below errors during linking. Please let me know if you need extra information in debugging this further.

Env: OL8 docker running on Apple M3 Silicon. The same build runs fine on X86_64 docker running on X86 host but this build fails on aarch64. docker on Darwin arm64

bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x1_ce.o): in function `sha256_mb_ce_x1':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x1_ce.S:115:(.text+0xc): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x2_ce.o): in function `sha256_mb_ce_x2':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x2_ce.S:144:(.text+0x28): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x3_ce.o): in function `sha256_mb_ce_x3':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x3_ce.S:166:(.text+0x34): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha256_mb_x4_ce.o): in function `sha256_mb_ce_x4':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha256_mb/aarch64/sha256_mb_x4_ce.S:195:(.text+0x40): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha512_mb_x1_ce.o): in function `sha512_mb_ce_x1':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha512_mb/aarch64/sha512_mb_x1_ce.S:140:(.text+0xc): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk/lib/libisal_crypto.a(sha512_mb_x2_ce.o): in function `sha512_mb_ce_x2':
/root/.cache/bazel/_bazel_root/78159c4ab73ed818c6000c3e550185d3/sandbox/processwrapper-sandbox/5161/execroot/_main/bazel-out/aarch64-fastbuild/bin/third-party/spdk/spdk.build_tmpdir/isa-l-crypto/sha512_mb/aarch64/sha512_mb_x2_ce.S:230:(.text+0x28): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against `.rol0_data.cst16'
collect2: error: ld returned 1 exit status

According to the logs, the problem is releated to isa-l_crypto not isa-l.

liuqinfei commented 2 weeks ago

@tkekan If it is with isa-l. Please show the steps for reproducing the issue.

tkekan commented 1 week ago

Yep it's occuring due to isa-l_crypto, do you want me to share the steps to repro when linked with libisal_crypto.a ?

@tkekan If it is with isa-l. Please show the steps for reproducing the issue.

tkekan commented 1 week ago

@liuqinfei I have the steps here: https://github.com/intel/isa-l_crypto/issues/152