-
Notifications
You must be signed in to change notification settings - Fork 122
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
Setting up on OSX via conda fails with Expected in: flat namespace #300
Comments
Hi @vishalsubbiah, sorry, I thought I have replied... Can you setting this env variable |
@vgvassilev was giving it a try, do i need to rebuild manually with this env var, or should i run because that gave the same error. |
Looks like we have two bugs here. One that I already filed and another that might be involved in system clang unable to run plugins due to security protection. I am still investigating. brew install llvm@7
cat ../T.cpp
#include "clad/Differentiator/Differentiator.h"
double sq(double x) {return x*x;}
extern "C" int printf(const char*,...);
int main () {
auto dsqdx = clad::differentiate(sq,"x");
printf("%f\n", dsqdx.execute(1));
}
/usr/local/opt/llvm\@7/bin/clang -x c++ -std=c++11 -fplugin=/Users/vvassilev/miniconda//lib/clad.dylib -I /Users/vvassilev/miniconda/include/ -lm -lc++ ../T.cpp
./a.out
2.000000 That would install clang that's compatible to the conda version of clad while the other bugs are resolved/investigated. |
looks like on mac, llvm7 is only supported till catalina:
|
In that case, you can install the version of llvm that you can (anything up to llvm12 is supported) and then you should make sure you install a compatible version of clad ( |
This patch removes the flat_namespace option that we pass to the linker on osx. Instead we will make a dynamic lookup when a symbol is missing which is more consistent with the default behavior for osx. Fixes #300.
This patch removes the flat_namespace option that we pass to the linker on osx. Instead we will make a dynamic lookup when a symbol is missing which is more consistent with the default behavior for osx. Fixes #300.
I am trying to setup clad via conda. I have installed clad via conda-forge. when I run
clang -cc1 -x c++ -std=c++11 -load /Users/me/opt/miniconda3/envs/clad_env/lib/clad.dylib sourcfile.cpp
, I see the error:c++filt on
__ZN5clang15PluginASTAction6anchorEv
returnsclang::PluginASTAction::anchor()
This is with v0.9 ( but also saw with v0.8)
sourcefile.cpp contains:
Any suggestion on what I'm missing here? my guess is I either need to rebuild from scratch with two level namespace or i'm missing some dependency in my environment.
The text was updated successfully, but these errors were encountered: