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

Fix build issue #5

Open
rc-94 opened this issue Jun 9, 2023 · 0 comments
Open

Fix build issue #5

rc-94 opened this issue Jun 9, 2023 · 0 comments

Comments

@rc-94
Copy link

rc-94 commented Jun 9, 2023

Hello,

I tried to build the tool but found these errors :

YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/benchmark_register.h:17:30: error: ‘numeric_limits’ is not a member of ‘std’
   17 |   static const T kmax = std::numeric_limits<T>::max();
      |                              ^~~~~~~~~~~~~~
YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/benchmark_register.h:17:46: error: expected primary-expression before ‘>’ token
   17 |   static const T kmax = std::numeric_limits<T>::max();
      |                                              ^
YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/benchmark_register.h:17:49: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   17 |   static const T kmax = std::numeric_limits<T>::max();
      |                                                 ^~~
      |                                                 std::max
In file included from /usr/include/c++/12/algorithm:61,
                 from YANSOllvm/llvm-9.0.1.src/utils/benchmark/include/benchmark/benchmark.h:175,
                 from YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/internal_macros.h:4,
                 from YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/check.h:8,
                 from YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/benchmark_register.h:6:
/usr/include/c++/12/bits/stl_algo.h:5756:5: note: ‘std::max’ declared here
 5756 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[2]: *** [utils/benchmark/src/CMakeFiles/benchmark.dir/build.make:90: utils/benchmark/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:99609: utils/benchmark/src/CMakeFiles/benchmark.dir/all] Error 2

If you have the same error, try to fix it by adding to the file /YANSOllvm/llvm-9.0.1.src/utils/benchmark/src/benchmark_register.h the following include :
#include <limits>

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

1 participant