How to compile and install a 32Bit library on a 64 Bit (Ubuntu 12.04LTS) Linux using autotools, make and gcc? -


i'm trying compile 32bit version of linux library on 64bit ubuntu 12.04lts running inside vm (virtualbox).

so far i've downloaded source, unzipped , performed following steps build lib:

libtoolize --force automake --add-missing ./configure --build=i686-pc-linux-gnu "cflags=-m32" "cxxflags=-m32" "ldflags=-m32" make sudo make install 

with i've been able build compile library but, once run "readelf -h" on compiled lib following output:

  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 file)   start of section headers:          53904 (bytes file)   flags:                             0x0   size of 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 

so i'm stuck 64bit version of library , have not yet found way force build , installation of 32bit version. i'd grateful hints on how solve problem.

you set --build in options ./configure. means ./configure should behave if program being compiled on 32-bit computer. if want run on 32-bit computer well, should use --host=i386-linux-gnu. real configure command want run is:

./configure --build=i386-linux-gnu --host=i386-linux-gnu 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -