-
Notifications
You must be signed in to change notification settings - Fork 707
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
Update clang-sys #1489
Update clang-sys #1489
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The changes introduced by this commit cause a compilation hang (an infinite loop) on some (not all) CentOS 6 installations. This is likely dependent on where and how clang has been installed on CentOS 6. For details (git bisect etc.) please see the following issue: Forcibly downgrading bindgen to 0.46 (before this clang-sys commit) fixes the issue. |
I tried looking into this with CentOS 6.10 in a Docker container. My attempt to build LLVM/Clang 7 from source has failed, I'm going to try again later with another version. If that doesn't work (either the build or reproducing the issue), what version of LLVM/Clang are you using and how did you get it? |
Both CentOS 6.10 machines where the compilation hanged have clang installed from the alonid epel repository: https://copr.fedorainfracloud.org/coprs/alonid/llvm-5.0.1/ [chris@capricorn ~]$ cat /etc/redhat-release .bashrc contains references to llvm 5.0.1: alonid-llvm-5.0.1-epel-6.repo: |
Could you post the result of running a debug version of bindgen on whatever headers with
And the full error would be helpful too. Thanks! |
A version v0.47.0 freezes indefinitely, CTRL+C is needed to stop it. ^C Next I checkout v0.46.0 and bindgen does not freeze (no CTRL+C is needed): [chris@capricorn rust-bindgen]$ |
Is there any chance you could see where it's hanging with a debugger? Running |
The output is rather long, I kept pressing to continue until there were no more messages in gdb. Hope it helps! [chris@capricorn rust-bindgen]$ git checkout v0.47.0 |
Based on my own investigation and the above backtrace, the hang happens inside It seems to be caused by this code where each instance of I don't understand why this causes issues (and why this has only affected CentOS 6 thus far), perhaps the loaded shared library isn't being closed properly? I will continue to look into it. |
Given this and #1504 I think we should revert this change for now. |
This update of
clang-sys
is intended to improve thelibclang
version selection when linking dynamically as described here.In short,
libclang
shared library versions are no longer determined by the filename, they are determined by loading the library and attempting to load functions until the version can be determined.This should improve behavior when there are multiple instances of
libclang
available and should resolve several issues, namely servo/servo#21478 and servo/servo#22384.