chenyueqi / w2l

25 stars 5 forks source link

The project doesn't work #1

Closed qijiale closed 3 years ago

qijiale commented 3 years ago

Is it possible to provide a detailed step of project operation? Thanks

chenyueqi commented 3 years ago

Hi, thank you very much for your interest. Could you provide me with a more concrete description of the problem you encountered? In this way, I can help solve your problem more efficiently and effectively.

In general, this project is mainly based on LLVM infrastructure. So you first need to download and install LLVM 10.0 and then build the project in code/analyzer. The input, IR files for the kernel, can be found in kernels/ . You can find more hints in the script scripts/build_essential.sh.

qijiale commented 3 years ago

Thank you very much for your reply. 1 When I 'make' in /analyzer, there are errors: CMake Error at CMakeLists.txt:4 (find_package): Could not find a package configuration file provided by "LLVM" with any of the following names:

LLVMConfig.cmake llvm-config.cmake

Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set "LLVM_DIR" to a directory containing one of the above files. If "LLVM" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! See also "/home/allen/Vscode/ELOISE/w2l/code/analyzer/src/CMakeFiles/CMakeOutput.log". Makefile:25: recipe for target 'analyzer' failed make: *** [analyzer] Error 1

2 I run it on ubuntu16.04. Can I run it on Mac?

I've just started to study this field, and I'm looking forward to your reply.

At 2021-01-05 23:23:14, "Yueqi Chen" notifications@github.com wrote:

Hi, thank you very much for your interest. Could you provide me with a more concrete description of the problem you encountered? In this way, I can help solve your problem more efficiently and effectively.

In general, this project is mainly based on LLVM infrastructure. So you first need to download and install LLVM 10.0 and then build the project in code/analyzer. The input, IR files for the kernel, can be found in kernels/ . You can find more hints in the script scripts/build_essential.sh.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenyueqi commented 3 years ago

1. As I said, LLVM is an infrastructure. You should install LLVM first. A similar issue and corresponding solution can be found here.

  1. Theoretically, running it on Mac is doable. However, I haven't tested it on Mac. I would appreciate it a lot if you are willing to have a try and return back to me your experience. Of course, it's more than welcome if you can contribute a building script on Mac.

qijiale commented 3 years ago
  1. The new error: -- Found LLVM 10.0.0 -- Using LLVMConfig.cmake in: /usr/local/lib/cmake/llvm -- Configuring done -- Generating done -- Build files have been written to: /home/allen/Vscode/ELOISE/w2l/code/analyzer/src make[1]: Entering directory '/home/allen/Vscode/ELOISE/w2l/code/analyzer/build' make[1]: 没有指明目标并且找不到 makefile。 停止。 make[1]: Leaving directory '/home/allen/Vscode/ELOISE/w2l/code/analyzer/build' Makefile:25: recipe for target 'analyzer' failed make: [analyzer] Error 2

There is a CMakeCache.txt in code/analyzer/build, not Makefile.

  1. If I want to run this project, I simply need to run 'make' in .coed/analyzer?

At 2021-01-06 11:25:14, "Yueqi Chen" notifications@github.com wrote:

As I said, LLVM is an infrastructure. You should install LLVM first. A similar issue and corresponding solution can be found here.

Theoretically, running it on Mac is doable. However, I haven't tested it on Mac. I would appreciate it a lot if you are willing to have a try and return back to me your experience. Of course, it's more than welcome if you can contribute a building script on Mac.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenyueqi commented 3 years ago

1 . I paste the log on my machine for your reference -- Found LLVM 10.0.0 -- Using LLVMConfig.cmake in: /home/yueqi/llvm-10.0.0.src/build/lib/cmake/llvm -- Configuring done -- Generating done -- Build files have been written to: /home/yueqi/eloise/code/analyzer/build make[1]: Entering directory '/home/yueqi/eloise/code/analyzer/build' make[2]: Entering directory '/home/yueqi/eloise/code/analyzer/build' make[3]: Entering directory '/home/yueqi/eloise/code/analyzer/build' Scanning dependencies of target analyzer make[3]: Leaving directory '/home/yueqi/eloise/code/analyzer/build' make[3]: Entering directory '/home/yueqi/eloise/code/analyzer/build'

I don't know why the built files are going to be written to /src instead of /build on your machine. I guess your error is still about the LLVM configuration. Could you read Makefile and compare its content with your LLVM configuration?

2 . Running make in code/analyzer only builds the analyzer. Please refer to code/Makefile to learn how to use the analyzer.

qijiale commented 3 years ago

I download &install llvm 10.0 and clang 10.0 by https://www.cnblogs.com/pandamohist/archive/2004/01/13/13655278.html, due to it is about llvm 9.0 in build_essential.sh. Q1. I have another question in analyzer/Makefile. I don't find the variable 'LLVM_BUILD' where is defined. Do i need to configure it and how?

At 2021-01-07 00:36:10, "Yueqi Chen" notifications@github.com wrote:

1 . I paste the log on my machine for your reference -- Found LLVM 10.0.0 -- Using LLVMConfig.cmake in: /home/yueqi/llvm-10.0.0.src/build/lib/cmake/llvm -- Configuring done -- Generating done -- Build files have been written to: /home/yueqi/eloise/code/analyzer/build make[1]: Entering directory '/home/yueqi/eloise/code/analyzer/build' make[2]: Entering directory '/home/yueqi/eloise/code/analyzer/build' make[3]: Entering directory '/home/yueqi/eloise/code/analyzer/build' Scanning dependencies of target analyzer make[3]: Leaving directory '/home/yueqi/eloise/code/analyzer/build' make[3]: Entering directory '/home/yueqi/eloise/code/analyzer/build'

I don't know why the built files are going to be written to /src instead of /build on your machine. I guess your error is still about the LLVM configuration. Could you read Makefile and compare its content with your LLVM configuration?

2 . Running make in code/analyzer only builds the analyzer. Please refer to code/Makefile to learn how to use the analyzer.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenyueqi commented 3 years ago

10.0 is the right version. 9.0 also works if you modify the -std= option in analyzer/Makefile. Since we now have LLVM 10, let's use this version.

LLVM_BUILD is not necessary. LLVM_BUILD helps find LLVM executables and so on. As long as you can find kinds of stuff likeclang and llvm-config in your PATH, you need not set LLVM_BUILD.

chenyueqi commented 3 years ago

Since no more comments for 5 days, I plan to close this issue in 24 hours. Please let me know if you have more questions.

qijiale commented 3 years ago

I have some problems when installing LLVM in Docker. I'm working on them. After LLVM is installed, I will ask you again if there are any problems. Thank you very much for your patience to answer my questions.

At 2021-01-12 04:23:07, "Yueqi Chen" notifications@github.com wrote:

Since no more comments for 5 days, I plan to close this issue in 24 hours. Please let me know if you have more questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenyueqi commented 3 years ago

Yep.

qijiale commented 3 years ago

Hi. When i git clone https://github.com/umnsec/linux-bitcode.git or download the zip for linux-bitcode, it always fails. I do some tries to handle this problem, but it does not work. Can you give me some advice how to download the linux-bitcode?

在 2021-01-12 10:46:01,"Yueqi Chen" notifications@github.com 写道:

Yep.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenyueqi commented 3 years ago

Probably you need a good VPN.