https://sourceware.org/bugzilla/show_bug.cgi?id=33198
Bug ID: 33198 Summary: Strip fails to process an archive containing a LLVM bitcode file Product: binutils Version: 2.45 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: nickc at redhat dot com Target Milestone: --- Created attachment 16195 --> https://sourceware.org/bugzilla/attachment.cgi?id=16195&action=edit static archive containing an LLVM bitcode file This is a report of a Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2382341 The original report stated that: -------------------------------------------------------------- I'm trying to build llvm 21.1.0-rc1 in COPR (https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm21/fedora-rawhide-x86_64/09283117-llvm/builder-live.log.gz) and it is failing because strip encounters an error trying to strip lto sections from a static archive containing only llvm bitcode files. What's interesting is when I debug this, I get a different behavior locally than when running in mock: Locally: bash-5.2# strip --version && sha1sum libompdevice.a && strip -R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1 libompdevice.a GNU strip version 2.44.90.20250713 Copyright (C) 2025 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. eb47fddcb144a0faba448139df08fd33ec49ab54 libompdevice.a strip: libompdevice.a(libomptarget-amdgpu.bc): Unable to recognise the format of file: file format not recognized bash-5.2# echo $? 0 In Mock: <mock-chroot> sh-5.3# strip --version && sha1sum libompdevice.a && strip -R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1 libompdevice.a GNU strip version 2.44.90.20250713 Copyright (C) 2025 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. eb47fddcb144a0faba448139df08fd33ec49ab54 libompdevice.a strip: libompdevice.a: file format not recognized <mock-chroot> sh-5.3# echo $? 1 ----------------------------------------------------------- After investigating it turns out that when strip was run locally the llvm-libs rpm was not installed, and so the LLVMgold.so plugin was not available. This is why the strip succeeded. In the mock version, the plugin was available and this prevented strip from working. It was also found that using a earlier version of strip, eg from the 2.44 release, would also solve the problem. This of course is because prior to 2.45 strip did not support using plugins. -- You are receiving this mail because: You are on the CC list for the bug.