[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ARM "file format not recognised" mess



Dear All,

Until June I was a happy bunny.  Then something broke, as I reported here:

    http://lists.debian.org/debian-embedded/2007/06/msg00039.html

Neil Williams offered a solution:

Your libc6-arm-cross seems to be out of sync with your
libc-dev-arm-cross.

Use:
apt-cross -v -i libc6-dev libc6

which worked (thanks Neil!) in as much as I am able to apt-get new native packages.

Unfortunately I have now tried to use my cross-compilation environment again and it is broken instead:

$ arm-linux-gnu-g++ -o mt3 mt3.o
/usr/lib/gcc/arm-linux-gnu/4.1.2/../../../../arm-linux-gnu/lib/libm.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

It looks as if my libc and libm (i.e. the things that were upgraded by the fix above) are now incompatible with my gcc. I presume this is some sort of ABI version thing. According to file:

/usr/arm-linux-gnu/lib/libc-2.6.1.so: ELF 32-bit LSB shared object, ARM, version 1 (ARM), for GNU/Linux 2.6.12, stripped

while the .o files my compiler produces are:

mt3.o: ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

and libc on my target hardware is:

/lib/libc-2.3.6.so: ELF 32-bit LSB shared object, ARM, version 1 (ARM), for GNU/Linux 2.4.1, stripped


I'm not at all keen to upgrade everything, but I will if you think that's going to be simplest. I would much rather revert to a libc that will work like everything did before June.

There's another possibility. A while ago I converted my target hardware [an NSLU2 and another similar XScale board, both running Debian] to use an NFS root filesystem. So I could just mount this under /usr/arm-linux-gnu/ on my cross-compilation PC. Would this make things simpler?

Many thanks for any advice. I decided to post here first, rather than tinkering, on the basis that "when in a hole, stop digging".


Regards,

Phil.

p.s. you're welcome to Cc: me in any replies, as I'll see them sooner.





Reply to: