LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2015, 05:39 AM   #1
om178890
LQ Newbie
 
Registered: Aug 2015
Posts: 19

Rep: Reputation: Disabled
Cross Complaition issue for bianry usages


Hi ,

Currently i am doing C code compliation on X86_64 bit arch machine. But i found that a few binary for this is missing. But these binaries are present on arch i686 or MIPS.

When i use the binaies from i686 or MIPS to my X86_46 arch then it gives the error of Incomatibility.

So, is it possible to use those binary from arch i686 or MIPS to my X86_64 compilation.

Currently i am proceeding with "touch" command.
 
Old 08-07-2015, 06:37 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
To use 686 binaries on X86_64 you need the 686 libraries that those binaries need.

To run MIPS binaries on X86_64 (or i686 for that matter) requires a MIPS emulator/VM AND all the supporting software that VM needs.
 
Old 08-07-2015, 06:45 AM   #3
om178890
LQ Newbie
 
Registered: Aug 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi Jpollard,

Can you please explain me in brief "To use 686 binaries on X86_64 you need the 686 libraries that those binaries need."

How ca i proceed.

Last edited by om178890; 08-07-2015 at 06:47 AM.
 
Old 08-07-2015, 07:51 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by om178890 View Post
Hi Jpollard,

Can you please explain me in brief "To use 686 binaries on X86_64 you need the 686 libraries that those binaries need."

How ca i proceed.
The linux kernel has support for 32 bit binaries built in. But the applications for 32 bit need to use libraries that are compiled for 32 bit. If the 32 bit libraries are not on the X86-64 system trying to run the 32 bit binary, then the binary won't run.

What you have to do is identify the missing libraries, and install them. Normally, these ought to be in the distributions package repository, but not installed by default. The 32 bit libraries are put in /lib (or /usr/lib), where the 64 bit libraries are in /lib64 (or /usr/lib64), thus preserving the separation. Many x86-64 system will already have some 32 bit libraries (some of the system tools use it, but that may be fading out).
 
1 members found this post helpful.
Old 08-07-2015, 11:26 AM   #5
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by jpollard View Post
The linux kernel has support for 32 bit binaries built in. But the applications for 32 bit need to use libraries that are compiled for 32 bit. If the 32 bit libraries are not on the X86-64 system trying to run the 32 bit binary, then the binary won't run.

What you have to do is identify the missing libraries, and install them. Normally, these ought to be in the distributions package repository, but not installed by default. The 32 bit libraries are put in /lib (or /usr/lib), where the 64 bit libraries are in /lib64 (or /usr/lib64), thus preserving the separation. Many x86-64 system will already have some 32 bit libraries (some of the system tools use it, but that may be fading out).
This is the correct answer. Package managers will list all dependencies when you install a 32bit package. If you install those, then you can run both 64bit and 32bit in GNU/Linux.
 
1 members found this post helpful.
  


Reply



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
cross compilation issue with openssh harinathreddy.c Linux - Software 1 07-16-2013 08:03 AM
Cross compile GDB issue kotao_78 Programming 3 05-19-2013 09:35 PM
Cross-compilation issue in Ubuntu 12.04 indarkness Ubuntu 0 02-11-2013 11:44 PM
[SOLVED] Listing threads: procps cross compile issue Ajay Kumar Linux - Embedded & Single-board computer 2 12-19-2011 10:29 AM
multicast cross-talk issue - anybody else confirm ? guillaumerava Linux - Networking 2 12-20-2009 09:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:50 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