highway icon indicating copy to clipboard operation
highway copied to clipboard

awslinux compile errors

Open chadbrewbaker opened this issue 5 years ago • 8 comments

Compile errors with make on awslinux2 for b97d18f18ab26805fb37be8522aea5ca871ab356 .

hwy/tests/arithmetic_test.cc:1055:1: error: macro "INSTANTIATE_TEST_CASE_P" passed 4 arguments, but takes just 3 HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwyArithmeticTest); ^~~~~~~~~~~~~~~~~~~~~~ In file included from ./hwy/tests/arithmetic_test.cc:23:0, from ./hwy/foreach_target.h:80, from hwy/tests/arithmetic_test.cc:19: ./hwy/tests/test_util-inl.h:75:48: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^~~~~~~~~~~~~ ./hwy/tests/test_util-inl.h:75:61: error: expected ‘,’ or ‘...’ before ‘<’ token std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^ ./hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetName(int)’: ./hwy/tests/test_util-inl.h:76:21: error: ‘info’ was not declared in this scope return TargetName(info.param); ^~~~ ./hwy/tests/test_util-inl.h:76:21: note: suggested alternative: ‘ynf’ return TargetName(info.param); ^~~~ ynf ./hwy/tests/test_util-inl.h: At global scope: ./hwy/tests/test_util-inl.h:128:20: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^~~~~~~~~~~~~ ./hwy/tests/test_util-inl.h:128:33: error: expected ‘,’ or ‘...’ before ‘<’ token const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^ ./hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetNameAndT(int)’: ./hwy/tests/test_util-inl.h:129:45: error: ‘info’ was not declared in this scope return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ ./hwy/tests/test_util-inl.h:129:45: note: suggested alternative: ‘ynf’ return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ ynf In file included from ./hwy/highway.h:233:0, from ./hwy/tests/arithmetic_test.cc:22, from ./hwy/foreach_target.h:102, from hwy/tests/arithmetic_test.cc:19: ./hwy/ops/x86_512-inl.h: In function ‘hwy::N_AVX3::Vec512 hwy::N_AVX3::Abs(hwy::N_AVX3::Vec512)’: ./hwy/ops/x86_512-inl.h:611:44: error: cannot convert ‘const Raw {aka const __vector(8) double}’ to ‘__m512 {aka __vector(16) float}’ for argument ‘1’ to ‘__m512d _mm512_abs_pd(__m512)’ return Vec512{_mm512_abs_pd(v.raw)}; ^ In file included from ./hwy/tests/arithmetic_test.cc:23:0, from ./hwy/foreach_target.h:80, from hwy/tests/arithmetic_test.cc:19: hwy/tests/arithmetic_test.cc: At global scope: ./hwy/tests/test_util-inl.h:46:44: error: ‘INSTANTIATE_TEST_CASE_P’ does not name a type #define HWY_GTEST_INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P ^ ./hwy/tests/test_util-inl.h:80:3: note: in expansion of macro ‘HWY_GTEST_INSTANTIATE_TEST_SUITE_P’ HWY_GTEST_INSTANTIATE_TEST_SUITE_P(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hwy/tests/arithmetic_test.cc:1055:1: note: in expansion of macro ‘HWY_TARGET_INSTANTIATE_TEST_SUITE_P’ HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwyArithmeticTest); ^ make: *** [bin/arithmetic_test] Error 1

chadbrewbaker avatar Nov 15 '20 04:11 chadbrewbaker

amazonlinux is stuck on gtest-devel.x86_64 1.7.0-11.amzn2.0.1 Probably why protobuf git submodules gtest.

chadbrewbaker avatar Nov 15 '20 04:11 chadbrewbaker

mkdir build; cd build; cmake ../; make -j4 log

Scanning dependencies of target hwy_list_targets [ 2%] Building CXX object CMakeFiles/hwy_list_targets.dir/hwy/tests/list_targets.cc.o [ 5%] Linking CXX executable hwy_list_targets [ 5%] Built target hwy_list_targets Scanning dependencies of target hwy [ 14%] Building CXX object CMakeFiles/hwy.dir/hwy/aligned_allocator.cc.o [ 14%] Building CXX object CMakeFiles/hwy.dir/hwy/targets.cc.o [ 14%] Building CXX object CMakeFiles/hwy.dir/hwy/nanobenchmark.cc.o [ 17%] Linking CXX static library libhwy.a Compiled HWY_TARGETS: AVX3 AVX2 SSE4 Scalar HWY_BASELINE_TARGETS: Scalar [ 17%] Built target hwy Scanning dependencies of target swizzle_test Scanning dependencies of target targets_test Scanning dependencies of target aligned_allocator_test Scanning dependencies of target memory_test [ 20%] Building CXX object CMakeFiles/aligned_allocator_test.dir/hwy/aligned_allocator_test.cc.o [ 22%] Building CXX object CMakeFiles/targets_test.dir/hwy/targets_test.cc.o [ 25%] Building CXX object CMakeFiles/swizzle_test.dir/hwy/tests/swizzle_test.cc.o [ 28%] Building CXX object CMakeFiles/memory_test.dir/hwy/tests/memory_test.cc.o /root/highway/hwy/tests/memory_test.cc:262:1: error: macro "INSTANTIATE_TEST_CASE_P" passed 4 arguments, but takes just 3 HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwyMemoryTest); ^~~~~~~~~~~~~~~~~~ /root/highway/hwy/tests/swizzle_test.cc:799:1: error: macro "INSTANTIATE_TEST_CASE_P" passed 4 arguments, but takes just 3 HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwySwizzleTest); ^~~~~~~~~~~~~~~~~~~ In file included from /root/highway/hwy/targets_test.cc:17:0: /root/highway/hwy/tests/test_util-inl.h:75:48: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:75:61: error: expected ‘,’ or ‘...’ before ‘<’ token std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetName(int)’: /root/highway/hwy/tests/test_util-inl.h:76:21: error: ‘info’ was not declared in this scope return TargetName(info.param); ^~~~ /root/highway/hwy/tests/test_util-inl.h:76:21: note: suggested alternative: ‘ynf’ return TargetName(info.param); ^~~~ ynf /root/highway/hwy/tests/test_util-inl.h: At global scope: /root/highway/hwy/tests/test_util-inl.h:128:20: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:128:33: error: expected ‘,’ or ‘...’ before ‘<’ token const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetNameAndT(int)’: /root/highway/hwy/tests/test_util-inl.h:129:45: error: ‘info’ was not declared in this scope return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ /root/highway/hwy/tests/test_util-inl.h:129:45: note: suggested alternative: ‘ynf’ return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ ynf In file included from /root/highway/hwy/tests/memory_test.cc:25:0, from /root/highway/hwy/foreach_target.h:80, from /root/highway/hwy/tests/memory_test.cc:21: /root/highway/hwy/tests/test_util-inl.h:75:48: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:75:61: error: expected ‘,’ or ‘...’ before ‘<’ token std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetName(int)’: /root/highway/hwy/tests/test_util-inl.h:76:21: error: ‘info’ was not declared in this scope return TargetName(info.param); ^~~~ /root/highway/hwy/tests/test_util-inl.h:76:21: note: suggested alternative: ‘ynf’ return TargetName(info.param); ^~~~ ynf /root/highway/hwy/tests/test_util-inl.h: At global scope: /root/highway/hwy/tests/test_util-inl.h:128:20: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:128:33: error: expected ‘,’ or ‘...’ before ‘<’ token const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetNameAndT(int)’: /root/highway/hwy/tests/test_util-inl.h:129:45: error: ‘info’ was not declared in this scope return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ /root/highway/hwy/tests/test_util-inl.h:129:45: note: suggested alternative: ‘ynf’ return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ ynf make[2]: *** [CMakeFiles/targets_test.dir/hwy/targets_test.cc.o] Error 1 make[1]: *** [CMakeFiles/targets_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from /root/highway/hwy/tests/swizzle_test.cc:24:0, from /root/highway/hwy/foreach_target.h:80, from /root/highway/hwy/tests/swizzle_test.cc:20: /root/highway/hwy/tests/test_util-inl.h:75:48: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:75:61: error: expected ‘,’ or ‘...’ before ‘<’ token std::string TestParamTargetName(const testing::TestParamInfo<uint32_t>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetName(int)’: /root/highway/hwy/tests/test_util-inl.h:76:21: error: ‘info’ was not declared in this scope return TargetName(info.param); ^~~~ /root/highway/hwy/tests/test_util-inl.h:76:21: note: suggested alternative: ‘ynf’ return TargetName(info.param); ^~~~ ynf /root/highway/hwy/tests/test_util-inl.h: At global scope: /root/highway/hwy/tests/test_util-inl.h:128:20: error: ‘TestParamInfo’ in namespace ‘testing’ does not name a template type const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^~~~~~~~~~~~~ /root/highway/hwy/tests/test_util-inl.h:128:33: error: expected ‘,’ or ‘...’ before ‘<’ token const testing::TestParamInfo<std::tuple<uint32_t, T>>& info) { ^ /root/highway/hwy/tests/test_util-inl.h: In function ‘std::__cxx11::string hwy::TestParamTargetNameAndT(int)’: /root/highway/hwy/tests/test_util-inl.h:129:45: error: ‘info’ was not declared in this scope return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ /root/highway/hwy/tests/test_util-inl.h:129:45: note: suggested alternative: ‘ynf’ return std::string(TargetName(std::get<0>(info.param))) + "" + ^~~~ ynf In file included from /root/highway/hwy/highway.h:233:0, from /root/highway/hwy/tests/memory_test.cc:24, from /root/highway/hwy/foreach_target.h:102, from /root/highway/hwy/tests/memory_test.cc:21: /root/highway/hwy/ops/x86_512-inl.h: In function ‘hwy::N_AVX3::Vec512 hwy::N_AVX3::Abs(hwy::N_AVX3::Vec512)’: /root/highway/hwy/ops/x86_512-inl.h:611:44: error: cannot convert ‘const Raw {aka const __vector(8) double}’ to ‘__m512 {aka __vector(16) float}’ for argument ‘1’ to ‘__m512d _mm512_abs_pd(__m512)’ return Vec512{_mm512_abs_pd(v.raw)}; ^ In file included from /root/highway/hwy/tests/memory_test.cc:25:0, from /root/highway/hwy/foreach_target.h:80, from /root/highway/hwy/tests/memory_test.cc:21: /root/highway/hwy/tests/memory_test.cc: At global scope: /root/highway/hwy/tests/test_util-inl.h:46:44: error: ‘INSTANTIATE_TEST_CASE_P’ does not name a type #define HWY_GTEST_INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P ^ /root/highway/hwy/tests/test_util-inl.h:80:3: note: in expansion of macro ‘HWY_GTEST_INSTANTIATE_TEST_SUITE_P’ HWY_GTEST_INSTANTIATE_TEST_SUITE_P(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/highway/hwy/tests/memory_test.cc:262:1: note: in expansion of macro ‘HWY_TARGET_INSTANTIATE_TEST_SUITE_P’ HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwyMemoryTest); ^ In file included from /root/highway/hwy/highway.h:233:0, from /root/highway/hwy/tests/swizzle_test.cc:23, from /root/highway/hwy/foreach_target.h:102, from /root/highway/hwy/tests/swizzle_test.cc:20: /root/highway/hwy/ops/x86_512-inl.h: In function ‘hwy::N_AVX3::Vec512 hwy::N_AVX3::Abs(hwy::N_AVX3::Vec512)’: /root/highway/hwy/ops/x86_512-inl.h:611:44: error: cannot convert ‘const Raw {aka const __vector(8) double}’ to ‘__m512 {aka __vector(16) float}’ for argument ‘1’ to ‘__m512d _mm512_abs_pd(__m512)’ return Vec512{_mm512_abs_pd(v.raw)}; ^ In file included from /root/highway/hwy/tests/swizzle_test.cc:24:0, from /root/highway/hwy/foreach_target.h:80, from /root/highway/hwy/tests/swizzle_test.cc:20: /root/highway/hwy/tests/swizzle_test.cc: At global scope: /root/highway/hwy/tests/test_util-inl.h:46:44: error: ‘INSTANTIATE_TEST_CASE_P’ does not name a type #define HWY_GTEST_INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P ^ /root/highway/hwy/tests/test_util-inl.h:80:3: note: in expansion of macro ‘HWY_GTEST_INSTANTIATE_TEST_SUITE_P’ HWY_GTEST_INSTANTIATE_TEST_SUITE_P(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/highway/hwy/tests/swizzle_test.cc:799:1: note: in expansion of macro ‘HWY_TARGET_INSTANTIATE_TEST_SUITE_P’ HWY_TARGET_INSTANTIATE_TEST_SUITE_P(HwySwizzleTest); ^ [ 31%] Linking CXX executable tests/aligned_allocator_test make[2]: *** [CMakeFiles/memory_test.dir/hwy/tests/memory_test.cc.o] Error 1 make[1]: *** [CMakeFiles/memory_test.dir/all] Error 2 [ 31%] Built target aligned_allocator_test make[2]: *** [CMakeFiles/swizzle_test.dir/hwy/tests/swizzle_test.cc.o] Error 1 make[1]: *** [CMakeFiles/swizzle_test.dir/all] Error 2 make: *** [all] Error 2

chadbrewbaker avatar Nov 15 '20 04:11 chadbrewbaker

Hi, the minimum version of gtest that we tested with is 1.8.0, which was launched in 2016. I just checked 1.7 and I don't see the templated TestParam version, which we use extensively to test for different targets, so I don't think it would be easy to make it work with 1.7. Bundling googletest as a git submodule has some downsides, but we are considering other alternatives to pull that dependency at build time.

You can skip building the tests with cmake .. -DBUILD_TESTING=OFF, or you can download a recent googletest repo, compile it and then use it here (this installs googletest in a $HOME/gtest directory, you can use any other directory):

git clone https://github.com/google/googletest.git
cd googletest
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/gtest
make
make install

and then configure highway with cmake .. -DGTEST_ROOT=$HOME/gtest to make it find the gtest you just installed in $HOME/gtest. I hope this helps.

deymo avatar Nov 16 '20 19:11 deymo

This is how protobuf handles it, https://github.com/protocolbuffers/protobuf/blob/master/cmake/tests.cmake#L14

chadbrewbaker avatar Nov 16 '20 19:11 chadbrewbaker

@chadbrewbaker we switched to automatically downloading gtest at configure time. Hope that helps?

jan-wassenberg avatar Dec 09 '20 18:12 jan-wassenberg

Want me to contribute an AWS Codebuild script? Lambda now supports AVX512 so it's suddenly relevant.

On Wed, Dec 9, 2020 at 12:22 PM Jan Wassenberg [email protected] wrote:

@chadbrewbaker https://github.com/chadbrewbaker we switched to automatically downloading gtest at configure time. Hope that helps?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/highway/issues/7#issuecomment-741960175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYHJQNF4HB5I6GUSHAU2LST655TANCNFSM4TV6TBAA .

chadbrewbaker avatar Dec 09 '20 21:12 chadbrewbaker

Thanks, sounds like it could be useful to others, would welcome a patch. Is contrib/ a good place for it?

jan-wassenberg avatar Dec 10 '20 09:12 jan-wassenberg

Hi @chadbrewbaker , are you still interested in adding a Codebuild script?

jan-wassenberg avatar Apr 28 '21 13:04 jan-wassenberg

Closing, feel free to reopen if you're interested :)

jan-wassenberg avatar May 17 '23 13:05 jan-wassenberg