arm-linux-gnueabihf/libbfd-2.28-system.so is not an ELF file - it has the wrong magic bytes at the start.

Bug #1764984 reported by Darren Conway
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

I am running Stretch
I tried to compile a C program mjpg-streamer.
I ran apt-get update and upgrade before doing:

The compiler failed with the following output.

:/tmp/mjpg-streamer/mjpg-streamer-experimental $ cmake ./
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /tmp/mjpg-streamer/mjpg-streamer-experimental/CMakeFiles/CMakeTmp

I traced the problem to a problem with a lib file:

I copied the file:

-rw-r--r-- 1 root root 748168 Apr 18 09:39 libbfd-2.28-system.so

from a Pi that compiles OK and placed it in the directory:

cd /usr/lib/arm-linux-gnueabihf/

This replaced the file:

-rw-r--r-- 1 root root 748168 May 10 2017 libbfd-2.28-system.so

Note the different dates but same version and same size.
I was then able to compile normally.

When I did the upgrade, I got the message:
ldconfig: /usr/lib/arm-linux-gnueabihf/libbabeltrace.so.1 is not an ELF file - it has the wrong magic bytes at the start.
The file does not seem to have affected anything I am trying to do.

I had the same problem on two different Pi's. Neither had been used to compile programs. As far as I am aware, I haven't done anything that might have caused this problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.