Skip to content

Cannot compile on MacOS: library not found for -lEnzyme-19 #175

Closed
@lynaghk

Description

@lynaghk

First, let me say that I'm extremely excited about having automatic differentiation like this in Rust --- thank you for your hard work on everything!

I'm trying to compile from a clean checkout of e47e0ba on my M1 Macbook Air (MacOS 12.7.2) and the build fails with library not found for -lEnzyme-19.

I did everything as per the book's instructions:

$ git clone --depth=1 git@github.com:EnzymeAD/rust.git rust-enzyme
Cloning into 'rust'...
remote: Enumerating objects: 51579, done.
remote: Counting objects: 100% (51579/51579), done.
remote: Compressing objects: 100% (43737/43737), done.
remote: Total 51579 (delta 6909), reused 28104 (delta 6251), pack-reused 0 (from 0)
Receiving objects: 100% (51579/51579), 32.69 MiB | 13.33 MiB/s, done.
Resolving deltas: 100% (6909/6909), done.
Updating files: 100% (49077/49077), done.
$ cd rust-enzyme   
$ ./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs

I've attached the full log as a txt file.

I see some references to AppleClang 14.0.0.14000029, which is interesting since on my PATH I have a much newer clang:

$ which clang
/opt/local/libexec/llvm-17/bin/clang
$ clang --version
clang version 17.0.6
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-17/bin

I'm not super familiar with the dark magic of all these linker flags and environment variable stuff, so I figured I'd run it by y'all and document publicly in case anyone else runs into the same issue. Please let me know if you need any more info from my side. I also saw on some other issue threads that you may not have access to Mac hardware --- happy to hop on a call to pair if you prefer that to async discussion.

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