LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cross Complaition issue for bianry usages (https://www.linuxquestions.org/questions/linux-newbie-8/cross-complaition-issue-for-bianry-usages-4175550115/)

om178890 08-07-2015 05:39 AM

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.

jpollard 08-07-2015 06:37 AM

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.

om178890 08-07-2015 06:45 AM

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.

jpollard 08-07-2015 07:51 AM

Quote:

Originally Posted by om178890 (Post 5402350)
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).

zeebra 08-07-2015 11:26 AM

Quote:

Originally Posted by jpollard (Post 5402372)
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.


All times are GMT -5. The time now is 08:44 AM.