From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8D1B8A04B1 for ; Tue, 24 Nov 2020 16:14:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ADEEFC934; Tue, 24 Nov 2020 16:14:31 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id EBFEFC92E for ; Tue, 24 Nov 2020 16:14:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606230869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AbwrugNtaoeN4ZUzGCyK28CdQfb/O8RhVwKYhE+H1vM=; b=fXsD5fGr45itHW21u97HWCDOh6Ta9/qP0xKQZSM87SlpBaJxrZlXgPIZFREx/rvPnBDwC1 gNNpNmq42A1IfuTfdGfGNTLEhzILPNguoDyOs+56XD6edc7FADAg4GnYPGvr1g+1aCq6p+ rH007WrtNDZoGCXe+l3HgZ+WMBKAoyg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-qvnwdN-pN4alCNduRHKHDg-1; Tue, 24 Nov 2020 10:14:27 -0500 X-MC-Unique: qvnwdN-pN4alCNduRHKHDg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E70C1018BD2; Tue, 24 Nov 2020 15:14:26 +0000 (UTC) Received: from localhost.localdomain (dhcp19-189-130.ntdv.lab.eng.bos.redhat.com [10.19.189.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 29C1960864; Tue, 24 Nov 2020 15:14:24 +0000 (UTC) From: Timothy Redaelli To: Anatoly Burakov Cc: bruce.richardson@intel.com, dev@dpdk.org, stable@dpdk.org Date: Tue, 24 Nov 2020 16:14:14 +0100 Message-Id: <1bbaefeb069a75f57a2f49b4217efa994bed5d4b.1606229937.git.tredaelli@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=tredaelli@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" Subject: [dpdk-stable] [PATCH 1/2] eal: fix shared lib mode detection X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Message-ID: <20201124151414.yRZzoVtyQMRubR6_zbBYkC3O5htZZJgHLjXhgsIQneQ@z> Commit 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") introduced a check that enabled shared lib mode when librte_eal.so can be loaded, but it can't work, at least, on Fedora/CentOS/RHEL since .so symlinks are not installed when you install dpdk package, but only when you install dpdk-devel package. This commit uses librte_eal.so.ABI_VERSION to check for shared lib, since it exists on any linux distributions. See Fedora Packaging Guidelines for more informations: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages Fixes: 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") Cc: bruce.richardson@intel.com Cc: stable@dpdk.org Signed-off-by: Timothy Redaelli --- lib/librte_eal/common/eal_common_options.c | 3 ++- lib/librte_eal/common/meson.build | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index fc6f0cea93..e6f77ad217 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -503,7 +503,8 @@ eal_plugins_init(void) * (Using dlopen with NOLOAD flag on EAL, will return NULL if the EAL * shared library is not already loaded i.e. it's statically linked.) */ - if (dlopen("librte_eal.so", RTLD_LAZY | RTLD_NOLOAD) != NULL && + if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY | RTLD_NOLOAD) + != NULL && *default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 && S_ISDIR(sb.st_mode)) diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 9f32262450..39abf7a0a4 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -3,6 +3,8 @@ includes += include_directories('.') +cflags += [ '-DABI_VERSION="@0@"'.format(abi_version) ] + if is_windows sources += files( 'eal_common_bus.c', -- 2.28.0