LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   i386 libc6 library "could not read symbols: File in wrong format" (https://www.linuxquestions.org/questions/linux-software-2/i386-libc6-library-could-not-read-symbols-file-in-wrong-format-4175511713/)

cantux 07-21-2014 01:22 AM

i386 libc6 library "could not read symbols: File in wrong format"
 
I accepted a fishy update to my x64 Debian Wheezy and due to some conflicts it removed some files like libpthread.so from the i386-linux-gnu directory. I reinstalled libc6:i386 and took some packages off the internet and linked them by hand.
Now I am left with the error on the subject. I found librt.so from Debian packages. Downloaded and linked it. Here is the build output:

mipsel-linux-gcc -g -g3 -o ***MediaTransportCurrentTime -Xlinker --start-group ***MediaTransportCurrentTimeTest.o ***MediaTransportMain.o ***MediaTransportCurrentTime/main.o ***TestFramework.a ***Crypto/Crypto.a ***Decoder.a ***PhysMemMgr.a ***StringSafe.a ***WinEmulate.a ***Executive.a ***Sockets.a ***XDrm.a ***Decoder.a ***DRM.a ***MBR.a ***MP4Parser.a ***Receiver.a ***Socket.a ***Renderer.a ***Streamer.a ***Transport.a ***Utilities.a ***MediaTransportBaseTest.a ***MediaTransportTestFramework.a ***TLCommon.a -Xlinker --end-group -lpthread ***libz.a -lnexus -L***/bin -lrt -lpthread -Wl,-Map=***MediaTransportCurrentTime.map /usr/lib/i386-linux-gnu/librt.so /usr/lib/i386-linux-gnu/libpthread.so /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libgstreamer-0.10.so /usr/lib/libgstinterfaces-0.10.so /usr/lib/libgstbase-0.10.so /usr/lib/libgstaudio-0.10.so /usr/lib/i386-linux-gnu/libX11.so /usr/lib/i386-linux-gnu/libz.so
/usr/lib/i386-linux-gnu/librt.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[5]: *** [***MediaTransportCurrentTime] Error 1
make[4]: *** [MediaTransportCurrentTime] Error 2
make[3]: *** [Integration] Error 2
make[2]: *** [Apps] Error 2
make[1]: *** [Test] Error 2
root@debian:/usr/lib/i386-linux-gnu# file librt.so
librt.so: symbolic link to `librt-2.19.so'
root@debian:/usr/lib/i386-linux-gnu# file librt-2.19.so
librt-2.19.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), BuildID[sha1]=0xc7d6c053f8b6cc08af07a069e2e798cf9b8d32c3, for GNU/Linux 2.6.32, stripped

Any suggestion is appriciated.

jdkaye 07-22-2014 12:43 AM

I don't undertand. You say you are running Wheezy and yet you have libc version 2.19 installed? Jessie uses 2.19 but Wheezy uses 2.13. That's going to cause lots of problems. I don't understand what "I accepted a fishy update to my x64 Debian Wheezy". Who did you accept it from? Don't you use normal Debian repositories for updating your software? What does your /etc/apt/sources.list file look like?
Oh and shouldn't you be using a 3.2 kernel for Wheezy. I checked and the 2.6 is in the oldlibs subsection and is just a dummy package.
jdk

pan64 07-22-2014 01:15 AM

probably I missed something, you used mipsel-linux-gcc as compiler and tried to link i386 libs. That will not work (if I understand it well), that's why you got this message: could not read symbols: File in wrong format

cantux 07-22-2014 02:09 AM

Quote:

Originally Posted by jdkaye (Post 5207668)
I don't undertand. You say you are running Wheezy and yet you have libc version 2.19 installed? Jessie uses 2.19 but Wheezy uses 2.13. That's going to cause lots of problems. I don't understand what "I accepted a fishy update to my x64 Debian Wheezy". Who did you accept it from? Don't you use normal Debian repositories for updating your software? What does your /etc/apt/sources.list file look like?
Oh and shouldn't you be using a 3.2 kernel for Wheezy. I checked and the 2.6 is in the oldlibs subsection and is just a dummy package.
jdk

Hi,

I have x64 and when I installed gstreamer:i386 2.19 must have came along with it.

As fishy update I mean an official one. It showed lots of conflicts and removed 186 MB of libraries.

Can you please help me understand how libc6:i386 and libc6:amd64 can conflict? There is the chance that both are using /usr/lib and files in that directory will get replaced(In that case installer should distinguish the system compiler and cross compiler). What are the other reasons?

By the way, I also have a mipsel toolchain in a separate directory. I ran #find -name librt. It does not exist in the toolchain. So if the application wants those libraries the only source is i386.

root@debian:/opt/toolchains/stbgcc-4.5.4-2.6# cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main

deb http://ftp.tr.debian.org/debian/ wheezy main
deb-src http://ftp.tr.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.tr.debian.org/debian/ wheezy-updates main
deb-src http://ftp.tr.debian.org/debian/ wheezy-updates main

cantux 07-22-2014 02:15 AM

Quote:

Originally Posted by pan64 (Post 5207679)
probably I missed something, you used mipsel-linux-gcc as compiler and tried to link i386 libs. That will not work (if I understand it well), that's why you got this message: could not read symbols: File in wrong format

Thanks for the reply. That baffled me too. This build worked before I recieved an update. I have a separate toolchain for mipsel and it does not include the libraries. I asked a fried who is able to compile to give me a verbose build log. I will post it. There is the weak chance that makefile is pointing to wrong directory.

cantux 07-22-2014 02:16 AM

Quote:

Originally Posted by jdkaye (Post 5207668)
I don't undertand. You say you are running Wheezy and yet you have libc version 2.19 installed? Jessie uses 2.19 but Wheezy uses 2.13. That's going to cause lots of problems. I don't understand what "I accepted a fishy update to my x64 Debian Wheezy". Who did you accept it from? Don't you use normal Debian repositories for updating your software? What does your /etc/apt/sources.list file look like?
Oh and shouldn't you be using a 3.2 kernel for Wheezy. I checked and the 2.6 is in the oldlibs subsection and is just a dummy package.
jdk

I forgot to mention that I also tried 2.13 and failed miserably.

pan64 07-22-2014 02:25 AM

you can check with the command file not only the libs but the archives and object files too: file MediaTransportMain.o or file Decoder.a.

cantux 07-22-2014 02:44 AM

It turns out that error was caused by a unit test which explains the linking of i386 libraries. We get this from a third party software company. This was an error in the build script. Thanks for helping. Now that this thread is moot, how should I edit the title?

pan64 07-22-2014 03:48 AM

I would rather set it to solved and open another if you have additional questions


All times are GMT -5. The time now is 09:22 AM.