Skip to content
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

clad.dylib gives a dlopen error in MacOS Sonoma #1199

Open
RS2007 opened this issue Dec 30, 2024 · 4 comments
Open

clad.dylib gives a dlopen error in MacOS Sonoma #1199

RS2007 opened this issue Dec 30, 2024 · 4 comments

Comments

@RS2007
Copy link

RS2007 commented Dec 30, 2024

Machine specifications:

OS: macOS 14.5 23F79 arm64 (Sonoma)
Running on a Mac M2 Chip

Installation was done following the MacOS installation instructions in the README

Commands used to run the differentiator example from README:

Hedwig :: /tmp/clad » clang++ -std=c++11 -I./inst/include -fplugin=./inst/lib/clad.dylib test.cpp
error: unable to load plugin './inst/lib/clad.dylib': 'dlopen(./inst/lib/clad.dylib, 0x0009): symbol not found in flat namespace '__ZN4llvm9DebugFlagE''
Hedwig :: /tmp/clad » cat test.cpp
#include <iostream>
#include "clad/Differentiator/Differentiator.h"

double f(double x, double y) { return x * y; }

int main() {
  // Call clad to generate the derivative of f wrt x.
  auto f_dx = clad::differentiate(f, "x");
  // Execute the generated derivative function.
  std::cout << f_dx.execute(/*x=*/3, /*y=*/4) << std::endl;
  // Dump the generated derivative code to standard output.
  f_dx.dump();
}
@RS2007
Copy link
Author

RS2007 commented Dec 30, 2024

Closing this, since the issue was that clang-15 was being used instead of clang-12 (bundled with llvm-12).

@RS2007 RS2007 closed this as completed Dec 30, 2024
@RS2007 RS2007 reopened this Dec 30, 2024
@RS2007
Copy link
Author

RS2007 commented Dec 30, 2024

Should this probably be mentioned in the readme? Since most users would have their default clang installation elsewhere and this issue might be mitigated if they are warned beforehand

@vgvassilev
Copy link
Owner

Yes, probably worth mentioning it more explicitly. Do you think you can open a PR?

@RS2007
Copy link
Author

RS2007 commented Dec 30, 2024

Yeah sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants