* Sniped from the forum post about the same problem, but put here for official handling * I am testing latest Eigen on an ODROID-C2 board (ARM Aarch64) and I am getting the following error when compiling with Clang 3.5.0: """ In file included from .../eigen3/Eigen/Core:355: .../eigen3/Eigen/src/Core/arch/NEON/Complex.h:286:35: error: statement expression not allowed at file scope static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA ); ^ /usr/include/clang/3.5.0/include/arm_neon.h:7624:39: note: expanded from macro 'vld1q_u64' #define vld1q_u64(__p0) __extension__ ({ \ ^ 1 error generated. """ It seems that there is a problem when instantiating the vectorization macros that sadly I am not enough familiar with to suggest a fix. This error is not present in 3.2.xx. Also, in https://github.com/tensorflow/tensorflow/issues/3065 they have a workaround for this problem.
This comes from a fix of bug 1240. The problem is more likely on clang side, and I believe it works fine with a more recent clang version. An easy fix is to enable the old code for clang only.
Created attachment 745 [details] Workaround clang 3.5 issue Could you try the attached patch and confirm that it does the trick. Thanks.
Created attachment 746 [details] Workaround clang 3.5 issue
Hi Gael! Thank you, I will give this a try tonight. Just so you know, I tested this (without the patch) with the latest "devel" (3.8.1) and the error is still present there: """ In file included from .../eigen3/Eigen/Core:355: .../eigen3/Eigen/src/Core/arch/NEON/Complex.h:286:35: error: statement expression not allowed at file scope static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA ); ^ /usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include/arm_neon.h:7624:39: note: expanded from macro 'vld1q_u64' #define vld1q_u64(__p0) __extension__ ({ \ ^ 1 error generated. """ So its not only a clang 3.5 problem.
ok, good to known.
I gave the patch a try and it fixes the problem on both 3.5 and 3.8.1. Thank you for the quick fix Gael!
Alright. https://bitbucket.org/eigen/eigen/commits/b5beb4800686/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1325.