I want to install 32-bit odbc with 64-bit odbc binary, but it keeps building with 64-bit.
./configure --prefix=$HOME/unixODBC --sysconfdir=$HOME/unixODBC/etc --build=ppc32-pc-linux-gnu --host=ppc64-pc-linux-gnu
Checking build system type... Invalid configuration ppc32-pc-linux-gnu': machine
ppc32-pc' not recognized It says that it does not recognize ppc32 as follows, and when you insert only ppc, it builds to 64 bits.
If you know how to build from 64-bit powerpredhat to 32-bit with the configure file, please answer.
for reference http://stackoverflow.com/questions/1272357/how-to-compile-a-32-bit-binary-on-a-64-bit-linux-machine-with-gcc-cmake
powerpc crosscompile build
For gcc -mXX ( -m32, -m64, ... ) Options are options that you adjust.
When configuring, try to include -m32 in CFLAGS or CXXFLAGS options.
For C source
CFLAGS="-m32 <Other C compilation options>"./configure....
For C++ sources
CXXLAGS="-m32 <Other C++ Compilation Options>"./configure....
If C and C++ are mixed
CFLAGS="-m32 <Other Ccompile Options>" CXXLAGS="-m32 <Other C++ Compile Options>"./configure....
And if the purpose is to run the compilation results on that machine, I think it's certain to build it static. Most configurations provide build options such as --enable-static, --disable-static, --enable-shared, --disable-shared.
CFLAGS="-m32 <Other Options>"./configure --enable-static ...
Or
CFLAGS="-m32 <Other Options>" ./configure --enable-static --disable-static ...
And the libraries that you need for compilation are compiled in 32 bits.
Try it as above.
© 2024 OneMinuteCode. All rights reserved.