-
Notifications
You must be signed in to change notification settings - Fork 439
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
ld: Undefined symbols building with BUILD_SHARED_LIBS #1224
Comments
This is strange. @jumormt could you take a look at this compilation error for abstract execution on Mac OS? |
@JuliusNmn Apologies for any inconvenience. It appears that this feature hasn't been tested or received updates for some time. I attempted to replicate the issue on my Ubuntu system and encountered a different error when enabling this option. I will conduct further investigation into this matter. In the meantime, if you are able to resolve this issue on your end, we would welcome a pull request with the fix. [ 77%] Built target SvfCoreObj |
I got the shared lib build to work. I have opened up a draft pull request. I assume that add_llvm_library does not properly support shared libs, so this is more of a workaround. Building works fine on macos (with and without BUILD_SHARED_LIBS), but it emits warnings about duplicate libraries, and I have only tested llvm in-source builds. Someone more experienced with CMake should look into this. |
Hi, PR #1229 should solve your problem. Feel free to give it a test on your environment. |
Unfortunately, on the current branch the build fails:
|
I just tested and the shared lib had the same compilation error. I guess it is because the dynamic lib needs the definition as a self-contained build, but the definition resides in SVF-llvm. For static build, it is fine, but the dylib is not. @xudon9 can you help with fixing it. |
@JuliusNmn could you try this fix and let us know. |
i can confirm that it builds shared libraries now. thanks for fixing! |
I'm trying to build SVF as a shared library with the BUILD_SHARED_LIBS flag introduced in 278, but linking fails with
ld: undefined symbols
. Without the flag, SVF builds without errors.The text was updated successfully, but these errors were encountered: