[SPDK] Failed to link spdk library

gaiaismus at outlook.com
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
HI, After I updated the SPDK version to v20.01, my project failed link to spdk library.

This is part of my CMakeList.txt
----------------------------------------------------------------------------------

include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(/usr/local/include)
include_directories(${PROJECT_SOURCE_DIR}/../spdk/include)

link_directories(/usr/local/lib)
link_directories(${PROJECT_SOURCE_DIR}/../spdk/dpdk/build/lib)
link_directories(${PROJECT_SOURCE_DIR}/../spdk/build/lib)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/buid/lib)
 
add_executable(io_demo ${DIR_SRCS})
target_link_libraries(
    io_demo
    dpdk pthread abt dl numa uuid m rt
    spdk_app_rpc spdk_bdev spdk_bdev_aio spdk_bdev_delay spdk_bdev_error spdk_bdev_ftl spdk_bdev_gpt spdk_bdev_lvol
    spdk_bdev_malloc spdk_bdev_null spdk_bdev_nvme spdk_bdev_passthru spdk_bdev_raid spdk_bdev_rpc
    spdk_bdev_split spdk_bdev_virtio spdk_bdev_zone_block spdk_blob spdk_blob_bdev
    spdk_blobfs spdk_blobfs_bdev spdk_conf spdk_copy spdk_copy_ioat spdk_env_dpdk spdk_env_dpdk_rpc
    spdk_event spdk_event_bdev spdk_event_copy spdk_event_iscsi spdk_event_nbd spdk_event_net spdk_event_nvmf
    spdk_event_scsi spdk_event_vhost spdk_event_vmd spdk_ftl spdk_ioat spdk_iscsi spdk_json spdk_jsonrpc
    spdk_log spdk_log_rpc spdk_lvol spdk_nbd spdk_net spdk_notify spdk_nvme spdk_nvmf spdk_rpc spdk_scsi
    spdk_sock spdk_sock_posix spdk_thread
    spdk_vhost spdk_virtio spdk_vmd
    spdk_ut_mock
    rte_bus_vdev rte_compressdev rte_eal rte_fib rte_kvargs rte_mempool rte_mempool_ring
    rte_net rte_rib rte_vhost rte_bus_pci rte_cmdline rte_cryptodev rte_ethdev rte_hash rte_mbuf
    rte_mempool_bucket rte_meter rte_pci rte_ring
    spdk_trace
    spdk_util                                                                                                                                                                                               
    spdk_env_dpdk spdk_iscsi spdk_event_iscsi  spdk_scsi
)

This is my error message
We are running  with CentOS Linux release 7.4.1708 (Core) 
----------------------------------------------------------------------------------

/home/xxx/io-test/io/../spdk/build/lib/libspdk_util.a(crc32c.o): In function `spdk_crc32c_update':
/home/xxx/io-test/spdk/lib/util/crc32c.c:52: undefined reference to `crc32_iscsi'
collect2: error: ld returned 1 exit status
make[2]: *** [io_demo] Error 1
make[1]: *** [CMakeFiles/io_demo.dir/all] Error 2
make: *** [all] Error 2

----------------------------------------------------------------------------------

If someone can help me resolve this error or provide a correct CMakeList example, will be much appreciated.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.