Bug 1211943
| Summary: | libclang.so incomplete | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mattias Ellert <mattias.ellert> |
| Component: | llvm | Assignee: | Adam Jackson <ajax> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 23 | CC: | ajax, bos, dmalcolm, jv+fedora, petersen, scottt.tw |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-05 12:11:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1210948 | ||
|
Description
Mattias Ellert
2015-04-15 09:05:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23 I think this problem is caused by the default linker behavior on Fedora. https://fedoraproject.org/wiki/UnderstandingDSOLinkChange The code you want to link is present in some libclang*.so library insted of libclang.so. libclang.so links to the "side" libraries but these dependencies are not added to your program. % cat main.cc #include <clang/Format/Format.h> int main(int argc, char *argv[]) { clang::format::getLLVMStyle(); return 0; } % g++ -lclang ./main.cc /usr/bin/ld: /tmp/fcelda/cc6A7cYr.o: undefined reference to symbol '_ZN5clang6format12getLLVMStyleEv' /usr/lib64/libclangFormat.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status You need to link explicitly: % g++ -lclangFormat ./main.cc % echo $? 0 Or copy the indirect dependencies when linking (but be careful with that): % g++ ./main.cc -Wl,--copy-dt-needed-entries -lclang % echo $? 0 |