In edit
# ld-v
GNU ld version 2.15.92.0.2 20040927
Supported Emulations:
Elf_x86_64
Elf_i386
I386linux
#ld-M elf_i386
Along with The-m32 flag in GCC, your may need to include the-melf_i386 flag for LD to properly link the 32bit object
Files to the 32bit libraries if you have both the 32bit and 64bit libraries.
Make libdir=/usr/lib64
Make Libdir=/usr/lib
The system needs to link 64-bit library files while/usr/lib/libexpat.so is the 32-bit ELF format, so the format is not correct. When configure is added
ldflags= "-l/usr/lib64-l/lib64" option
./configure cflags=-m32 cxxflags=-m32 fflags=-m32 fcflags=-m32 ldflags=-melf_i386--prefix=/root/j131/testhttpd/ Apache-32bit
./configure cflags=-m32 cxxflags=-m32 fflags=-m32 fcflags=-m32 ldflags= "-l/usr/lib"--prefix=/root/j131/testhttpd/ Apache-32bit
Modify Apr-config
Vi/usr/local/apache2/bin/apr-config
Modify Ldflags= "" to Ldflags= "-lz"
Compiling 32-bit programs for i386 intel on 64-bit Linux