[ovs-dev] [PATCH v2 1/2] acinclude.m4: fix build with dpdk 1.6.0r2
Daniele Di Proietto
ddiproietto at vmware.com
Mon May 12 19:51:41 UTC 2014
I’ll make use of your code and reimplement the function using AC_SEARCH_LIBS.
I’l post another patch soon.
Thank you for your help
Daniele
On May 9, 2014, at 5:23 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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:
>
> found=false
> save_LIBS=$LIBS
> for extras in "" "-ldl "; do
> LIBS="$extras$save_LIBS"
> AC_SEARCH_LIBS([...some dpdk function...], [intel_dpdk], [found=:])
> if $found; then
> LIBS="-lintel_dpdk $extras$LIBS"
> break
> fi
> done
> if $found; then :; else
> AC_MSG_FAILURE([are you sure dpdk is installed?])
> fi
>
> (Above not actually tested)
More information about the dev
mailing list