ROCm / roctracer

ROCm Tracer Callback/Activity Library for Performance tracing AMD GPUs
https://rocm.docs.amd.com/projects/roctracer/en/latest/
Other
64 stars 30 forks source link

Build fails when generating hsa_ostream_ops.h #87

Closed rederick29 closed 1 year ago

rederick29 commented 1 year ago

This issue is very similar to #83. After following the same steps as in that issue, I have the following output:

[ 31%] Generating hip_ostream_ops.h...
clang-16: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
[1133] WARN-enum: nameless enum ['enum', '{', 'HIP_SUCCESS', '=', '0', ',', 'HIP_ERROR_INVALID_VALUE', ',', 'HIP_ERROR_NOT_INITIALIZED', ',', 'HIP_ERROR_LAUNCH_OUT_OF_RESOURCES', '}']
Not able to parse hip_runtime_api.h.i on line 1693 evaluating "{"
Error around: constexpr initializer_list ( ) noexcept : _M_array ( 0 ) , _M_len ( 0 )
make[2]: *** [src/CMakeFiles/roctracer.dir/build.make:76: src/hip_ostream_ops.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: src/CMakeFiles/roctracer.dir/all] Error 2

Which is different from the mentioned issue.

Here are lines 1691 to 1693 of hip_runtime_api.h.i:

    public:
      constexpr initializer_list() noexcept
      : _M_array(0), _M_len(0) { }
rederick29 commented 1 year ago

This was an issue with my build tools. This happens when trying to compile roctracer using hipcc. A different error occurs when trying to compile using gcc/g++. The only compiler that worked for me was clang/clang++ (from https://github.com/ROCm-Developer-Tools/llvm-project).