diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh index 9826c6ae3..42985e855 100644 --- a/buildtools/symlink-drivers-solibs.sh +++ b/buildtools/symlink-drivers-solibs.sh @@ -7,6 +7,7 @@ # others, e.g. PCI device PMDs depending on the PCI bus driver. # parameters to script are paths relative to install prefix: -# 1. directory containing driver files e.g. lib64/dpdk/drivers -# 2. directory for installed regular libs e.g. lib64 -ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2 +# 1. directory for installed regular libs e.g. lib64 +# 2. subdirectory of libdir where the pmds are + +cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* . diff --git a/config/meson.build b/config/meson.build index f8aded6ed..3678348de 100644 --- a/config/meson.build +++ b/config/meson.build @@ -42,6 +42,13 @@ endif driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt) eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) +# driver .so files often depend upon the bus drivers for their connect bus, +# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need +# to be in the library path, so symlink the drivers from the main lib directory. +meson.add_install_script('../buildtools/symlink-drivers-solibs.sh', + get_option('libdir'), + pmd_subdir_opt) + # set the machine type and cflags for it if meson.is_cross_build() machine = host_machine.cpu() diff --git a/meson.build b/meson.build index a96486597..d1e8e5239 100644 --- a/meson.build +++ b/meson.build @@ -63,13 +63,6 @@ configure_file(output: build_cfg, # them. dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive'] -# driver .so files often depend upon the bus drivers for their connect bus, -# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need -# to be in the library path, so symlink the drivers from the main lib directory. -meson.add_install_script('buildtools/symlink-drivers-solibs.sh', - driver_install_path, - get_option('libdir')) - pkg = import('pkgconfig') pkg.generate(name: meson.project_name(), filebase: 'lib' + meson.project_name().to_lower(),