From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by dpdk.org (Postfix) with ESMTP id 258C8532E for ; Tue, 13 Sep 2016 04:20:55 +0200 (CEST) Received: by mail-qk0-f174.google.com with SMTP id h8so74268237qka.1 for ; Mon, 12 Sep 2016 19:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=YafDh9YU3aEDxEI5u14KdqDj1jtc1VlAippEQszuUsY=; b=eOSACMBOKQipo6Ma+xRp0N38wwSILd/woVkI+wEd5F6xsp/Xn0XTPS+zT2LywfSSZy 8jeiYqpY21+YiYkH8n5LwsaD6CoDtdG2v1VjnokN+tHEaB2aaFLWi1enZ3THaAj4rEu5 izTj/NyezsHX80202A9vG+MfdBw/qiT1syfP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=YafDh9YU3aEDxEI5u14KdqDj1jtc1VlAippEQszuUsY=; b=DLFdjBGJjzVMBh0nU5F37vOlJYLHfdQjBIE0xVQEpvJtr77qZ+vzDR4dD4DbVERKmc Z5HCQIgGKUKpvTVCugLlzjmtYXUFhW2WdmrlOOLnUc3I29XGHTJUy+i19QONPTE8JBzf BIc28IgMA+vyu/xnwzTa3ZJ3BK9DvLPKRQVfxj3rCn9hhsVGlW2HSXn/wp7ytaGHPc3O F0csVeFAB82kaiy1fP9eoW84kfCCZ7n3Rkj97CQlo2AauONE4FpEP4GnAzP+CCy9x2BU FCX4+9yAiUl8sCQHGV4kPqy+ZyRqgwzK+E01O2hAfIVxhrTILaNs8Zr3dsgq3X8uO6PX hrmw== X-Gm-Message-State: AE9vXwNxWp89T3atP1eokAld17CPmM4QjQi+4m7MkbvFUTKxl0dZmtH+VaHQbeAVRQHHVmBKdvRoFt1MBdsCrqU9 X-Received: by 10.55.135.6 with SMTP id j6mr25343026qkd.270.1473733254295; Mon, 12 Sep 2016 19:20:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.42.180 with HTTP; Mon, 12 Sep 2016 19:20:33 -0700 (PDT) From: Michael Wildt Date: Mon, 12 Sep 2016 22:20:33 -0400 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Cross compile for ARM64 fails due to librte_vhost and pmdinfogen issues X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2016 02:20:55 -0000 Dear DPDK, I'm attempting to cross compile DPDK on an x86 for an ARM64 target. This fails in the following areas, using latest dpdk as of 9/12. When compiling natively there are no issues. - librte_vhost, fails with: /projects/dpdk_latest/lib/librte_vhost/vhost_user/virtio-net-user.c:250:23: error: array subscript is above array bounds [-Werror=array-bounds] rvq = dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_RXQ]; ^ /projects/dpdk_latest/lib/librte_vhost/vhost_user/virtio-net-user.c:251:23: error: array subscript is above array bounds [-Werror=array-bounds] tvq = dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_TXQ]; ^ /projects/dpdk_latest/lib/librte_vhost/vhost_user/virtio-net-user.c:250:23: error: array subscript is above array bounds [-Werror=array-bounds] rvq = dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_RXQ]; ^ /projects/dpdk_latest/lib/librte_vhost/vhost_user/virtio-net-user.c:251:23: error: array subscript is above array bounds [-Werror=array-bounds] tvq = dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_TXQ]; ^ cc1: all warnings being treated as errors - This is only a warning on the downloadable release v16.07 tar ball, not error as in this case. I'm guessing the compile flags must have been changed. - buildtools/pmdinfogen, fails with: == Build buildtools/pmdinfogen HOSTCC pmdinfogen.o /projects/dpdk_test_wget/dpdk-16.07/build/include/rte_byteorder.h: Assembler messages: /projects/dpdk_test_wget/dpdk-16.07/build/include/rte_byteorder.h:53: Error: no such instruction: `rev16 %bx,%bx' /projects/dpdk_test_wget/dpdk-16.07/mk/internal/rte.compile-pre.mk:138: recipe for target 'pmdinfogen.o' failed make[3]: *** [pmdinfogen.o] Error 1 /projects/dpdk_test_wget/dpdk-16.07/mk/rte.subdir.mk:61: recipe for target 'pmdinfogen' failed make[2]: *** [pmdinfogen] Error 2 /projects/dpdk_test_wget/dpdk-16.07/mk/rte.sdkbuild.mk:78: recipe for target 'buildtools' failed make[1]: *** [buildtools] Error 2 /projects/dpdk_test_wget/dpdk-16.07/mk/rte.sdkroot.mk:123: recipe for target 'all' failed make: *** [all] Error 2 - The issue is due to the rte_byteorder.h file which gets symlink'ed with the ARM version at the beginning of the build. The pmdinfogen is always compiled for x86 thus the asm is failing. I see two ways to address this. - Have pmdinfogen always pickup the local OS rte_byteorder.h file, not the ARCH symlinked one. - Fix pmdinfogen such that it gets cross compiled correctly as the rest of the code. Did a quick attempt by setting the HOST_OS to 0, , but then it fails at the HOST_LD. If the pmdinfogen commit is removed, by checking out v16.07-rc1 followed by a fresh build, then it is possible to cross compile for ARM64 fine. Used tool chain: gcc-linaro-aarch64-linux-gnu-4.9-2014.09 It would be great if the forum could help with patches on these two issues. Regards, Michael