Changeset 31111c7


Ignore:
Timestamp:
07/03/18 19:54:56 (2 years ago)
Author:
Richard Sanger <rsanger@…>
Branches:
cachetimestamps, develop, master, ringdecrementfix, ringperformance
Children:
30bf197, 442fbd6, dd48bb5
Parents:
bbe691b
git-author:
Richard Sanger <rsanger@…> (07/03/18 19:41:03)
git-committer:
Richard Sanger <rsanger@…> (07/03/18 19:54:56)
Message:

Fixes building DPDK with system dpdk-dev packages

Now these packages have settled this is a simple check.
Libtrace with DPDK now builds with dpdk-dev from:
Ubuntu 16.04 (xenial), 17.10 (artful), 18.04(bionic), 18.10(cosmic)
Debian 8 (jessie), 9 (stretch), 10 (buster)

Building with system packages requires installing dpdk-dev and
running ./configure with the --with-dpdk option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    rbbe691b r31111c7  
    412412                AC_CHECK_FILE("$RTE_SDK/$RTE_TARGET/lib/libdpdk.so", dpdk_found="dpdk", dpdk_found=0)
    413413        fi
     414        if test "$dpdk_found" = 0 -a "$RTE_SDK" != ""; then
     415                AC_CHECK_LIB(dpdk, rte_eth_dev_configure, dpdk_found="dpdk", dpdk_found=0)
     416        fi
    414417        if test "$dpdk_found" != 0 -a "$RTE_SDK" != ""; then
    415418                # Save these now so that they can be re-exported later
     
    424427                AC_MSG_NOTICE([No RTE_SDK given, checking for system dpdk-dev package])
    425428                # Search the system, maybe it is installed? Ethdev is one of the main libraries
    426                 AC_CHECK_LIB(ethdev, rte_eth_dev_configure, dpdk_found="system", dpdk_found=0)
     429                # On Ubuntu and Debian we can simply check for dpdk.so
     430                AC_CHECK_LIB(dpdk, rte_eth_dev_configure, dpdk_found="system", dpdk_found=0)
    427431                # We also need to check that rte.vars.mk is installed from dpdk-dev (as well as libdpdk-dev)
    428432                if test "$dpdk_found" != 0 -a -e /usr/share/dpdk/mk/rte.vars.mk ; then
    429                         RTE_TARGET="x86_64-default-linuxapp-gcc"
     433                        RTE_TARGET="$(uname -m)-default-linuxapp-gcc"
    430434                        RTE_SDK="/usr/share/dpdk/"
    431435                        RTE_INCLUDE="/usr/include/dpdk"
     
    433437                        AC_SUBST([RTE_SDK])
    434438                        AC_SUBST([RTE_INCLUDE])
    435                         # include libethdev this is part of DPDK
    436                         LIBTRACE_LIBS="$LIBTRACE_LIBS -lethdev"
    437                         # Include all rte libs note we need to escape '[' and ']'
    438                         LIBTRACE_LIBS="$LIBTRACE_LIBS $(ldconfig -p | sed 's/.*lib\([[^.]]*\).*/-l\1/' | grep rte_ | tr '\n' ' ')"
     439                        LIBTRACE_LIBS="$LIBTRACE_LIBS -ldpdk"
    439440                        AC_MSG_NOTICE([Building against system DPDK])
    440441
    441442                        AC_DEFINE(HAVE_DPDK,1,[conditional for building with DPDK live capture support])
    442443                        libtrace_dpdk=true
     444                        dpdk_found=system
    443445                fi
    444446        fi
Note: See TracChangeset for help on using the changeset viewer.