[llvm-bugs] [Bug 40059] New: Error in static libraries for LLVM 7 on Debian 9

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 17 16:29:27 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=40059

            Bug ID: 40059
           Summary: Error in static libraries for LLVM 7 on Debian 9
           Product: Packaging
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: deb packages
          Assignee: unassignedbugs at nondot.org
          Reporter: maxime.arthaud at nasa.gov
                CC: llvm-bugs at lists.llvm.org

Hello,

It looks like there is something wrong with the static libraries provided by
llvm-7-dev on Debian 9.6
I'm getting link errors when I try to compile my tool.


root at f67f01e4d08f:~/ikos/build# make all
[...]
[ 35%] Linking CXX executable ikos-pp
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 24] has no SHF_GROUP sections
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 25] has no SHF_GROUP sections
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 26] has no SHF_GROUP sections
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 24] has no SHF_GROUP sections
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 25] has no SHF_GROUP sections
/usr/bin/ld: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o):
SHT_GROUP section [index 26] has no SHF_GROUP sections
/usr/lib/llvm-7/lib/libLLVMBitWriter.a: error adding symbols: File format not
recognized
collect2: error: ld returned 1 exit status
frontend/llvm/CMakeFiles/ikos-pp.dir/build.make:134: recipe for target
'frontend/llvm/ikos-pp' failed
make[2]: *** [frontend/llvm/ikos-pp] Error 1
CMakeFiles/Makefile2:1547: recipe for target
'frontend/llvm/CMakeFiles/ikos-pp.dir/all' failed
make[1]: *** [frontend/llvm/CMakeFiles/ikos-pp.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2


It seems like all the .a have an invalid format:

root at f67f01e4d08f:~/ikos/build# nm /usr/lib/llvm-7/lib/libLLVMBitWriter.a

BitWriter.cpp.o:
0000000000000000 T LLVMWriteBitcodeToFD
0000000000000000 T LLVMWriteBitcodeToFile
0000000000000000 T LLVMWriteBitcodeToFileHandle
0000000000000000 T LLVMWriteBitcodeToMemoryBuffer
                 U _ZN4llvm11raw_ostream14flush_nonemptyEv
                 U
_ZN4llvm12MemoryBuffer16getMemBufferCopyENS_9StringRefERKNS_5TwineE
                 U
_ZN4llvm14raw_fd_ostreamC1ENS_9StringRefERSt10error_codeNS_3sys2fs9OpenFlagsE
                 U _ZN4llvm14raw_fd_ostreamC1Eibb
                 U _ZN4llvm14raw_fd_ostreamD1Ev
                 U
_ZN4llvm18WriteBitcodeToFileERKNS_6ModuleERNS_11raw_ostreamEbPKNS_18ModuleSummaryIndexEbPSt5arrayIjLm5EE
                 U _ZN4llvm18raw_string_ostreamD1Ev
                 U _ZN4llvm24DisableABIBreakingChecksE
0000000000000000 V _ZN4llvm30VerifyDisableABIBreakingChecksE
                 U _ZNSt3_V215system_categoryEv
                 U _ZTVN4llvm18raw_string_ostreamE
                 U _ZdlPv
                 U strlen
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriter.cpp.o): SHT_GROUP
section [index 179] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriter.cpp.o): SHT_GROUP
section [index 180] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriter.cpp.o): SHT_GROUP
section [index 181] has no SHF_GROUP sections
[...]
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriter.cpp.o): SHT_GROUP
section [index 277] has no SHF_GROUP sections
nm: BitcodeWriter.cpp.o: File format not recognized
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o): SHT_GROUP
section [index 24] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o): SHT_GROUP
section [index 25] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(BitcodeWriterPass.cpp.o): SHT_GROUP
section [index 26] has no SHF_GROUP sections
[...]
nm: BitcodeWriterPass.cpp.o: File format not recognized
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(ValueEnumerator.cpp.o): SHT_GROUP
section [index 94] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(ValueEnumerator.cpp.o): SHT_GROUP
section [index 95] has no SHF_GROUP sections
nm: /usr/lib/llvm-7/lib/libLLVMBitWriter.a(ValueEnumerator.cpp.o): SHT_GROUP
section [index 96] has no SHF_GROUP sections
[...]
nm: ValueEnumerator.cpp.o: File format not recognized


To reproduce:
# echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" >>
/etc/apt/sources.list
# apt-get update
# apt-get install -y --allow-unauthenticated llvm-7-dev
# nm /usr/lib/llvm-7/lib/libLLVMBitWriter.a


Bug report on IKOS: https://github.com/NASA-SW-VnV/ikos/issues/23

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181218/812ade8f/attachment-0001.html>


More information about the llvm-bugs mailing list