awslinux compile errors
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/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
amazonlinux is stuck on gtest-devel.x86_64 1.7.0-11.amzn2.0.1 Probably why protobuf git submodules gtest.
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
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
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.
This is how protobuf handles it, https://github.com/protocolbuffers/protobuf/blob/master/cmake/tests.cmake#L14
@chadbrewbaker we switched to automatically downloading gtest at configure time. Hope that helps?
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 .
Thanks, sounds like it could be useful to others, would welcome a patch. Is contrib/ a good place for it?
Hi @chadbrewbaker , are you still interested in adding a Codebuild script?
Closing, feel free to reopen if you're interested :)