Skip to content

Build Fails Due to Missing LLVM Config and Header Files, and CMake Project Command Issue #3

@zaimingli

Description

@zaimingli

Issue Description

When attempting to build the project, the script fails due to multiple issues related to LLVM configuration and CMake settings:

  1. LLVM Configuration Issue:
    The llvm-config script is not found, indicating that LLVM may not be installed or is not in the system's PATH
    ../build.sh: 1: llvm-config: not found
  2. Include Header Error:
    The file llvm/Pass.h cannot be found which halts the compilation of main.cpp:./src/main.cpp:6:10: fatal error: llvm/Pass.h: No such file or directory
    6 | #include "llvm/Pass.h"
    | ^~~~~~~~~~~~~
    compilation terminated.

Expected Behavior

The build script should complete without errors, successfully compiling all modules.

Actual Behavior

The build process fails due to missing LLVM configuration and header file issues. Additionally, a CMake configuration warning is issued.

Possible Solutions

  • Ensure LLVM is correctly installed and llvm-config is accessible in your PATH.
  • Verify the presence of llvm/Pass.h in your LLVM installation directory, or ensure the correct LLVM version is being used.
  • Modify the CMakeLists.txt to include a direct call to the project() command as suggested by the CMake warning.

Logs

./build.sh: 1: llvm-config: not found
./src/main.cpp:6:10: fatal error: llvm/Pass.h: No such file or directory
6 | #include "llvm/Pass.h"
| ^~~~~~~~~~~~~
compilation terminated.
[] Trying to Build EntryPointIdentifier
./build.sh: 1: llvm-config: not found
./src/main.cpp:6:10: fatal error: llvm/Pass.h: No such file or directory
6 | #include "llvm/Pass.h"
| ^~~~~~~~~~~~~
compilation terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions