[ovs-dev] [PATCH v2 1/2] acinclude.m4: fix build with dpdk 1.6.0r2

Ben Pfaff blp at nicira.com
Sat May 10 00:23:56 UTC 2014

On Fri, May 09, 2014 at 04:56:57PM -0700, Daniele Di Proietto wrote:
> libintel_dpdk.a refuses to link with libopenvswitch unless -ldl is used
> Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
> ---
> This could probably be fixed also by using -Wl,-whole-archive
> Besides, it looks like a workaround, so if anyone has a better
> solution, that'd be great

It's a little weird that DPDK needs an explicit .a on the link command
line.  Any reason we can't just require the user to add the right -L to
bring in the .a file's directory, then do:

        AC_SEARCH_LIBS([...some dpdk function...], [intel_dpdk])

instead of the hard-coded path.

And if -ldl is needed sometimes, then you could just iterate:

        for extras in "" "-ldl "; do
            AC_SEARCH_LIBS([...some dpdk function...], [intel_dpdk], [found=:])
            if $found; then
                LIBS="-lintel_dpdk $extras$LIBS"
        if $found; then :; else
            AC_MSG_FAILURE([are you sure dpdk is installed?])

(Above not actually tested)

More information about the dev mailing list