ROCm/roctracer

Build fails when generating hsa_ostream_ops.h

rederick29 opened this issue · 1 comments

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) { }

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).