To develop binaries for the other architecture on a biarch architecture, the respective libraries for the second architecture must additionally be installed. These packages are called rpmname-32bit if the second architecture is a 32-bit architecture or rpmname-64bit if the second architecture is a 64-bit architecture.
You also need the respective headers and libraries from the rpmname-devel packages and the development libraries for the second architecture from rpmname-devel-32bit or rpmname-devel-64bit. For example, to compile a program that uses libaio on a system whose second architecture is a 64-bit architecture, you need the following RPMs:
32-bit runtime package
Headers and libraries for the 32-bit development
64-bit runtime package
64-bit development libraries
Most Open Source programs use an autoconf-based program configuration. To use autoconf for configuring a program for the second architecture, overwrite the normal compiler and linker settings of autoconf by running the configure script with additional environment variables.
The following example refers to a ppc system with ppc64 as the second architecture:
Set autoconf to use the 64-bit compiler:
CC="gcc -m64"
Instruct the linker to process 64-bit objects:
LD="ld -m elf64ppc"
Set the assembler to generate 64-bit objects:
AS="gcc -c -m64"
Determine that the libraries for libtool and so on come from /usr/lib64:
LDFLAGS="-L/usr/lib64"
Determine that the libraries are stored in the lib64 subdirectory:
--libdir=/usr/lib64
Determine that the 64-bit X libraries are used:
--x-libraries=/usr/X11R6/lib64/
Not all of these variables are needed for every program. Adapt them to the respective program.
An example configure call could appear as follows:
CC="gcc -m64" \ LDFLAGS="-L/usr/lib64;" \ .configure \ --prefix=/usr \ --libdir=/usr/lib64 make make install