-
Notifications
You must be signed in to change notification settings - Fork 120
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
Error raised when running "ninja check-mctoll" #68
Comments
Thanks for your interest in using the tool. It appears that you may not have the necessary ARM tools for ARM binary tests to run. The tool should have been built as expected and should be usable. |
Thanks a lot! I have another question, does this will affect the result of the llvm-mctoll that translate binary to IR. I use the llvm-mctoll to translate the a.out of factorial.c to the IR, but the result IR of funciton factorial(n) is different from the the result in the paper you have published, and also different from the source file(factorial.c) to the IR. So I don't know where is the problem. Thanks again! |
my source file f.c is: int factorial(int n) { int main()
} And the f.out-dis.ll file is: bb.1: ; preds = %entry which is different from the result in the paper: 《Raising Binaries to LLVM IR with MCTOLL |
I am assuming that you are referring to an x86-64 factorial binary (since your reference to the paper). It appears that all x86-64 binary raising tests pass with the tool built by you. Failure of ARM tests due to apparent missing ARM tools, has no affect on the llvm-mctoll built. There have been several enhancements to the tool since the paper was written. Hence, it is not unexpected that the generated LLVM IR for factorial.c is different from that in the paper. It is important that the generated LLVM IR is functionally correct. You can verify the correctness of the LLVM IR generated for factorial binary by compiling it using Thanks! |
Thanks very much! However, when I testing another c source file, the result is wrong. I want to write a new issue so the other people could see this. Thanks! |
Add changes (9a38eaf ) that check for the availability of ARM cross tools needed for ARM raising tests and gracefully avoid when they are not available on the test machine. |
When running the command “ninjia check-mctoll”, i meet a problem that different from the Issue #53, and i tried many methods but that didn't work, so i have to ask you for help. The problem i met is that i couldn't pass the check, 12 Unexpected Failures occur, and the the reasons for failures are all as follow:
FAIL: mctoll :: smoke_test/ARM/factorial-test.c (36 of 145)
******************** TEST 'mctoll :: smoke_test/ARM/factorial-test.c' FAILED ********************
Script:
: 'RUN: at line 1'; /home/user02/CGCL/llvm-mctoll/llvm-project/build/bin/clang /home/user02/CGCL/llvm-mctoll/llvm-project/llvm/tools/llvm-mctoll/test/smoke_test/ARM/../Inputs/factorial.c -o /home/user02/CGCL/llvm-mctoll/llvm-project/build/tools/llvm-mctoll/test/smoke_test/ARM/Output/factorial-test.c.tmp.so --target=arm-linux-gnueabi -fuse-ld=lld -shared
: 'RUN: at line 2'; /home/user02/CGCL/llvm-mctoll/llvm-project/build/bin/llvm-mctoll -d /home/user02/CGCL/llvm-mctoll/llvm-project/build/tools/llvm-mctoll/test/smoke_test/ARM/Output/factorial-test.c.tmp.so
: 'RUN: at line 3'; /home/user02/CGCL/llvm-mctoll/llvm-project/build/bin/clang -o /home/user02/CGCL/llvm-mctoll/llvm-project/build/tools/llvm-mctoll/test/smoke_test/ARM/Output/factorial-test.c.tmp1 /home/user02/CGCL/llvm-mctoll/llvm-project/llvm/tools/llvm-mctoll/test/smoke_test/ARM/factorial-test.c /home/user02/CGCL/llvm-mctoll/llvm-project/build/tools/llvm-mctoll/test/smoke_test/ARM/Output/factorial-test.c.tmp-dis.ll -mx32
: 'RUN: at line 4'; /home/user02/CGCL/llvm-mctoll/llvm-project/build/tools/llvm-mctoll/test/smoke_test/ARM/Output/factorial-test.c.tmp1 2>&1 | /home/user02/CGCL/llvm-mctoll/llvm-project/build/bin/FileCheck /home/user02/CGCL/llvm-mctoll/llvm-project/llvm/tools/llvm-mctoll/test/smoke_test/ARM/factorial-test.c
Exit Code: 1
Command Output (stderr):
ld.lld: error: cannot open crti.o: No such file or directory
ld.lld: error: cannot open crtbeginS.o: No such file or directory
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc_s
ld.lld: error: unable to find library -lc
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc_s
ld.lld: error: cannot open crtendS.o: No such file or directory
ld.lld: error: cannot open crtn.o: No such file or directory
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
I think is the ld.lld's problem, but I don't know how to slove it, and i don't know whether this will influence the result of the llvm-mctoll. Any help would be appreciated! Thanks a lot!
The text was updated successfully, but these errors were encountered: