Open tkekan opened 3 weeks ago
Can you provide a method to reproduce the problem? including the SPDK version and compilation commands and Compiler Version
@chenxuqiang Yes
Using Bazel: release 7.3.1 SPDK : 24.9.0-pre GCC : 13
filegroup(
name = "sources",
srcs = glob(["**"]),
visibility = ["//third-party/spdk:__subpackages__"],
)
configure_make( name = "spdk", configure_command = "configure", lib_source = ":sources", configure_in_place = True, configure_options = ["--without-shared", "--without-crypto"], includes = ["include", "lib"], args = args_attr, copts = [ "-Wno-unused-parameter", "-Wno-missing-field-initializers", "-Iexternal/spdk/spdk/lib", "-Wno-pointer-arith", "-Wno-conversion", "-Wno-sign-conversion", "-Wno-switch-default", "-Wno-cast-qual", "-Wno-packed", "-Wno-pedantic", "-Wno-redundant-decls", "-Wno-shadow", "-Wno-variadic-macros", "-Wno-logical-op", "-Wno-discarded-qualifiers", "-Wno-suggest-attribute=format", "-Wno-stack-usage", "-Wno-float-equal", "-Wno-cpp", ], linkopts = [ "-pthread", "-lnuma", "-luuid", "-ldl", "-lssl", "-lcrypto", "-lrt", "-lm", "-lfuse3", "-lz", "-laio", "-lkeyutils", ], out_static_libs = [ "libisal.a", "libspdk_accel.a", "libspdk_accel_error.a", "libspdk_accel_ioat.a", "libspdk_bdev.a", "libspdk_bdev_aio.a", "libspdk_bdev_delay.a", "libspdk_bdev_error.a", "libspdk_bdev_ftl.a", "libspdk_bdev_gpt.a", "libspdk_bdev_lvol.a", "libspdk_bdev_malloc.a", "libspdk_bdev_null.a", "libspdk_bdev_nvme.a", "libspdk_bdev_passthru.a", "libspdk_bdev_raid.a", "libspdk_bdev_split.a", "libspdk_bdev_virtio.a", "libspdk_bdev_zone_block.a", "libspdk_blob.a", "libspdk_blob_bdev.a", "libspdk_blobfs.a", "libspdk_blobfs_bdev.a", "libspdk_conf.a", "libspdk_dma.a", "libspdk_env_dpdk.a", "libspdk_env_dpdk_rpc.a", "libspdk_event.a", "libspdk_event_accel.a", "libspdk_event_bdev.a", "libspdk_event_iobuf.a", "libspdk_event_keyring.a", "libspdk_event_nbd.a", "libspdk_event_scheduler.a", "libspdk_event_scsi.a", "libspdk_event_sock.a", "libspdk_event_vhost_blk.a", "libspdk_event_vhost_scsi.a", "libspdk_event_vmd.a", "libspdk_ftl.a", "libspdk_init.a", "libspdk_ioat.a", "libspdk_iscsi.a", "libspdk_json.a", "libspdk_jsonrpc.a", "libspdk_keyring.a", "libspdk_keyring_file.a", "libspdk_keyring_linux.a", "libspdk_log.a", "libspdk_lvol.a", "libspdk_nbd.a", "libspdk_notify.a", "libspdk_nvme.a", "libspdk_nvmf.a", "libspdk_rpc.a", "libspdk_scheduler_dpdk_governor.a", "libspdk_scheduler_dynamic.a", "libspdk_scheduler_gscheduler.a", "libspdk_scsi.a", "libspdk_sock.a", "libspdk_sock_posix.a", "libspdk_thread.a", "libspdk_trace.a", "libspdk_trace_parser.a", "libspdk_util.a", "libspdk_vfio_user.a", "libspdk_vhost.a", "libspdk_virtio.a", "libspdk_vmd.a", "librte_bus_pci.a", "librte_bus_vdev.a", "librte_cmdline.a", "librte_compressdev.a", "librte_cryptodev.a", "librte_dmadev.a", "librte_eal.a", "librte_ethdev.a", "librte_hash.a", "librte_kvargs.a", "librte_log.a", "librte_mbuf.a", "librte_mempool.a", "librte_mempool_ring.a", "librte_meter.a", "librte_net.a", "librte_pci.a", "librte_power.a", "librte_rcu.a", "librte_reorder.a", "librte_ring.a", "librte_security.a", "librte_telemetry.a", "librte_timer.a", "librte_vhost.a", "libisal_crypto.a", ] , out_binaries = [ "nvmf_tgt", "spdk_rpc", "spdk_nvme_perf", "spdk_tgt", "spdk_top", "spdk_trace", ], alwayslink = True, )
2. Create a sample hello-world program and link the spdk to that binary
using namespace std;
int main() { cout << "Hello World!" << endl; return 0; }
cc_binary(
name = "hello-world",
srcs = ["hello-world.cpp"],
deps = [
"//third-party/spdk:spdk",
]
)
3. Compile the sample_program
INFO: Analyzed target //sample_program:hello-world (1 packages loaded, 2 targets configured). ERROR: /root/dpp-workspace/sample_program/BUILD:1:10: Linking sample_program/hello-world failed: (Exit 1): gcc failed: error executing CppLink command (from target //sample_program:hello-world) /opt/rh/gcc-toolset-13/root/bin/gcc @bazel-out/aarch64-fastbuild/bin/sample_program/hello-world-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
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/1/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/1/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/1/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/1/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/1/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/1/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
Target //sample_program:hello-world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.014s, Critical Path: 0.58s
INFO: 7 processes: 6 internal, 1 processwrapper-sandbox.
ERROR: Build did NOT complete successfully
@chenxuqiang Where you able to repro this ?
Hello All,
I'm getting errors like below whenever the linking happens with isal-crypto via the spdk lib. isal-crypto is built via spdk sources Any clue / pointers on what is happening here ?