From patchwork Mon Jan 22 16:00:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125443 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1232807ljf; Mon, 22 Jan 2018 08:05:20 -0800 (PST) X-Google-Smtp-Source: AH8x224CbNhptEiASWLdccA+Mf2qA18tl/hZy5BY4arwg9pDnJT+cXPzo66wSFTcJdUUoahE62PK X-Received: by 10.55.222.19 with SMTP id h19mr1996768qkj.0.1516637120549; Mon, 22 Jan 2018 08:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516637120; cv=none; d=google.com; s=arc-20160816; b=ShSHwxdwznsrLpBEsU3FeNAoA7y7MutQh59hVX4kc3xAgrUQizCtxirY/U9D9zJAeF zU2/k5m1u9Un6UspALK/SoSucIfWEZC1xOLsKgdb7WQC16UkdFs5ft1kKz3/v2+2UeAS Qxf9GUZNEEau+d+ILq937mt1bIn5czw1TyoIxwL+TCDAShpQ2rRfUlx5fHwjF110XN/A Oijx46fVc2vVEY+23dXrw0Az/Uzlp35Ys6cvAw4f75oFq8vRp1YuDqoLFFw0v16mAI5D PbGUtJccEH9YB9BhjwlmJOTO0noDIEZwWjwQ0J/Jh15hW2+7VbxWbFO59GuYjOSoJOAv 2HpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=UFOihAT1DY9f7rOfYxGwulc1UYliezKgKJYKFENdAuQ=; b=ldS8CRWUrulyJ63lMqBl2sWcZTrLCZrBQ5yZ7LNn4bH++yLqP33GQdxA3LSFBbizT3 MUMbMfRG61R+bgU0tSFwcN/CwXZpDNjgyHdDzy1kgkqARy1Hem26hAI957+L0BmFPWVt kQgbY5NEY9H4cOwtTp8orahd3307pBuZGHsYYHyD1sPZo3TLvsx1k3FULJ8W4lyTi0X2 AsnVC8KFdM/M3Yx+YXUZSQbgX2uiZkHr8cyPVpaySk46AhL4SoeH0LlNGhcrKfKqd7BT zfEUo3x4FY2aNPMBXtbpZgUd2NnoK+UmpM4QhS9Qr2C/aRy6AIhoblk7PPT3H7hH+1an xtxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id d205si1538465qkc.60.2018.01.22.08.05.20; Mon, 22 Jan 2018 08:05:20 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1992C617CC; Mon, 22 Jan 2018 16:05:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9D82B618E4; Mon, 22 Jan 2018 16:01:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AB05861741; Mon, 22 Jan 2018 16:01:10 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 43A73617DB for ; Mon, 22 Jan 2018 16:00:24 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 1A83A182D8D for ; Mon, 22 Jan 2018 19:00:23 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id X5hfQcUgZA-0Nda2D7a; Mon, 22 Jan 2018 19:00:23 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Zz0EDOp1oY-0M0iwPVi; Mon, 22 Jan 2018 19:00:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 Jan 2018 19:00:19 +0300 Message-Id: <1516636822-25091-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> References: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 416 Subject: [lng-odp] [PATCH v1 1/4] travis: move --with-dpdk-path out of DPDK build if X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov 1b285bbd (travis: also use DPDK when doing cross-compile tests) moved adding --with-dpdk-path to EXTRA_CONF to be executed under DPDK-building if. Move it outside of that if, so that DPDK is enabled even if it's prebuilt. Fixes: 1b285bbdd1abbec9853e1bc51bdb6ee02643b1a7 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 416 (lumag:trav-dpdk-shared) ** https://github.com/Linaro/odp/pull/416 ** Patch: https://github.com/Linaro/odp/pull/416.patch ** Base sha: 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 ** Merge commit sha: 03435fd2ad14f3faf8bb7e41c71ef9fc054b8662 **/ .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14bc1b143..f3babf359 100644 --- a/.travis.yml +++ b/.travis.yml @@ -206,7 +206,8 @@ install: ;; esac - | - if [ -n "$TARGET" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then + if [ -n "$TARGET" ] ; then + if [ ! -f "dpdk/${TARGET}/lib/libdpdk.a" ] ; then git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk pushd dpdk git log --oneline --decorate @@ -230,7 +231,8 @@ install: make install T=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" rm -r ./doc ./${TARGET}/app ./${TARGET}/build popd - EXTRA_CONF="$EXTRA_CONF --with-dpdk-path=`pwd`/dpdk/${TARGET}" + fi + EXTRA_CONF="$EXTRA_CONF --with-dpdk-path=`pwd`/dpdk/${TARGET}" fi # Netmap pktio From patchwork Mon Jan 22 16:00:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125444 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1232944ljf; Mon, 22 Jan 2018 08:05:36 -0800 (PST) X-Google-Smtp-Source: AH8x225fcTCY/ZUunbLpd9Sh9HKQRzzBXZT1+l3FMoX2xwHEsM49h7+LzvQlA9nX2ihPNYbxMGWZ X-Received: by 10.200.27.135 with SMTP id z7mr11868810qtj.58.1516637136094; Mon, 22 Jan 2018 08:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516637136; cv=none; d=google.com; s=arc-20160816; b=dwoPVPrUgK07ZWBN5WEInBWLIvUyVT3lFvD1+z1V7+K3bMDpanKtDs04iWIyXyIccU n642HSVZ7Pmt4qfchyFfJkPM9/sQ1e3vG9oSJBZTKOCe8C3CKdWq1ANsayl45W6+YYcA rfK5lg3Y92hELe2zeka3V5NrpgagYHnq0qHhXn6w7ZbmwoQ5fpZG8bIiA6nQFnLlz7MD NWD8Dr+ic2cqAxjoPnJx/mETc9btl9lL2NWQQ29TkF1pt9iWi5nA6kGT9/39uIXRElD2 HunU33MYQlC96OnGGXaGt7OwdkuTF5fC5K+Iz2H24vU9tQDbhssdk6/ojc6JL1uyAUoU keBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=tDo46I8IG7vZBD9vPI3rNhu6d8PF+Uom9WGNeY7oicU=; b=TZUHAMmZW0JXn3NTVnzXZk4BqHCJJ7JlA7+489ixZJYwhXS8597GVdwhkQUCZvmbPJ lg7Xlyiu4rW7/aKVyw2zYqX5kGrLMgmCSROfW6GkxOuUGCFDk1MJKb8RdO6mgUywzOVt bi1yPNpqZgW0u8SWU364GCN7koE4wB+CleX2l7WqVKY4AvfKQZ8sxejZhJjVx9Z2XD16 ZfUTMwjn+4GvgyCgKUCbt5fKsx/PDnFvRb/fnCZaS2zBdswPUGoLk6m9q4aSwp6s3Qn3 bLTuBodRN5/jk+rMbQZE7qgrCqz5kSMOrMpPDRHUXvO5F2XQRyOooLK0oVtS+ifUsYtn oo1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id w125si15549758qkb.384.2018.01.22.08.05.35; Mon, 22 Jan 2018 08:05:36 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 991A2617E6; Mon, 22 Jan 2018 16:05:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0EB316276F; Mon, 22 Jan 2018 16:01:24 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1C7AA617DB; Mon, 22 Jan 2018 16:01:11 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id A96EE617DD for ; Mon, 22 Jan 2018 16:00:24 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward103p.mail.yandex.net (Yandex) with ESMTP id AFCFD21833CA for ; Mon, 22 Jan 2018 19:00:23 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id j6WYiff0Ug-0N0W936V; Mon, 22 Jan 2018 19:00:23 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Zz0EDOp1oY-0N0WFm7Q; Mon, 22 Jan 2018 19:00:23 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 Jan 2018 19:00:20 +0300 Message-Id: <1516636822-25091-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> References: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 416 Subject: [lng-odp] [PATCH v1 2/4] build: another fix for linking with shared libdpdk X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 416 (lumag:trav-dpdk-shared) ** https://github.com/Linaro/odp/pull/416 ** Patch: https://github.com/Linaro/odp/pull/416.patch ** Base sha: 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 ** Merge commit sha: 03435fd2ad14f3faf8bb7e41c71ef9fc054b8662 **/ m4/odp_dpdk.m4 | 21 +++++++++++++++------ platform/linux-generic/Makefile.am | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index 1887b0431..81ace08a9 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -17,18 +17,29 @@ AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) # _ODP_DPDK_SET_LIBS # -------------------- -# Set DPDK_LIBS/DPDK_LIBS_LT depending on DPDK setup +# Set DPDK_LIBS/DPDK_LIBS_LT/DPDK_LIBS_LIBODP depending on DPDK setup AC_DEFUN([_ODP_DPDK_SET_LIBS], [dnl AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl - DPDK_LIBS_LT="" + # applications don't need to be linked to anything, just rpath + DPDK_LIBS_LT="$DPDK_RPATH_LT" + # static linking flags will need -ldpdk + DPDK_LIBS="-Wl,--no-as-needed,-ldpdk,--as-needed,`echo $DPDK_LIBS | sed -e 's/ /,/g'`" DPDK_LIBS="$DPDK_LDFLAGS $DPDK_RPATH $DPDK_LIBS" + # link libodp-linux with -ldpdk + DPDK_LIBS_LIBODP="$DPDK_LIBS" ], [dnl ODP_DPDK_PMDS([$DPDK_PMD_PATH]) + # build long list of libraries for applications, which should not be + # rearranged by libtool DPDK_LIBS_LT="`echo $DPDK_LIBS | sed -e 's/^/-Wc,/' -e 's/ /,/g'`" DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS_LT $DPDK_LIBS" + # static linking flags follow the suite DPDK_LIBS="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" + # link libodp-linux with libtool linking flags + DPDK_LIBS_LIBODP="$DPDK_LIBS_LT" ]) AC_SUBST([DPDK_LIBS]) +AC_SUBST([DPDK_LIBS_LIBODP]) AC_SUBST([DPDK_LIBS_LT]) ]) @@ -99,7 +110,6 @@ AC_DEFUN([ODP_DPDK], [dnl AS_IF([test "x$1" = "xsystem"], [dnl DPDK_CPPFLAGS="-isystem/usr/include/dpdk" DPDK_LDFLAGS="" - DPDK_RPATH="" DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.so`" if test "x$DPDK_LIB_PATH" = "x" ; then DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.a`" @@ -115,10 +125,9 @@ AS_IF([test "x$1" = "xsystem"], [dnl DPDK_LDFLAGS="-L$DPDK_LIB_PATH" DPDK_PMD_PATH="$DPDK_LIB_PATH" if test -r "$DPDK_LIB_PATH"/libdpdk.so ; then - DPDK_RPATH="-R$DPDK_LIB_PATH" + DPDK_RPATH="-Wl,-rpath,$DPDK_LIB_PATH" + DPDK_RPATH_LT="-R$DPDK_LIB_PATH" DPDK_SHARED=yes - else - DPDK_RPATH= fi ]) _ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [$2], [$3]) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 8585080df..3e38489f6 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -272,7 +272,7 @@ endif __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS) __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS) -__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS_LT) +__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS_LIBODP) __LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) __LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS) From patchwork Mon Jan 22 16:00:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125442 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1232085ljf; Mon, 22 Jan 2018 08:03:56 -0800 (PST) X-Google-Smtp-Source: AH8x224vw6WSkaHFe5j2yP3hls3gVBalCQk7UpObBWfazr3bZ+GoROpEI7AE1m02UA+WewAmYj3f X-Received: by 10.129.93.139 with SMTP id r133mr7991588ywb.422.1516637036559; Mon, 22 Jan 2018 08:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516637036; cv=none; d=google.com; s=arc-20160816; b=t8Jo+ArcostFNf8pIjcIXd8Z25z+fdaVlG4cye2C/nrDDbGfd2AgbXVip2aWA4ILHG xMYHkIMbtJ/z4ahQWQC9b9sb30FcwT+Y2SmLhX87hDfFHvnADnPfS4PuQGvDpOLlaHoT Rg2hx9zGROVqbej+Q7ApgzW8ugXjZen4ITK2a/Poo73wBpcV4rJji+Wr2J+lk8EtynDa zQaoBPwzRqqSN79hmIS+jVkHIyRHz6qqvEIozSBxQSpmn7lCaBkXKSliCc11Da8e2KZE uBaCQuiKgBB/A6VMNh9ew7PJeSZcOHTaqbPIvBhCzf1smg/AQScS+deF6xoKahSP41AZ BroQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=OmMzKIACCoRb0LwW16UzSlh++esv1D1qmJyUmdp8IVI=; b=hWxFpH/I6/7rSOQqsfF4T/+27UNtK2wktAj+b8xVafeQAcSxX2M+QnD5U4MqVkxRPv WuiY0dNRhuShamt/1Z4JHY3l04L/iaHqf3olUuNMgSXje7Q6dsuEoFtwyGf8K2BWfO0l qZwgPk1MffloL57Sz7LMYXaU4OaOg2/F1bnxZi29zkiXLMzDJwndTMAuz7LQiIT5uwEy JUJm2DCLU7G3Qb+pS31iYWA6931dmwaGdraHEzzGg2yp5r3BIu3X5oxX0f/nCwev9iJb N5fHDjapASW9CfScCSlj6XIp57Wa2jcelw3C4yLlpJ7GbtoSz7s+ciy0gNVzF2kcwp8q pLHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id j44si680688qtj.359.2018.01.22.08.03.56; Mon, 22 Jan 2018 08:03:56 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 4101B62776; Mon, 22 Jan 2018 16:03:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1AF80617DB; Mon, 22 Jan 2018 16:01:13 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 71128617F5; Mon, 22 Jan 2018 16:01:08 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 25DCA617DE for ; Mon, 22 Jan 2018 16:00:26 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward105j.mail.yandex.net (Yandex) with ESMTP id B4A91183655 for ; Mon, 22 Jan 2018 19:00:24 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5mvQdYFMxJ-0OIOR5ej; Mon, 22 Jan 2018 19:00:24 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Zz0EDOp1oY-0O0CECio; Mon, 22 Jan 2018 19:00:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 Jan 2018 19:00:22 +0300 Message-Id: <1516636822-25091-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> References: <1516636822-25091-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 416 Subject: [lng-odp] [PATCH v1 4/4] travis: test ODP with shared DPDK X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Add testcase compiling and running ODP with shared DPDK lib Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 416 (lumag:trav-dpdk-shared) ** https://github.com/Linaro/odp/pull/416 ** Patch: https://github.com/Linaro/odp/pull/416.patch ** Base sha: 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 ** Merge commit sha: 03435fd2ad14f3faf8bb7e41c71ef9fc054b8662 **/ .travis.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3babf359..f957ba36e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,6 +75,7 @@ env: - CONF="--enable-schedule-scalable" - CONF="--enable-dpdk-zero-copy" - CONF="--disable-static-applications" + - DPDK_SHARED="y" CONF="--disable-static-applications" - CROSS_ARCH="arm64" - CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" - CROSS_ARCH="powerpc" @@ -207,7 +208,14 @@ install: esac - | if [ -n "$TARGET" ] ; then - if [ ! -f "dpdk/${TARGET}/lib/libdpdk.a" ] ; then + # force DPDK rebuild if it does not match shared/non-shared requirement + if [ -n "$DPDK_SHARED" -a ! -f "dpdk/${TARGET}/lib/libdpdk.so" ] ; then + rm -rf dpdk/"$TARGET" + fi + if [ -z "$DPDK_SHARED" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ] ; then + rm -rf dpdk/"$TARGET" + fi + if [ ! -f "dpdk/${TARGET}/lib/libdpdk.a" -a ! -f "dpdk/${TARGET}/lib/libdpdk.so" ]; then git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk pushd dpdk git log --oneline --decorate @@ -223,6 +231,11 @@ install: if test -n "${DPDK_MACHINE}" ; then sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"'${DPDK_MACHINE}'",' .config fi + if test -n "${DPDK_SHARED}" ; then + sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' .config + export LD_LIBRARY_PATH="`pwd`/${TARGET}:$LD_LIBRARY_PATH" + echo $LD_LIBRARY_PATH + fi if test -n "$CROSS_ARCH" ; then sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config @@ -267,11 +280,17 @@ script: - pushd $HOME - echo "Dynamic link.." - ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux` - - echo "Static link.." - - ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_static `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static - if [ -z "$CROSS_ARCH" ] ; then - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst_dynamic ; - ./odp_hello_inst_static ; + LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst_dynamic ; + fi + - echo "Static link.." + - | + # it is not possible to do static linking if we only have shared DPDK library. Compiler complains about missing -ldpdk + if [ -z "$TARGET" -o -z "$DPDK_SHARED" ] ; then + ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_static `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static || exit 1 + if [ -z "$CROSS_ARCH" ] ; then + ./odp_hello_inst_static || exit 1; + fi fi - popd - ccache -s