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

[Linux] [llvm] Fix LLVM symbol leakage to prevent conflict with other libs using LLVM like GLX #1508

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = fix #958

[Click here for the format server]


By using libLLVM*.a, we not only export taichi::* in our libtaichi_core.so, but also export llvm::*.
So that some symbols in libLLVM-10.so (also llvm::*) somehow gets replaced by those one in libtaichi_core.so, which is our RTTI configured LLVM, causing the conflict.
So, this PR uses a LD version script, to prevent symbols in llvm::* being exported to global symbol table, therefore fix the leakage conflict, ultimately.

@archibate archibate added error-prone This PR may introduce potential bug if not carefully reviewed & tested small changeset labels Jul 16, 2020
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Thanks. Please feel free to merge as long as you can confirm the GLX issue presents without this PR but disappears with this PR.

@archibate
Copy link
Collaborator Author

Just BTW, does this fix the Blender compat issue which IIRC is related OpenGL?

@archibate archibate added the LGTM label Jul 16, 2020
@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #1508 into master will increase coverage by 0.46%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1508      +/-   ##
==========================================
+ Coverage   66.84%   67.31%   +0.46%     
==========================================
  Files          38       38              
  Lines        5450     5525      +75     
  Branches      956      966      +10     
==========================================
+ Hits         3643     3719      +76     
+ Misses       1644     1642       -2     
- Partials      163      164       +1     
Impacted Files Coverage Δ
python/taichi/lang/matrix.py 91.33% <0.00%> (-0.10%) ⬇️
python/taichi/lang/transformer.py 93.82% <0.00%> (+0.20%) ⬆️
python/taichi/lang/ops.py 93.33% <0.00%> (+0.20%) ⬆️
python/taichi/main.py 42.35% <0.00%> (+0.28%) ⬆️
python/taichi/lang/__init__.py 80.00% <0.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc7e1a9...0b2a016. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-prone This PR may introduce potential bug if not carefully reviewed & tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't import taichi (from 0.5.15) using Ubuntu 20.04 in VM
2 participants