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

when I use Julia to call tvm, the error : CommandLine Error: Option 'aarch64-enable-ccmp' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options #36342

Open
agdkyang opened this issue Jun 18, 2020 · 7 comments

Comments

@agdkyang
Copy link

when I use Julia to call tvm:
the error : CommandLine Error: Option 'aarch64-enable-ccmp' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options

@agdkyang
Copy link
Author

I am not sure if the reason is that the version of llvm for julia and tvm is different.

@StefanKarpinski
Copy link
Member

Julia does require it's own fairly specific build of LLVM. I don't know what LLVM tvm requires, but that could be an issue. It would be helpful if you could give a minimal (non-)working example. Otherwise, I'm afraid there's not much actionable here.

@vchuravy
Copy link
Member

You might want to try building TVM against Julia's LLVM using BinaryBuilder (see https://github.com/JuliaPackaging/Yggdrasil/tree/master/L/LLVM for the LLVM build scripts we use). In general we are using symbol versioning to reduce potential conflicts, but I have seen cases where weak symbols ignore the symbol versions and then link against the wrong library,

@agdkyang
Copy link
Author

agdkyang commented Jun 19, 2020

Julia does require it's own fairly specific build of LLVM. I don't know what LLVM tvm requires, but that could be an issue. It would be helpful if you could give a minimal (non-)working example. Otherwise, I'm afraid there's not much actionable here.

@StefanKarpinski Yeah, I am not sure if the problem is caused by the different llvm version for Julia and tvm.

@agdkyang
Copy link
Author

You might want to try building TVM against Julia's LLVM using BinaryBuilder (see https://github.com/JuliaPackaging/Yggdrasil/tree/master/L/LLVM for the LLVM build scripts we use). In general we are using symbol versioning to reduce potential conflicts, but I have seen cases where weak symbols ignore the symbol versions and then link against the wrong library,

@vchuravy I want LLVM_full@8.0.0, but I can't find it in your link. Could you please tell me where do you find the LLVM patch in the website?

@jpsamaroo
Copy link
Member

@vchuravy does the solution to this require changes to libc, or something else?

@vchuravy
Copy link
Member

vchuravy commented Nov 8, 2020

Depends on what the actual issue is.. The question to ask is: Why are the symbol suffixes ignored. The last time I delved into this issue it turned out that weak symbols in libclang ignore the suffixes. The fact that LLVM fails during command line argument parsing hints at a second issue. LLVM uses a static variable here and it seems like those are shared between differing LLVM builds. So the bigger question is: How do we effectively namespace two dynamic libraries and convince the dynamic linker that ourLLVM really is different from the system LLVM.

One avenue I have thought about is to link LLVM statically to Julia, the only caveat being that we would need to re-export the LLVM C-API so that LLVM.jl could still do it's thing.

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

No branches or pull requests

4 participants