LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-21-2014, 01:22 AM   #1
cantux
LQ Newbie
 
Registered: Apr 2014
Posts: 10

Rep: Reputation: Disabled
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.
 
Old 07-22-2014, 12:43 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 07-22-2014, 01:15 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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
 
1 members found this post helpful.
Old 07-22-2014, 02:09 AM   #4
cantux
LQ Newbie
 
Registered: Apr 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jdkaye View Post
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
 
Old 07-22-2014, 02:15 AM   #5
cantux
LQ Newbie
 
Registered: Apr 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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.
 
Old 07-22-2014, 02:16 AM   #6
cantux
LQ Newbie
 
Registered: Apr 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jdkaye View Post
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.
 
Old 07-22-2014, 02:25 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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.
 
1 members found this post helpful.
Old 07-22-2014, 02:44 AM   #8
cantux
LQ Newbie
 
Registered: Apr 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
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?
 
Old 07-22-2014, 03:48 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
I would rather set it to solved and open another if you have additional questions
 
1 members found this post helpful.
  


Reply

Tags
cross-compile, i386, linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Glade compile error, could not read symbols: File in wrong format Lethys Slackware 5 10-01-2016 05:28 AM
[SOLVED] I keep getting this error: "File in wrong format" reguser23 Slackware 7 08-17-2016 01:11 PM
Fedora 7 64bit /usr/lib/libexpat.so: could not read symbols: File in wrong format GATTACA Fedora 1 06-21-2007 07:47 PM
/usr/lib/libfontconfig.so: could not read symbols: File in wrong format TrekJunky Linux - Newbie 2 10-01-2006 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration