【发布时间】:2014-05-31 15:06:31
【问题描述】:
我正在尝试在虚拟机(VirtualBox)内运行的 64 位 Ubuntu 12.04LTS 上编译 32 位版本的 linux 库。
到目前为止,我已经下载了源代码,解压缩并执行了以下步骤来构建库:
libtoolize --force
automake --add-missing
./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
make
sudo make install
有了这个,我已经能够构建一个编译库,但是,一旦我在编译的库上运行“readelf -h”,我会得到以下输出:
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1ac0
Start of program headers: 64 (bytes into file)
Start of section headers: 53904 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 7
Size of section headers: 64 (bytes)
Number of section headers: 35
Section header string table index: 32
所以我坚持使用 64 位版本的库,还没有找到强制构建和安装 32 位版本的方法。对于如何解决此问题的提示,我将不胜感激。
【问题讨论】:
标签: linux ubuntu gcc makefile autotools