OK, meanwhile we installed a 64bit CentOS. Sure, it's easy to compile against x86_64 with the required build tools installed ;-)
Cross-building 64bit userspace program on 32bit CentOS (RHEL) 6
-
18-10-2022 - |
문제
I have a 32bit development machine based on CentOS6 properly configured for my needs, but now have to compile parts of my code for usage on 64bit Linux. It is about a native library (.so).
With my 32bit CPU and 32bit OS, I try to compile the library for a 64bit OS environment. For getting the proper tools therefore, I installed the RPM packages x86_64-linux-gnu-gcc and binutils-x86_64-linux-gnu. Instead of gcc I'm using x86_64-linux-gnu-gcc now, but the compilation fails.
Furthermore, when reading the package's meta information, I get the following text:
Only building kernels is currently supported. Support for cross-building user space programs is not currently provided as that would massively multiply the number of packages.
Now my questions on this:
- does it make sense at all to cross-compile 64bit binaries on an existing 32bit build system, or might the resulting code get problematic when running on a 64bit machine?
- are there third party packages compatible with CentOS6 providing the missing userspace support the installed package is missing?
해결책