This is an archive of the discontinued LLVM Phabricator instance.

[liblang] Remove DOS line endings in libclang.exports
ClosedPublic

Authored by ro on Jun 21 2018, 5:33 AM.

Details

Summary

libclang.so fails to link on Solaris:

Undefined first referenced
symbol in file
clang_getCompletionFixIt /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getTokenLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getToken /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getTemplateCursorKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getTUResourceUsageName /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionChunkKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionChunkText /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getSpellingLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionParent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionChunkCompletionString /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionPriority /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionNumFixIts /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getTokenExtent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getCompletionNumAnnotations /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
clang_getTokenKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
make[2]: *** [tools/clang/tools/libclang/CMakeFiles/libclang.dir/build.make:651: lib/libclang.so.7] Error 1

It turns out that this is caused by https://reviews.llvm.org/D46862: it added a
couple of CRs (^M) to some lines. Solaris ld takes them to be part of the symbol
names, which of course are missing from the input objects. GNU ld handles this
just fine. Fixed by removing the CRs.

Bootstrapped on i386-pc-solaris2.11. I guess this is obvious.

Diff Detail

Repository
rC Clang

Event Timeline

ro created this revision.Jun 21 2018, 5:33 AM
yvvan accepted this revision.Jun 21 2018, 5:37 AM
yvvan added a subscriber: yvvan.

Thanks! I probably forgot to check line endings for this file before committing which I do for source files and headers...

This revision is now accepted and ready to land.Jun 21 2018, 5:37 AM
This revision was automatically updated to reflect the committed changes.