diff mbox

[ovs-dev,1/2] netdev-dpdk: fix cross compilation failure

Message ID 1471977614-4333-1-git-send-email-hemant.agrawal@nxp.com
State Not Applicable
Headers show

Commit Message

Hemant Agrawal Aug. 23, 2016, 6:40 p.m. UTC
configure with_dpdk and cross compile fails with:
"configure: error: cannot check for file existence
when cross compiling"

This is due to the usages of AC_CHECK_FILES.

AC_CHECK_FILES only works when not cross compiling. It test
a feature of the host machine, and therefore, die when
cross-compiling.

The current patch put the check in condition, i.e. check only
if not cross-compiling.

This patch has been tested on ARM64 platform with DPDK16.07

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 acinclude.m4 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Ben Pfaff Aug. 30, 2016, 8:10 p.m. UTC | #1
On Wed, Aug 24, 2016 at 12:10:14AM +0530, Hemant Agrawal wrote:
> configure with_dpdk and cross compile fails with:
> "configure: error: cannot check for file existence
> when cross compiling"
> 
> This is due to the usages of AC_CHECK_FILES.
> 
> AC_CHECK_FILES only works when not cross compiling. It test
> a feature of the host machine, and therefore, die when
> cross-compiling.
> 
> The current patch put the check in condition, i.e. check only
> if not cross-compiling.
> 
> This patch has been tested on ARM64 platform with DPDK16.07
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Where's patch 2/2?
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 353519d..72947a5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -180,9 +180,13 @@  AC_DEFUN([OVS_CHECK_DPDK], [
         DPDK_INCLUDE="$with_dpdk/include"
         # If 'with_dpdk' is passed install directory, point to headers
         # installed in $DESTDIR/$prefix/include/dpdk
-        AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
+	# AC_CHECK_FILES only works when not cross compiling
+	if test "$cross_compiling" != "yes"
+	then
+                AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
                       [AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
                                      [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
+	fi
         DPDK_LIB_DIR="$with_dpdk/lib"
         ;;
     esac