Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rcarreiro
Beginner
107 Views

Can you build 64-bit binaries on 32-bit Linux system?

This is with respect to version 11.1.073 of the compiler for Linux. The compiler is installed on a 32-bit linux system. Can you cross-compile to 64-bit executables/libraries/shared libraries on such a platform. I understand you can not RUN OR USE those binaries on a 32-bit system. But I would like to know if I can create them there. Or do I have to re-install the compiler on a 64-bit linux system if I want to make 64-bit binaries? Thanks!
0 Kudos
3 Replies
TimP
Black Belt
107 Views

No, it's well outside what is supported. You would first need a full installation of g++ cross compiler (including glibc) for your x86_64 target. As that isn't provided by the supported linux distros to my knowledge, that part of it would be a do-it-yourself project. All the prerequisites are already present in a g++ installation on linux x86_64.

rcarreiro
Beginner
107 Views

How about the other way? Assuming I install packages like ia32-libs and the like, can you build 32-bit binaries with the Intel compiler on a 64-bit system? (I would like to have a unified build machine rather than having to have separate 32-bit and 64-bit build machines.)
jimdempseyatthecove
Black Belt
107 Views

Assuming you have the compiler and environment configured correctly you can build and run/debug 32-bit binaries on 64-bit platform.

Jim Dempsey
Reply