Compiling 32-bit programs for i386 intel on 64-bit Linux

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.