Boost Users :
Subject: Re: [Boost-users] problems with 32-bit Boost libs on Linux 64-bit with multilib gcc
From: Damien Hocking (damien_at_[hidden])
Date: 2009-03-03 10:17:47
I fixed this myself. I had to comment out the gcc in /etc/site-config.jam and change the gcc entry in user-config.jam to
gcc : 4.3.2 : g++-4.3 : <compileflags>-m32 <linkflags>-m32 ;
This works, but it's pain to have to do that when I've asked for the address model in the bjam command already and I have to comment it out for 64-bit builds.
From: Damien Hocking [mailto:damien_at_[hidden]]
Sent: Sun, 01 Mar 2009 17:29:24 -0700
Subject: [Boost-users] problems with 32-bit Boost libs on Linux 64-bit with multilib gcc
I'm having some problems with building a 32-bit Boost on a 64-bit Linux. I'm building 1.38 and I need 64 and 32-bit version of the libraries. The compiler is gcc 4.3.2 with the multilibs installed (Ubuntu 8.10). My builds go through successfully, but when I link my 32-bit version of my application to what should be 32-bit Boost libraries, I get the "skipping incompatible" warning from the linker, which means that the address model is wrong. For example:
/usr/bin/ld: skipping incompatible 3rdparty/boost/linux/x86/debug/libboost_serialization-gcc43-mt-d-1_38.so
The 64-bit libraries are fine and the application links and runs correctly. I noticed in gcc.jam there's a comment about not being able to build a clean 32-bit binary with a 64-bit compiler. This is my bjam command for a 32-bit Boost build:
bjam --build-dir=./build32 address-model=32 --build-type=complete --stagedir=./stage32 stage
Do I need a -m32 in a config file or something extra on that command line?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net