Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error, "error: ‘_mm_hint’ has not been declared" #3

Closed
hak8or opened this issue Nov 19, 2018 · 1 comment
Closed

Compiler error, "error: ‘_mm_hint’ has not been declared" #3

hak8or opened this issue Nov 19, 2018 · 1 comment

Comments

@hak8or
Copy link

hak8or commented Nov 19, 2018

Build seems to be failing on my system, also seems some on reddit have the same issue. I am running on Arch, GCC 8.2.1 as can be seen when running cmake. Let me know if you need any other information and I will be happy to provide it.

Attached is the build log:

⋊> /t/l/b cmake -DCMAKE_BUILD_TYPE=Release ../hardware-effects/                                       22:29:04
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/lol/b
⋊> /t/l/b make -j                                                                                     22:29:26
Scanning dependencies of target cache-memory-bound
Scanning dependencies of target data-dependency
Scanning dependencies of target branch-misprediction
Scanning dependencies of target branch-target-misprediction
Scanning dependencies of target cache-hierarchy-bandwidth
Scanning dependencies of target cache-aliasing
Scanning dependencies of target prefetching
[  5%] Building CXX object cache-memory-bound/CMakeFiles/cache-memory-bound.dir/cache-memory-bound.cpp.o
Scanning dependencies of target false-sharing
[ 11%] Building CXX object data-dependency/CMakeFiles/data-dependency.dir/data-dependency.cpp.o
[ 16%] Building CXX object branch-misprediction/CMakeFiles/branch-target-misprediction.dir/branch-target-misprediction.cpp.o
[ 22%] Building CXX object branch-misprediction/CMakeFiles/branch-misprediction.dir/branch-misprediction.cpp.o
[ 27%] Building CXX object cache-aliasing/CMakeFiles/cache-aliasing.dir/cache-aliasing.cpp.o
[ 33%] Building CXX object cache-hierarchy-bandwidth/CMakeFiles/cache-hierarchy-bandwidth.dir/cache-hierarchy-bandwidth.cpp.o
[ 38%] Building CXX object false-sharing/CMakeFiles/false-sharing.dir/false-sharing.cpp.o
[ 44%] Building CXX object prefetching/CMakeFiles/prefetching.dir/prefetching.cpp.o
Scanning dependencies of target write-combining
[ 50%] Building CXX object write-combining/CMakeFiles/write-combining.dir/write-combining.cpp.o
[ 55%] Linking CXX executable cache-hierarchy-bandwidth
[ 61%] Linking CXX executable cache-aliasing
[ 66%] Linking CXX executable cache-memory-bound
[ 72%] Linking CXX executable data-dependency
[ 72%] Built target cache-aliasing
[ 72%] Built target cache-hierarchy-bandwidth
/tmp/lol/hardware-effects/prefetching/prefetching.cpp:19:26: error: ‘_mm_hint’ has not been declared
 template <bool Prefetch, _mm_hint Hint>
                          ^~~~~~~~
/tmp/lol/hardware-effects/prefetching/prefetching.cpp: In function ‘size_t test_memory(const std::vector<Data*>&, int)’:
/tmp/lol/hardware-effects/prefetching/prefetching.cpp:32:62: error: ‘Hint’ was not declared in this scope
             if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                                              ^~~~
/tmp/lol/hardware-effects/prefetching/prefetching.cpp:32:62: note: suggested alternative: ‘uint’
             if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                                              ^~~~
                                                              uint
/*** SNIP ****/
/tmp/lol/hardware-effects/prefetching/prefetching.cpp:20:8: note:   template argument deduction/substitution failed:
/tmp/lol/hardware-effects/prefetching/prefetching.cpp:75:65: error: template argument 2 is invalid
         sum = test_memory<false, _MM_HINT_T0>(pointers, distance);
                                                                 ^
[ 72%] Built target cache-memory-bound
[ 77%] Linking CXX executable branch-misprediction
[ 77%] Built target data-dependency
[ 83%] Linking CXX executable false-sharing
make[2]: *** [prefetching/CMakeFiles/prefetching.dir/build.make:63: prefetching/CMakeFiles/prefetching.dir/prefetching.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:460: prefetching/CMakeFiles/prefetching.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 88%] Linking CXX executable write-combining
[ 94%] Linking CXX executable branch-target-misprediction
[ 94%] Built target false-sharing
[ 94%] Built target branch-misprediction
[ 94%] Built target branch-target-misprediction
[ 94%] Built target write-combining
make: *** [Makefile:84: all] Error 2
@hak8or hak8or changed the title Compiler error, error: ‘_mm_hint’ has not been declared Compiler error, "error: ‘_mm_hint’ has not been declared" Nov 19, 2018
@Kobzol
Copy link
Owner

Kobzol commented Nov 19, 2018

I added the xmmintrin.h header, try it now please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants