ROCm / llvm-project

This is the AMD-maintained fork of the LLVM git repository. This repository accepts pull requests and issues related to AMD fork-specific topics (amd/*). For all other issues/PRs, please submit upstream at https://github.com/llvm/llvm-project.
Other
94 stars 48 forks source link

[Issue]: comgr.cpp compilation error #38

Closed RichardGe closed 1 week ago

RichardGe commented 3 months ago

Problem Description

I'm trying to compile amd_comgr on Visual Studio 2022. I'm on the latest amd-staging branch of https://github.com/ROCm/llvm-project ( 6dfd4edd09fcdc0b902f60fc77ab62c2e395154f )

I was able to build llvm and device-libs correctly. But for amd_comgr, I have those compilation error:

1>comgr.cpp
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(65,1): warning C4003: not enough arguments for function-like macro invocation 'LLVM_MAKE_OPT_ID'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(66,1): warning C4003: not enough arguments for function-like macro invocation 'LLVM_MAKE_OPT_ID'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(66,1): error C2365: 'clang::driver::options::OPT_': redefinition; previous definition was 'enumerator'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(65,1): message : see declaration of 'clang::driver::options::OPT_'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(67,1): warning C4003: not enough arguments for function-like macro invocation 'LLVM_MAKE_OPT_ID'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(67,1): error C2365: 'clang::driver::options::OPT_': redefinition; previous definition was 'enumerator'
1>H:\PROJECTS\096_rocm\llvm\llvm-project\llvm\myBuild\tools\clang\include\clang/Driver/Options.inc(65,1): message : see declaration of 'clang::driver::options::OPT_'
........... lots of errors like that in Options.inc .......

Am I missing something ?

Operating System

Windows 11

CPU

AMD Ryzen Threadripper PRO 5955WX 16-Cores

GPU

AMD Radeon Pro W7900

ROCm Version

ROCm 6.0.0

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

lamb-j commented 1 month ago

Are you still having issues with this? Can you provide the CMake commands used to build the 3 components (llvm, device libs, comgr)?

lamb-j commented 1 week ago

Feel free to re-open if you're still having issues with this. Thanks!