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

aarch64 compilation failures - relocation truncated to fit #302

Open
tkekan opened this issue Oct 31, 2024 · 6 comments
Open

aarch64 compilation failures - relocation truncated to fit #302

tkekan opened this issue Oct 31, 2024 · 6 comments

Comments

@tkekan
Copy link

tkekan commented Oct 31, 2024

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
Copy link
Contributor

@liuqinfei could you look into this issue? Thanks!

@liuqinfei
Copy link
Contributor

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
Copy link
Contributor

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

@tkekan
Copy link
Author

tkekan commented Nov 12, 2024

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
Copy link
Author

tkekan commented Nov 13, 2024

@liuqinfei I have the steps here: intel/isa-l_crypto#152

@pablodelara
Copy link
Contributor

@liuqinfei could you look any further?

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