On Gentoo, ROCM_PATH=/usr we do not need to set -I${ROCM_PATH}/include. Actually it is harmful to the `include_next`s. Index: ROCm-CompilerSupport-rocm-4.3.0/lib/comgr/src/comgr-compiler.cpp =================================================================== --- comgr/src/comgr-compiler.cpp +++ comgr/src/comgr-compiler.cpp @@ -927,8 +927,6 @@ AMDGPUCompiler::addTargetIdentifierFlags amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() { HIPIncludePath = (Twine(env::getHIPPath()) + "/include").str(); - // HIP headers depend on hsa.h which is in ROCM_DIR/include. - ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str(); ClangIncludePath = (Twine(env::getLLVMPath()) + "/lib/clang/" + CLANG_VERSION_STRING).str(); ClangIncludePath2 = (Twine(env::getLLVMPath()) + "/lib/clang/" +