<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87168>87168</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Duplicate symbol: public: __cdecl llvm::PredicateInfo::~PredicateInfo(void)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Stanlyhalo
</td>
</tr>
</table>
<pre>
**Problem**
When attempting to build a project that calls `llvm::InitializeAllTargets()` using the latest llvm repo changes (as of commit 6aa5388), it throws two compiler errors as denoted in the title.
**Steps to reproduce**
1) `git clone --depth 1 --config core.autocrlf=false https://github.com/llvm/llvm-project.git`
2) `cmake -S llvm -B build -G "Visual Studio 17 2022" -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_BUILD_LLVM_DYLIB=OFF -DLLVM_LINK_LLVM_DYLIB=OFF -DCMAKE_BUILD_TYPE=Debug`
3) `cmake --build build` (this is the long part)
4) Start a new project and add the includes, links, and add defines for llvm (I use premake, however I'm following the output of the following messages from a cmake test project)
```
message(WARNING "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(WARNING "${LLVM_INCLUDE_DIRS}\n")
message(WARNING "${LLVM_LIBRARY_DIRS}\n")
message(WARNING "${LLVM_DEFINITIONS}\n")
message(WARNING "${LLVM_AVAILABLE_LIBS}\n")
```
5) Now that a project is setup, write a simple IR builder (anything will do, it's the next part(s) that matter).
6) Follow the guide at https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.html.
7) Upon attempting to compile (tested in clang vs22) while trying to call `llvm::InitializeAllTargets()` in the code, it will throw two errors that state what the error is in the title.
**Notes**
- Commenting out the function will allow it to compile, however I run into a runtime error since TargetMachine will get returned as a nullptr (which I presume is because I haven't initialized the targets).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVk9v2z4S_TT0ZWBDpiz_OfggR1ahreMEcZq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