-
Notifications
You must be signed in to change notification settings - Fork 108
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
Building Enzyme CMake - Undefined symbol: main #1871
Comments
Hm that looks like the linker didn't find your main function for some reason. Mind sharing the whole code which fails? |
We were originally building the test files outside of the Enzyme library. However we're currently trying inside the Enzyme/enzyme/test/test_find_package folder. Trying to build the enzyme_test_2 executable (we removed the enzyme_test_1 executable due to errors with Clang). We just want to test (and compile) the main.c source file to see if __enzyme_autodiff works. In that folder, we tried building the executable with
This was successful But then when we type
For reference:
The code for /Enzyme/enzyme/test/test_find_package/main.c
|
We realized that we were unintentionally using gcc instead of clang. Would it be possible to recognize this and throw and error to the user? |
Hello,
My group is trying to build Enzyme. We chose an older version of LLVM (https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.6) because the newer versions were giving us problems.
We built LLVM using:
Which was successful.
Then we built Enzyme using:
Which was successful.
To test Enzyme we're using the example test.c file from: https://enzyme.mit.edu/getting_started/UsingEnzyme/#differentiating-cc
We're using the same cmake file as: https://github.com/EnzymeAD/Enzyme/blob/main/enzyme/test/test_find_package/CMakeLists.txt.
We decided to remove the ClangEnzymeFlags as we wanted to focus on LLDEnzyme.
We used the command
to build the project which was successful.
However, when running
make
we get the following errors.We believe that this is likely due to a cmake issue due to linking but we're not sure what this error means.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: