Chuck Zhao
2010-Jun-02 20:52 UTC
[LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
I am trying to run the HELLO LLVM Pass under WinXP/MinGW, by following the precise steps available at http://www.llvm.org/docs/WritingAnLLVMPass.html. The pass failed to run, giving me the following error: opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null opt.exe: Unknown command line argument '-hello'. Try: 'C:\MSYS\opt\llvm-2.7\bin\opt.exe -help' make: *** [run] Error 1 Basically, it can't find the hello pass. However, when I was trying to run the same code under Debian4-i386, I got a totally opposite error: "Passes registered multiple times" opt -load Release/lib/Hello.so -hello < test.bc > /dev/null opt: /autofs/steffan/a/a0/czhao/ResearchTools/LLVM/2.7/llvm-2.7/lib/VMCore/Pass.cpp:234: void<unnamed>::PassRegistrar::RegisterPass(const llvm::PassInfo&): Assertion `Inserted && "Pass registered multiple times!"' failed. 0 opt 0x085e6809 Stack dump: 0. Program arguments: opt -load Release/lib/Hello.so -hello /bin/sh: line 1: 28292 Aborted opt -load Release/lib/Hello.so -hello <test.bc >/dev/null make: *** [run] Error 134 I think there is something very tricky here, but I can't figure out where. Could somebody give me a hint? Thank you Chuck
Anton Korobeynikov
2010-Jun-02 21:28 UTC
[LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
Hello> opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null > opt.exe: Unknown command line argument '-hello'. Try: > > Could somebody give me a hint?Loadable modules (e.g. passes) are not supported on windows. And will probably never be. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
John Criswell
2010-Jun-02 21:32 UTC
[LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
Anton Korobeynikov wrote:> Hello > > >> opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null >> opt.exe: Unknown command line argument '-hello'. Try: >> >> Could somebody give me a hint? >> > Loadable modules (e.g. passes) are not supported on windows. And will > probably never be. > >As an alternative, you can either: 1) Modify the opt program to statically link in the library implementing your pass. 2) Create a new program (based on opt) that runs your pass on a specified bitcode file. SAFECode has done the latter; you can see what we did by checkout out the SAFECode source code (http://safecode.cs.illinois.edu/downloads.html) and looking at tools/Sc/sc.cpp. -- John T.
Chuck Zhao
2010-Jun-02 23:17 UTC
[LLVMdev] can't run the Hello Pass: registered multiple times
Anton and John, Thank you for the valuable info. I guess the MinGW/Cygwin path is dead, at least for now. How about the problem of registering the pass multiple times under Linux (Debian4-i386)? opt -load Release/lib/Hello.so -hello < test.bc > /dev/null opt: /autofs/steffan/a/a0/czhao/ResearchTools/LLVM/2.7/llvm-2.7/lib/VMCore/Pass.cpp:234: void<unnamed>::PassRegistrar::RegisterPass(const llvm::PassInfo&): Assertion `Inserted && "Pass registered multiple times!"' failed. 0 opt 0x085e6809 Stack dump: 0. Program arguments: opt -load Release/lib/Hello.so -hello /bin/sh: line 1: 28292 Aborted opt -load Release/lib/Hello.so -hello <test.bc >/dev/null make: *** [run] Error 134 I can't seem to figure out the reason of the strange behavior, other than believing it is (possibly) a mis-compilation problem. A few known-to-miscompile compiler versions are given in the getting started guide (http://llvm.org/docs/GettingStarted.html), I wonder if the LLVM Team can publish instead at least 1 GOOD build compiler (the version) on a supported platform, in addition to the broken ones. And, is there a way to check whether a current LLVM build is miscompiled or not, by running some simple tests or scripts? Any suggestion(s)? Thank you Chuck On 6/2/2010 5:28 PM, Anton Korobeynikov wrote:> opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null >> opt.exe: Unknown command line argument '-hello'. Try: >> >> Could somebody give me a hint? >> > Loadable modules (e.g. passes) are not supported on windows. And will > probably never be. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100602/8ce063c3/attachment.html>
Maybe Matching Threads
- [LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
- [LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
- [LLVMdev] still failed to build the llbrowse on Debian5-32b-llvm2.8
- [LLVMdev] still failed to build the llbrowse on Debian5-32b-llvm2.8
- [LLVMdev] LLVMdev Digest, Vol 80, Issue 37-Help to unsubscribe