summaryrefslogtreecommitdiffstats
path: root/linux_dpdk
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-04 17:36:42 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-04 17:36:42 +0200
commit5d5e7a2db5bdb2b7cfa0f37ff9cf53bb615f550c (patch)
tree488af078ebf4c57aefdee84137c7184051765ae5 /linux_dpdk
parent10e549c80e4652161c0b212be835ec01e33441e9 (diff)
TRex build: give priority to installed ibverbs lib
Change-Id: I1a201bc45ed7280ae0092c891fd520d81cb8dd97 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'linux_dpdk')
-rwxr-xr-xlinux_dpdk/ws_main.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/linux_dpdk/ws_main.py b/linux_dpdk/ws_main.py
index 6c163fbf..fa427fee 100755
--- a/linux_dpdk/ws_main.py
+++ b/linux_dpdk/ws_main.py
@@ -13,6 +13,7 @@ import re
import uuid
import subprocess
import platform
+from waflib import Logs
# these variables are mandatory ('/' are converted automatically)
top = '../'
@@ -108,8 +109,12 @@ def check_ibverbs_deps(bld):
if ret or not out:
bld.fatal("Command of checking libraries '%s' failed.\nReturn status: %s\nOutput: %s" % (cmd, ret, out))
if '=> not found' in out:
+ Logs.pprint('YELLOW', 'Could not find dependency libraries of libibverbs.so:')
+ for line in out.splitlines():
+ if '=> not found' in line:
+ Logs.pprint('YELLOW', line)
dumy_libs_path = os.path.abspath(top + 'scripts/dumy_libs')
- print('Adding rpath %s' % dumy_libs_path)
+ Logs.pprint('YELLOW', 'Adding rpath of %s' % dumy_libs_path)
rpath_linkage.append(dumy_libs_path)
@@ -134,6 +139,10 @@ def configure(conf):
conf.load('gcc')
conf.find_program('ldd')
conf.check_cxx(lib = 'z', errmsg = missing_pkg_msg(fedora = 'zlib-devel', ubuntu = 'zlib1g-dev'))
+ try:
+ conf.check_cxx(lib = 'ibverbs', errmsg = 'Could not find library ibverbs, will try internal version.')
+ except:
+ pass
def getstatusoutput(cmd):
@@ -834,12 +843,15 @@ def post_build(bld):
def build(bld):
bld.add_pre_fun(pre_build)
bld.add_post_fun(post_build);
- check_ibverbs_deps(bld)
zmq_lib_path='external_libs/zmq/'
bld.read_shlib( name='zmq' , paths=[top+zmq_lib_path] )
- ibverbs_lib_path='external_libs/ibverbs/'
- bld.read_shlib( name='ibverbs' , paths=[top+ibverbs_lib_path] )
+ if bld.env['LIB_IBVERBS']:
+ bld.read_shlib(name='ibverbs')
+ else:
+ ibverbs_lib_path='external_libs/ibverbs/'
+ bld.read_shlib( name='ibverbs' , paths=[top+ibverbs_lib_path] )
+ check_ibverbs_deps(bld)
for obj in build_types:
build_type(bld,obj);