Skip to content

Conversation

@razvanlupusoru
Copy link
Contributor

The TestOpenACCInterfaces test loads dialects including HLFIR and DLTI (for data layout). The appropriate dependencies were missing leading to link failures:
TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x66): undefined reference to
mlir::detail::TypeIDResolver<hlfir::hlfirDialect, void>::id' TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x141): undefined reference to mlir::detail::TypeIDResolver<mlir::DLTIDialect, void>::id'

The TestOpenACCInterfaces test loads dialects including HLFIR
and DLTI (for data layout). The appropriate dependencies were missing
leading to link failures:
TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x66):
undefined reference to
`mlir::detail::TypeIDResolver<hlfir::hlfirDialect, void>::id'
TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x141):
undefined reference to `mlir::detail::TypeIDResolver<mlir::DLTIDialect,
void>::id'
@llvmbot llvmbot added flang Flang issues not falling into any other category openacc labels Jun 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 30, 2025

@llvm/pr-subscribers-openacc

Author: Razvan Lupusoru (razvanlupusoru)

Changes

The TestOpenACCInterfaces test loads dialects including HLFIR and DLTI (for data layout). The appropriate dependencies were missing leading to link failures:
TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x66): undefined reference to
mlir::detail::TypeIDResolver&lt;hlfir::hlfirDialect, void&gt;::id' TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x141): undefined reference to mlir::detail::TypeIDResolver<mlir::DLTIDialect, void>::id'


Full diff: https://github.com/llvm/llvm-project/pull/146431.diff

1 Files Affected:

  • (modified) flang/test/lib/OpenACC/CMakeLists.txt (+4)
diff --git a/flang/test/lib/OpenACC/CMakeLists.txt b/flang/test/lib/OpenACC/CMakeLists.txt
index 1c0ac748f85e8..d8d0109ed5848 100644
--- a/flang/test/lib/OpenACC/CMakeLists.txt
+++ b/flang/test/lib/OpenACC/CMakeLists.txt
@@ -2,22 +2,26 @@ add_flang_library(FIRTestOpenACCInterfaces
   TestOpenACCInterfaces.cpp
 
   DEPENDS
+  HLFIRDialect
   FIRDialect
   FIROpenACCSupport
   FIRSupport
 
   LINK_LIBS
+  HLFIRDialect
   FIRDialect
   FIROpenACCSupport
   FIRSupport
 
   MLIR_DEPS
+  MLIRDLTIDialect
   MLIRIR
   MLIROpenACCDialect
   MLIRPass
   MLIRSupport
 
   MLIR_LIBS
+  MLIRDLTIDialect
   MLIRIR
   MLIROpenACCDialect
   MLIRPass

Copy link
Contributor

@clementval clementval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kewen12
Copy link
Contributor

Kewen12 commented Jun 30, 2025

Thanks for the quick fix. Could we land this PR to unblock the buildbots?

@razvanlupusoru razvanlupusoru merged commit a3c8165 into llvm:main Jul 1, 2025
10 checks passed
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Jul 1, 2025
The TestOpenACCInterfaces test loads dialects including HLFIR and DLTI
(for data layout). The appropriate dependencies were missing leading to
link failures:

TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x66):
undefined reference to
`mlir::detail::TypeIDResolver<hlfir::hlfirDialect, void>::id'
TestOpenACCInterfaces.cpp:(.text._ZNK12_GLOBAL__N_124TestFIROpenACCInterfaces20getDependentDialectsERN4mlir15DialectRegistryE+0x141):
undefined reference to `mlir::detail::TypeIDResolver<mlir::DLTIDialect,
void>::id'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang Flang issues not falling into any other category openacc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants