How to build 32-bit builds on 64-bit Ubuntu
David Holmes
david.holmes at oracle.com
Mon Oct 29 21:03:39 PDT 2012
Hi Magnus,
On 30/10/2012 1:59 AM, Magnus Ihse Bursie wrote:
> I was asked to document how to build 32-bit builds on 64-bit Ubuntu.
>
> You need to install three packages:
> sudo apt-get install libc6-dev-i386 lib32stdc++6 ia32-libs
We also had to do:
apt-get install libxext-dev:i386 libxrender-dev:i386 libxtst-dev:i386
for X11. But these are the 32-bit libs that broke their 64-bit
counterparts. I don't know exactly which one is to blame, or whether it
has now been fixed upstream. We have had a lot of problems trying to
install 32-bit libraries on these Ubuntu systems.
> However, these are broken, and do not place proper symlinks. (This is a
> bug that should probably be reported upstream to Ubuntu, if anyone
> bothers...). Therefore, you also need to do:
> sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
> sudo ln -s /usr/lib32/libasound.so.2 /usr/lib32/libasound.so
We have not had to do this AFAIK for our servers. At least for libasound
there is an asound-dev package that has to be installed. It may be
lib32asound-dev (can't check as the build servers are offline due to the
storm).
Also I think we installed gcc-multilib
David
> Then you can do "sh configure --with-target-bits=32" and be happy! :-)
>
> One important note, however. There is no Ubuntu package (as far as I
> could find) containing a static (.a) version of libstdc++, so this will
> create a configuration with dynamic linking. For community builds, this
> is fine (probably more than fine -- the expected behavior), but it's not
> good for official Oracle builds. We'll have to find another solution
> internally.
>
> /Magnus
More information about the build-infra-dev
mailing list