From patchwork Sun Sep 27 21:47:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 78920 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B879FA04BC; Sun, 27 Sep 2020 23:48:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C01A1D5EA; Sun, 27 Sep 2020 23:47:45 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by dpdk.org (Postfix) with ESMTP id AC7461D593 for ; Sun, 27 Sep 2020 23:47:43 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id 77so8853346lfj.0 for ; Sun, 27 Sep 2020 14:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QTMbHxkwa4pKq+BNMj0fLMATTrb29VVvvho/xPUHhaI=; b=aV3g9nT1T2p6OjcKchAJ7W2aoum8B7NEl65NRItD+qdOwnJmLLtDIptN5ShCY2XkGX k5AaXHH5TA65JCS6MRYwtQR+fvCjmx+8Q1ovq/TEFe84xIZ2gC1Ui/LwABqdAVb6X57h QGc7kSQGOQFYqt94Hr4Rp/GAjSLVbaV/Ax3pfOkqCN+NGjZAumOqtWtNbKVVws8lFtKf Hoi6diUJxMkNHsVRBWP1Bz3Tl+q0QnfmKf69lVU3j1wTJ6RfvCUudPIOLXSIaDT7IsF0 rFOCpewNbhWsM1H4yE0iEeEgwH0Eag4fjR5Y8h5zUi07uChnVQVsDQIzoWFdfGAgoMdq 3BTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QTMbHxkwa4pKq+BNMj0fLMATTrb29VVvvho/xPUHhaI=; b=Ow0+N2uVjvL1bYGExYGBMUi5rtusjXV7jMSNfnWkWnmr6TXT3C3aXYuCIy4WpExLze L0LGIDyUfpHYrB18PyywhYG65BcY8QWLQNaKx8rBa7hjyCb/kbEf+THHVztEmhgJ+lAJ pk4EGsH4IhSwmFHUMxp7CUNEZhwSuDfckZM8SYb46BvwccmmXhXDz4Ju1yRNgzH7HaLF l3HLw7Fj3yUtefDIy7cooFGJtGxB5TdbmX7FVTuKU3CauXWk+I5gRfovQrjZ9f8RsjFJ qALyv8T+DrzGx3hLwTCGOmk3vpUa1G8zWeCEiene9Ac5fQGndAmUJ5Jz1lvry3TZaQgG X3Kw== X-Gm-Message-State: AOAM530Wr5I1nZtqIBIlzwOrdnPhACTg8/cX9L6Tcw+LEdE3QrQf1OLJ Bzo+qlSIg9XiGs2rxarBF77L8dOJYt7OwDdO X-Google-Smtp-Source: ABdhPJyDnriMATEKgEFN7Y30IUxgE0ukbsDnQNRgFUYvYMg7XZ0P4xhRP70ZxbYW6BP4rC4jS6koeg== X-Received: by 2002:ac2:5463:: with SMTP id e3mr2833381lfn.474.1601243261952; Sun, 27 Sep 2020 14:47:41 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u20sm2559435lfo.156.2020.09.27.14.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 14:47:41 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Aaron Conole , Michael Santana , Bruce Richardson , John McNamara , Marko Kovacevic Date: Mon, 28 Sep 2020 00:47:31 +0300 Message-Id: <20200927214732.12783-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200927214732.12783-1-dmitry.kozliuk@gmail.com> References: <20200708212335.25338-1-dmitry.kozliuk@gmail.com> <20200927214732.12783-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v5 2/3] build: use Python pmdinfogen X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Like for other build scripts, use Python interpreter to run pmdinfogen. Adjust wrapper script accordingly and also don't suppress stderr from ar and pmdinfogen. Add python3-pyelftools to CI configuration. The package is available on all major distributions. FreeBSD has no system requirements section in its GSG. Currently neither Windows uses pmdinfogen, nor is COFF (PE) supported. Signed-off-by: Dmitry Kozlyuk --- .travis.yml | 2 +- buildtools/gen-pmdinfo-cfile.sh | 6 +++--- buildtools/meson.build | 1 + doc/guides/linux_gsg/sys_reqs.rst | 6 ++++++ drivers/meson.build | 2 +- meson.build | 1 - 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6eeab371..226db7590 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ addons: apt: update: true packages: &required_packages - - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, ninja-build] + - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, python3-pyelftools, ninja-build] - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson-dev] _aarch64_packages: &aarch64_packages diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh index 43059cf36..109ee461e 100755 --- a/buildtools/gen-pmdinfo-cfile.sh +++ b/buildtools/gen-pmdinfo-cfile.sh @@ -4,11 +4,11 @@ arfile=$1 output=$2 -pmdinfogen=$3 +shift 2 +pmdinfogen=$* # The generated file must not be empty if compiled in pedantic mode echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output for ofile in `ar t $arfile` ; do - ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null + ar p $arfile $ofile | $pmdinfogen - - >> $output done -exit 0 diff --git a/buildtools/meson.build b/buildtools/meson.build index 04808dabc..3a64b28b7 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -17,3 +17,4 @@ else endif map_to_win_cmd = py3 + files('map_to_win.py') sphinx_wrapper = py3 + files('call-sphinx-build.py') +pmdinfogen = py3 + files('pmdinfogen.py') diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index 6b9f573fc..200212081 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -56,6 +56,12 @@ Compilation of the DPDK * If the packaged version is below the minimum version, the latest versions can be installed from Python's "pip" repository: ``pip3 install meson ninja`` +* ``pyelftools`` (version 0.22+) + + * For RHEL/Fedora systems it can be installed using ``dnf install python-pyelftools`` + + * For Ubuntu/Debian it can be installed using ``apt install python3-pyelftools`` + * Library for handling NUMA (Non Uniform Memory Access). * ``numactl-devel`` in RHEL/Fedora; diff --git a/drivers/meson.build b/drivers/meson.build index 5f9526557..88364259d 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -137,7 +137,7 @@ foreach subpath:subdirs command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], output: out_filename, - depends: [pmdinfogen, tmp_lib]) + depends: [tmp_lib]) endif # now build the static driver diff --git a/meson.build b/meson.build index 61d9a4f5f..a6e8c09c2 100644 --- a/meson.build +++ b/meson.build @@ -45,7 +45,6 @@ subdir('buildtools') subdir('config') # build libs and drivers -subdir('buildtools/pmdinfogen') subdir('lib') subdir('drivers')