From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2B3CA00BE for ; Wed, 27 Apr 2022 19:22:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85E9340E78; Wed, 27 Apr 2022 19:22:46 +0200 (CEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id B57EE40691 for ; Wed, 27 Apr 2022 19:22:44 +0200 (CEST) Received: by mail-lf1-f41.google.com with SMTP id g19so4378569lfv.2 for ; Wed, 27 Apr 2022 10:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=G/sCdaFT9Fi+ZqvS6SPyiZhns+abEeThTuGb5zOv41U=; b=LFYjkrtA9b7U8rewdST1HUD/JaTG8Dp75RiPJkpiDxH3owxylzKAkpKcrKWO/zM1aK viWwuUjTqYAXIVZJsoIWaXZAwvNHOALuQBesZGnlXUorxjdipm6tbLfsT/1Kq3gzF11j bvP/x6wz/WCxr2WpvVqqmjSbwLO+RB3R9ygfcTmJcg4BX52UI/zfwG9gUI/qFslDjP+Q FWu36jU8Lt+jBFqNwWdcNyUftTRcO7Fzku+hZ2+epgxy+e++41+9KcxARoQyS//zVvYF OB4c4tpcPF4/fIF7FhRKSKC5lIg9jlD+1/B607oTRLCau8cyWNqHKc3jmjFxbaJM1jPM ksDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=G/sCdaFT9Fi+ZqvS6SPyiZhns+abEeThTuGb5zOv41U=; b=094XogldqLBMS4P9/MB3Zhhs6pSXehzYHG5UHChI14JapaMyw8RhKxKeIc5sv2eTow xDmorrRSqLWdYyjMxeL+9K+MnNyFC3TC/TGvFzQEIWNWCkUfxU19kj2hkc7UOigC3zbw t+hTsIXxsSCjji8s8DxddkYNCuFHUeLO9SWAJ7bMqsWuem5o08cTJ6keGhWFpzKAQdav htr/bl3K17c42BjJoD8xpFZJvXhkf9L2jpKBHdHXBOlb7JUIZ3SzUb0a6e9fqY05JTFT 51+9mWFzftwBnSKrWmJEbVpiQxj4K1jxFY+1tjMFO1H8LrnK+5CE9ukOuuUFg7kB30GK 7VmQ== X-Gm-Message-State: AOAM530vlS8kz86cpKfr1MJ+fwhHCrv+40dP6ikMTLLROXNNrPockX3O UuNoBf67F5f5bWVCjk7d8TYUsKuSkElrdpUyMTIj/QzPk9A= X-Google-Smtp-Source: ABdhPJz2tj7bzGqQVIltnJ+h8rQ9l4+mLlzyVfUkKH/hKFiaPTGbIYPF8nC/YyHfk08rqvZiuzz4hiBmkkWOtAqm7AM= X-Received: by 2002:a05:6512:2145:b0:472:82f:2520 with SMTP id s5-20020a056512214500b00472082f2520mr11409959lfr.325.1651080163611; Wed, 27 Apr 2022 10:22:43 -0700 (PDT) MIME-Version: 1.0 From: Stefan Puiu Date: Wed, 27 Apr 2022 20:22:32 +0300 Message-ID: Subject: question on packaging DPDK 21.11 in RPM (elftools not found) To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hi, We're using a CentOS 7 based distro that is obviously RPM-based, and we package the DPDK with it. Now, we currently have DPDK 20.11 and are looking to upgrade to 21.11, and I'm hitting a build error about elftools not being found: Program python3 found: YES (/usr/bin/python3) ../buildtools/meson.build:49:8: ERROR: Problem encountered: missing python module: elftools The fix seems to be to install pyelftools from pip: pip3 install pyelftools But that only works for building directly with meson / ninja. That doesn't work when building through rpmbuild. I've struggled to understand this, until I found this RedHat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1937494. It seems Fedora changed the python3 search path so that /usr/local/lib/python is not taken into account if RPM_BUILD_ROOT is defined (see https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe); so basically, when building with rpmbuild, pip-installed packages are ignored. I think I can understand the rationale of the Fedora change when you want to ensure that dependencies are properly set: packages installed using pip are not recorded as RPM dependencies, and the package might break at runtime. However, as far as I can tell, pyelftools seems to be a build-time dependency, the pmdinfogen script needs pyelftools to be able to *run*, and the said script is called when building any driver, as far as I can tell. There's no pyelftools RPM for CentOS 7 that I could find, so I don't see another option than installing it from pip. Also, the python change in Fedora doesn't seem to allow for any workaround. The only thing that I can think of is ugly as hell: symlink everything under /usr/local/python in /usr/lib/python for the DPDK build. I'm not even sure we need pyelftools at runtime; in our build of DPDK-20.11, dpdk-pmdinfo.py doesn't even run (because of missing pyelftools :) ). Are there any other people struggling with this? Is there any more elegant approach that I haven't thought of? Thanks, Stefan.