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

[CIR] Fix build error #410

Closed
wants to merge 1 commit into from
Closed

[CIR] Fix build error #410

wants to merge 1 commit into from

Conversation

YazZz1k
Copy link
Contributor

@YazZz1k YazZz1k commented Jan 22, 2024

Currently build on main branch fails with the the error:

[602/787] Linking CXX shared library lib/libMLIRCIR.so.18git
FAILED: lib/libMLIRCIR.so.18git
...
ld.lld: error: undefined symbol: mlir::cir::CIRCallOpInterface::getNumArgOperands()

This PR fixes this issue

@YazZz1k
Copy link
Contributor Author

YazZz1k commented Jan 23, 2024

Currently with this fix I got another error

FAILED: lib/libMLIRCIRInterfaces.so.18git
...
ld.lld: error: undefined symbol: mlir::detail::TypeIDResolver<mlir::cir::ConditionOp, void>::id
>>> referenced by CIROps.h.inc:2791 (tools/clang/include/clang/CIR/Dialect/IR/CIROps.h.inc:2791)
>>>               tools/clang/lib/CIR/Interfaces/CMakeFiles/obj.MLIRCIRInterfaces.dir/CIRLoopOpInterface.cpp.o:(mlir::detail::TypeIDResolver<mlir::cir::ConditionOp, void>::resolveTypeID())

Looks like this new errors appear while code refactoring on the one of commits from 5d332db to d54606d

@YazZz1k YazZz1k closed this Jan 23, 2024
@sitio-couto
Copy link
Collaborator

@YazZz1k could you paste your CMake configuration command here? I wasn't able to reproduce this build error.

@YazZz1k YazZz1k reopened this Jan 23, 2024
@YazZz1k
Copy link
Contributor Author

YazZz1k commented Jan 23, 2024

@sitio-couto Hello! My CMake config:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=lld -DBUILD_SHARED_LIBS=ON -DLLVM_USE_SPLIT_DWARF=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_CCACHE_BUILD=OFF -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;X86" -DLLVM_ENABLE_PROJECTS="clang;lld;mlir;cir" ../llvm

@yugr
Copy link
Member

yugr commented Jan 25, 2024

@YazZz1k could you paste your CMake configuration command here? I wasn't able to reproduce this build error.

I think the crash was due to -DBUILD_SHARED_LIBS=ON, this build variant is more sensitive to missing dependencies.

@lanza
Copy link
Member

lanza commented Jan 27, 2024

@YazZz1k Thanks for the PR! I found the same issue and fixed it in 77c8438 and e5dd626 earlier!

@lanza lanza closed this Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants