-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to `llvm::Value::dump() const' in GenXCodeGen/GenXSimdCFConformance.cpp #303
Comments
I can confirm this issue here. Enabling VC (-DIGC_BUILD__VC_ENABLED=ON) causes the reported compilation failiure for me. Version |
See intel/intel-graphics-compiler#303 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
@ConiKost If I understand it correctly, the failing functions are only for debugging, I was able to make it build with the following workaround:
|
@frantisekz Yes, I can confirm. Patch fixes the error for me. |
@frantisekz thanks a lot for reporting and triage! Will fix this issue as soon as possible. But it is better to use default llvm-debug defines:
|
If you build with a "Debug" llvm, then the The culprit commit to GenXSimdCFConfrmance.cpp was 6db7f87 back in March, 2023:
Similarly, if you build intel-graphics-compiler with as Release (invoke cmake with -DCMAKE_BUILD_TYPE=Release), then the build should use -DNDEBUG and LLVM_DEBUG becomes a no-op. And that IS true (i.e., -DNDEBUG is used) for some of the compilation commands in the tree. But not for anything under GenXCodeGen. So that just looks like some cmake work to ensure -DNDEBUG gets passed in the GenXCodeGen compilation. I don't have a CMakeLists.txt patch at the moment. For me, for the moment, I reverted to building Release 1.0.13463.18 - that was before the above commit. |
Fix has been merged in 9be3363 . Please re-check, because I can't reproduce bug locally. |
@igorban-intel Thank you! :-) I can confirm, applying your patch solves the issue. |
That does not fix the problem that when building intel-graphics-compiler with -DCMAKE_BUILD_TYPE=Release, -DNDEBUG is not passed to compilation in GenXCodeGen/. The above commit does remove the call to llvm::Value::dump (even when -DNDEBUG is not defined). So it does address the undefined reference. But -NDEBUG should be passed to compilation when doing a Release build. -DNDEBUG has the effect of disabling LLVM_DEBUG (as intended and is documented in LLVM_DEBUG usage). Granted that problem (-DNDEBUG should be passed to compilation when building for Release thus disabling LLVM_DEBUG) is a separate bug than the one posted in this issue. But it would have solved this issue. |
And to reproduce it locally, the recipe would have been to build intel-graphics-compiler (the version that called llvm::Value::dump) against a Release version of llvm - i.e., one where libLLVMCore does not define llvm::Value::dump (a Debug version of llvm defines that symbol). |
llvm could also be built with -DLLVM_ENABLE_ASSERTIONS=ON or -DLLVM_ENABLE_DUMP to get llvm::Value::dump. See also https://stackoverflow.com/a/46700512 for an alleged equivalent to using llvm::Value::dump() |
Thanks @jhgit for your investigation - we will re-check builds to pass NDEBUG-option |
@igorban-intel ,
? |
Somewhere between igc 1.0.13700.7 and 1.0.14896.8, the build regressed with (I can do a proper bisect if needed):
The relevant flags and params are:
And the configure is called with:
Used llvm version is 15.0.7, opencl-clang bc1d13ecc1c6f7aa5da3acf33165037d3fc5ed06, and vc fe92a377338258b725cfbd0a1bd49a9cf5e2864c .
The text was updated successfully, but these errors were encountered: