Skip to content
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

[mlir] Target/LLVM/./MLIRTargetLLVMTests/failed_to_discover_tests_from_gtest unittest failed when LLVM_LINK_LLVM_DYLIB is enabled #115108

Open
zhaoqi5 opened this issue Nov 6, 2024 · 2 comments

Comments

@zhaoqi5
Copy link
Contributor

zhaoqi5 commented Nov 6, 2024

If turning on LLVM_LINK_LLVM_DYLIB while building llvm and mlir, a mlir unittest will fail whenninja check-mlir.

: CommandLine Error: Option 'enable-branch-hint' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
llvm-lit: /home/zhaoqi/llvm-upstream/llvm/utils/lit/lit/formats/googletest.py:38: warning: unable to discover google-tests in '/home/zhaoqi/llvm-upstream/_build/tools/mlir/unittests/Target/LLVM/./MLIRTargetLLVMTests': Command '['/home/zhaoqi/llvm-upstream/_build/tools/mlir/unittests/Target/LLVM/./MLIRTargetLLVMTests', '--gtest_list_tests', '--gtest_filter=-*DISABLED_*']' died with <Signals.SIGABRT: 6>.. Process output: b''
FAIL: MLIR-Unit :: Target/LLVM/./MLIRTargetLLVMTests/failed_to_discover_tests_from_gtest (2639 of 2685)
******************** TEST 'MLIR-Unit :: Target/LLVM/./MLIRTargetLLVMTests/failed_to_discover_tests_from_gtest' FAILED ********************

********************
********************
Failed Tests (1):
  MLIR-Unit :: Target/LLVM/./MLIRTargetLLVMTests/failed_to_discover_tests_from_gtest

If turn off LLVM_LINK_LLVM_DYLIB, the test can pass.

platform: x86_64 Linux

@harrisonGPU
Copy link
Contributor

harrisonGPU commented Nov 6, 2024

I also encountered this problem, but I think we can solve it by disabling LLVM_LINK_LLVM_DYLIB and using static linking libraries.

@zhaoqi5
Copy link
Contributor Author

zhaoqi5 commented Nov 6, 2024

Yes, we can do this to avoid this error for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants