Bug#943623: objects in libclangIndex.a are llvm ir bitcode

Shengjing Zhu zhsj at debian.org
Sun Oct 27 12:08:56 GMT 2019


Package: libclang-9-dev
Version: 1:9.0.0-1
Severity: serious
Control: affects -1 ccls

As for 1:9.0.0-1

ar x /usr/lib/llvm-9/lib/libclangIndex.a
file *.o

CodegenNameGenerator.cpp.o: LLVM IR bitcode
CommentToXML.cpp.o:         LLVM IR bitcode
FileIndexRecord.cpp.o:      LLVM IR bitcode
IndexBody.cpp.o:            LLVM IR bitcode
IndexDecl.cpp.o:            LLVM IR bitcode
IndexingAction.cpp.o:       LLVM IR bitcode
IndexingContext.cpp.o:      LLVM IR bitcode
IndexSymbol.cpp.o:          LLVM IR bitcode
IndexTypeSourceInfo.cpp.o:  LLVM IR bitcode
USRGeneration.cpp.o:        LLVM IR bitcode

While version 1:9-1 shows

CodegenNameGenerator.cpp.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
CommentToXML.cpp.o:         ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
FileIndexRecord.cpp.o:      ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexBody.cpp.o:            ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexDecl.cpp.o:            ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexingAction.cpp.o:       ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexingContext.cpp.o:      ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexSymbol.cpp.o:          ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
IndexTypeSourceInfo.cpp.o:  ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
USRGeneration.cpp.o:        ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

This causes GNU ld fails to link, errors are:

  /usr/lib/llvm-9/lib/libclangIndex.a error adding symbols: archive has no index; run ranlib to add one

I checked the upstream prebuild tarball, the objects in libclangIndex.a are ELF.

So I think this is bug in the Debian package, and is a regression from the version in testing.

Thanks



More information about the Pkg-llvm-team mailing list