Fix DPDK build on arm 58/27358/4
authorJuraj Linkeš <juraj.linkes@pantheon.tech>
Mon, 1 Jun 2020 08:40:52 +0000 (10:40 +0200)
committerJuraj Linkeš <juraj.linkes@pantheon.tech>
Wed, 3 Jun 2020 08:05:30 +0000 (08:05 +0000)
Directive #include <file> in GCC implementation searches for files
in a standard list of system directories, which leads to a build
error on Taishan arm machines:
/tmp/openvpp-testing/dpdk/lib/librte_ethdev/rte_ethdev.h:4287:10:
fatal error: rte_ethdev_core.h:
No such file or directory #include <rte_ethdev_core.h>

Fix this by replacing the directive with #include "file" which searches
for files first in the directory containing the current file and other
directories only after that.

Change-Id: If283b81c992c001a2f980312cdd99053c3d703d9
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
resources/libraries/bash/function/dpdk.sh

index 1654cf8..4298e79 100644 (file)
@@ -108,6 +108,12 @@ function dpdk_compile () {
 
     sed -i "${sed_i40e}" "${sed_file}" || die "Patch failed"
 
+    sed_build_fix='s/#include <\(rte_ethdev.*.h\)>/#include "\1"/g'
+    # can't put the filename in quotes so that shell expands it
+    sed -i "${sed_build_fix}" ./lib/librte_ethdev/rte_ethdev*.h || {
+        die "DPDK build patch failed"
+    }
+
     # Compile
     make install T="${arch}"-"${machine}"-linuxapp-gcc -j || {
         die "Failed to compile DPDK!"