DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: fix EAL path to drivers for static builds
@ 2017-10-17 16:41 Bruce Richardson
  2017-10-23 10:32 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:41 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

For static builds, even though the drivers are installed in the lib folder
that does not mean that that folder should be set as the EAL driver search
path. If it is, EAL will try loading all shared libraries as drivers and
fail to start. Instead, track the EAL driver path separately from the
driver install path, allowing static builds to have an empty driver path
by default.

Fixes: d8b85d98b3f7 ("build: add initial infrastructure for meson & ninja builds")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

----
NOTE: on apply will be merged into offending commit in next-build tree.
---
 config/meson.build | 3 +--
 meson.build        | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index ce26a29f0..8e4a703c7 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -71,8 +71,7 @@ endif
 dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
 
 # set the install path for the drivers
-dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', join_paths(
-		get_option('prefix'), driver_install_path))
+dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
 
 # set other values pulled from the build options
 dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
diff --git a/meson.build b/meson.build
index e3d40ac38..4af057615 100644
--- a/meson.build
+++ b/meson.build
@@ -47,8 +47,10 @@ dpdk_extra_ldflags = []
 # for shared libs, put them in a driver folder
 if get_option('default_library') == 'static'
 	driver_install_path = get_option('libdir')
+	eal_pmd_path = ''
 else
 	driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers')
+	eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 endif
 
 # configure the build, and make sure configs here and in config folder are
-- 
2.13.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix EAL path to drivers for static builds
  2017-10-17 16:41 [dpdk-dev] [PATCH] build: fix EAL path to drivers for static builds Bruce Richardson
@ 2017-10-23 10:32 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2017-10-23 10:32 UTC (permalink / raw)
  To: dev

On Tue, Oct 17, 2017 at 05:41:02PM +0100, Bruce Richardson wrote:
> For static builds, even though the drivers are installed in the lib folder
> that does not mean that that folder should be set as the EAL driver search
> path. If it is, EAL will try loading all shared libraries as drivers and
> fail to start. Instead, track the EAL driver path separately from the
> driver install path, allowing static builds to have an empty driver path
> by default.
> 
> Fixes: d8b85d98b3f7 ("build: add initial infrastructure for meson & ninja builds")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> ----
> NOTE: on apply will be merged into offending commit in next-build tree.
> ---
>  config/meson.build | 3 +--
>  meson.build        | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)

Applied and squashed to commit on dpdk-next-build

/Bruce

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-23 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 16:41 [dpdk-dev] [PATCH] build: fix EAL path to drivers for static builds Bruce Richardson
2017-10-23 10:32 ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).