[ovs-dev] [PATCH v1] acinclude: Provide error info when linking fails with DPDK.

Pai G, Sunil sunil.pai.g at intel.com
Fri Nov 12 17:33:08 UTC 2021


Hi Michael,

Thanks for the review , responses inline.

> > Before:
> > checking whether linking with dpdk works... no
> > configure: error: Could not find DPDK library in default search path,
> > update PKG_CONFIG_PATH for pkg-config to find the .pc file in
> > non-standard location
> >
> > After:
> > checking whether linking with dpdk works... no
> > configure: error: configure:27158: gcc -o conftest -include rte_config.h ...
> > -Wl,--whole-archive -l:librte_bus_pci.a -l:my_lib.a ... -lunwind >&5
> > /usr/bin/ld: cannot find -l:my_lib.a
> Let's add more details.
> 
> checking whether linking with dpdk works... no
> +Printing the error that caused the linking failure:

Not sure about this one.  Might be a bit too verbose ? I wonder if the error message (in the next line) is probably descriptive enough ? 

> configure: error: configure:27158: gcc -o conftest -include rte_config.h...
> -Wl,--whole-archive -l:librte_bus_pci.a -l:my_lib.a ... -lunwind >&5
> /usr/bin/ld: cannot find -l:my_lib.a


> +End of log. In the case that this script could not find DPDK in the
> +default search path, update PKG_CONFIG_PATH for pkg-config to find the
> +.pc file in non-standard location. Otherwise check the error logs for
> +more details in the log file config.log

Not sure if this could happen tbh. I tried keeping PKG_CONFIG_PATH empty deliberately to check and saw the standard error message from pkg-config:

checking whether dpdk is enabled... yes
checking for DPDK... no
configure: error: Package requirements (libdpdk) were not met:

No package 'libdpdk' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DPDK_CFLAGS
and DPDK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details. 


<snipped>

Thanks and regards,
Sunil


More information about the dev mailing list