build error on mac osx
Matthias Kretz
[please enable javascript to see the address]
Fri Jan 17 14:59:13 CET 2014
Hi Tijskens,
welcome to the list! :)
On Friday 17 January 2014 12:42:45 Tijskens Engelbert wrote:
> /Users/etijskens/Downloads/vc-vc/avx/intrinsics.h:582:5: error: use of
> undeclared identifier '_mm_comlt_epu32' AVX_TO_SSE_2(comlt_epu32)
> ^
> (Similar errors from the three succeeding lines as well)
> I checked the CMake files for any variables that could solve the problem.
> As suggested in the documentation (portability issues/compiler flags) I
> added CMAKE_CXX_FLAGS -march=corei7-avx -mavx
>
> The errors go away when i #undef VC_IMPL_XOP just before
> /Users/etijskens/Downloads/vc-vc/avx/intrinsics.h:581
>
> As far as i know XOP is for AMD cpus and should not be activated in my
> build. CMake detects TARGET_ARCHITECTURE=ivy-bridge
>
> i am compiling on a machine with Intel® Core™ i7-3615QM Processor and Mac OS
> X (maverick) using the clang 5.0 compiler. I am not sure that
> a) the problem is correctly solved by undefining VC_IMPL_XOP
> b) there is not a more elegant solution
I never can remember the mapping of Apples clang version to the actual clang
version. The latest released version of clang is 3.4
(http://llvm.org/releases/download.html). I think clang --version should print
the actual version somewhere.
In any case, you are right that your system doesn't need the XOP stuff. The
XOP code is compiled because the libVc library is supposed to work for any
target system. Thus you can build build applications for different hosts on
your machine without having to recompile libVc. But if your compiler doesn't
do XOP anyway then this feature is moot. So disabling XOP support is the right
way to go.
We have two options to fix this:
a) quick: call set(Vc_XOP_INTRINSICS_BROKEN true) in cmake/VcMacros.cmake for
depending on the clang version on Apple systems
b) more generic: make the -mxop compiler flag check more thorough. Right now
it only tests whether the compiler barfs with the flag. But it doesn't check
that with -mxop it also supports the XOP intrinsics. There's a similar check
in cmake/AddCompilerFlag.cmake for -mfma already. Should be easy to copy and
adjust.
Cheers,
Matthias
--
─────────────────────────────────────────────────────────────
Dipl.-Phys. Matthias Kretz
Web: http://compeng.uni-frankfurt.de/?mkretz
SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
─────────────────────────────────────────────────────────────
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20140117/ffecd488/attachment.pgp>
More information about the Vc
mailing list