help on local enzyme setup

36 views
Skip to first unread message

Lucas Roberts

unread,
Oct 2, 2024, 2:59:57 PM10/2/24
to Enzyme AD
Hi, I'm trying to setup enzyme locally on my mac and am confused about an error message I'm seeing. What I've done: 

(1) build llvm locally via linked instructions from enzyme-ad site:

(2) confirmed the modular optimizer executable `opt` is on my local machine

(3) now trying to get the enzyme build to work but seems I am stuck, specific details which may be helpful 

my local setup has a case sensitive fs  at

/Volumes/source_codes/

# directory with llvm repo and enzyme repo:

tree -L 2 /Volumes/source_codes/enzyme-da/ 

/Volumes/source_codes/enzyme-da/

├── Enzyme

│   ├── CITATION.bib

│   ├── CONTRIBUTING.md

│   ├── LICENSE

│   ├── Readme.md

│   ├── build

│   └── enzyme

└── llvm-project

    ├── CODE_OF_CONDUCT.md

    ├── CONTRIBUTING.md

    ├── README.md

    ├── bolt

    ├── build

    ├── clang

    ├── clang-tools-extra

    ├── cmake

    ├── compiler-rt

    ├── cross-project-tests

    ├── flang

    ├── libc

    ├── libclc

    ├── libcxx

    ├── libcxxabi

    ├── libunwind

    ├── lld

    ├── lldb

    ├── llvm

    ├── llvm-libgcc

    ├── mlir

    ├── pyproject.toml

    ├── runtimes

    ├── third-party

    └── utils


now in the `build` directory I created under `Enzyme`, I run:  

cmake -G Ninja ../enzyme/  -DLLVM_DIR=../../llvm-project/llvm/cmake/

and I get the following error message:

```

LLVM_SHLIBEXT=.dylib

LLVM ABS DIR /Volumes/source_codes/enzyme-da/llvm-project/llvm/cmake

CMAKE_PREFIX_PATH 

CMake Error at CMakeLists.txt:69 (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 "/Volumes/source_codes/enzyme-da/Enzyme/enzyme/CMakeFiles/CMakeOutput.log".

See also "/Volumes/source_codes/enzyme-da/Enzyme/enzyme/CMakeFiles/CMakeError.log".

```

I'm not clear here if I've done something wrong on the llvm build or if it's more a matter of setting up env vars correctly or something else entirely. I inspected the two cmake log files but am unable to determine what is broken in my setup. 

Has anyone any idea(s)? 

I've included the two log files indicated as attachments. 

For context my clang version 

Lucass-MacBook:enzyme rlucas$ clang -v 

Apple clang version 14.0.3 (clang-1403.0.22.14.1)

Target: x86_64-apple-darwin22.6.0

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin


CMakeError.log
CMakeOutput.log
Reply all
Reply to author
Forward
0 new messages