Project

General

Profile

Actions

Bug #18580

closed

WITH_SPDK=ON: /usr/local/lib/librte_eal.a: error adding symbols: Bad value

Added by John Lin about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Ceph version 11.1.1

Build environment: Ubuntu 16.04

Reproduce steps:
1. ./do_cmake.sh -D WITH_SPDK=ON -D WITH_MANPAGE=OFF -D WITH_LTTNG=OFF -D CMAKE_VERBOSE_MAKEFILE=ON
2. cd build
3. make
4. See the following error messages:

[ 17%] Linking CXX executable ../bin/ceph-mgr
cd /build/ceph-11.1.1/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/ceph-mgr.dir/link.txt --verbose=1
/usr/bin/c++ -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -rdynamic -Wno-unknown-pragmas -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fdiagnostics-color=auto -I/usr/include/nss -I/usr/include/nspr -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -O2 -g -pie CMakeFiles/ceph-mgr.dir/ceph_mgr.cc.o CMakeFiles/ceph-mgr.dir/mon/PGMap.cc.o CMakeFiles/ceph-mgr.dir/mgr/DaemonState.cc.o CMakeFiles/ceph-mgr.dir/mgr/DaemonServer.cc.o CMakeFiles/ceph-mgr.dir/mgr/ClusterState.cc.o CMakeFiles/ceph-mgr.dir/mgr/PyModules.cc.o CMakeFiles/ceph-mgr.dir/mgr/PyFormatter.cc.o CMakeFiles/ceph-mgr.dir/mgr/PyState.cc.o CMakeFiles/ceph-mgr.dir/mgr/MgrPyModule.cc.o CMakeFiles/ceph-mgr.dir/mgr/MgrStandby.cc.o CMakeFiles/ceph-mgr.dir/mgr/Mgr.cc.o CMakeFiles/heap_profiler_objs.dir/perfglue/heap_profiler.cc.o -o ../bin/ceph-mgr ../lib/libmds.a ../lib/libosdc.a ../lib/libglobal.a -lboost_python -lpython2.7 -lblkid -ldl -ltcmalloc ../lib/liblua.a -lm -ldl ../lib/libcommon.a ../lib/libjson_spirit.a ../lib/libcommon_utf8.a ../lib/liberasure_code.a ../boost/lib/libboost_thread.a ../boost/lib/libboost_system.a ../boost/lib/libboost_regex.a ../boost/lib/libboost_random.a ../boost/lib/libboost_program_options.a ../boost/lib/libboost_date_time.a ../boost/lib/libboost_iostreams.a ../boost/lib/libboost_python.a -lpthread -lz -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -Wl,--whole-archive /usr/local/lib/librte_hash.a /usr/local/lib/librte_kvargs.a /usr/local/lib/librte_mbuf.a /usr/local/lib/libethdev.a /usr/local/lib/librte_mempool.a /usr/local/lib/librte_ring.a /usr/local/lib/librte_eal.a /usr/local/lib/librte_cmdline.a /usr/local/lib/librte_pmd_bond.a /usr/local/lib/librte_pmd_vmxnet3_uio.a /usr/local/lib/librte_pmd_ixgbe.a /usr/local/lib/librte_pmd_i40e.a /usr/local/lib/librte_pmd_ring.a /usr/local/lib/librte_pmd_af_packet.a -Wl,--no-whole-archive -lrt -Wl,-Bstatic -latomic_ops -Wl,-Bdynamic -lresolv -lblkid -ldl
/usr/bin/ld: /usr/local/lib/librte_hash.a(rte_cuckoo_hash.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/librte_hash.a(rte_cuckoo_hash.o): error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/CMakeFiles/ceph-mgr.dir/build.make:403: recipe for target 'bin/ceph-mgr' failed
make2: * [bin/ceph-mgr] Error 1
make2: Leaving directory '/build/ceph-11.1.1/build'
CMakeFiles/Makefile2:484: recipe for target 'src/CMakeFiles/ceph-mgr.dir/all' failed
make1:
[src/CMakeFiles/ceph-mgr.dir/all] Error 2
make1: Leaving directory '/build/ceph-11.1.1/build'
Makefile:141: recipe for target 'all' failed
make: *
* [all] Error 2

Actions #1

Updated by John Lin about 7 years ago

Here is how I built dpdk (dpdk-stable-16.07.2.tar.gz):

1. make config T=x86_64-native-linuxapp-gcc
2. make
3. make install

Actions #2

Updated by John Lin about 7 years ago

I wish to change the title to "WITH_SPDK=ON: /usr/local/lib/librte_hash.a(rte_cuckoo_hash.o): error adding symbols: Bad value".

Actions #3

Updated by John Lin about 7 years ago

This issue can be solved by setting the key "CONFIG_RTE_BUILD_SHARED_LIB" to "y" in dpdk.

Actions #4

Updated by Greg Farnum almost 7 years ago

  • Assignee set to Haomai Wang

Still an issue?

Actions #5

Updated by Haomai Wang almost 7 years ago

  • Status changed from New to Closed

it looks resolved

Actions #6

Updated by John Lin almost 7 years ago

Yes, it's resolved. Thanks.

Actions #7

Updated by liu lang over 6 years ago

John Lin wrote:

Yes, it's resolved. Thanks.

after i build dpdk to shared_lib,run make in ceph/build, error:

../../src/spdk/build/lib/libspdk_env_dpdp.a(env.o): in function
'rte_mempool_ops_enqueue_bulk':
/usr/local/include/dpdk/rte_mempool.h:495: undefined reference to
'rte_mempool_ops_table'
../../src/spdk/build/lib/libspdk_env_dpdp.a(env.o): in function
'spdk_mempool_create':
/root/ceph-12.2.0/src/spdk/lib/env_dpdk/env.c:152 undefined reference to
'rte_mempool_create'

do you know why

Actions #8

Updated by John Lin over 6 years ago

Please see my previous comment of setting the key "CONFIG_RTE_BUILD_SHARED_LIB" to "y".

Actions

Also available in: Atom PDF