Build 32-bit Qt on 64-bit Ubuntu 10.04 LTS

  • Hi everybody!
    How do I build 32-bit Qt under 64-bit Linux? I have trouble with libraries, notably with x11 ("X11 functionality failed" message during configure). What packages do I have to install and what mkspec I have to use? I tried linux-g++-32, is it correct?

  • Moderators

    The mkspec does work for what you want to do.

    You will need 32bit versions of all the libraries Qt depends on as well as their header files and then make sure the gcc is run with the flag "-m32" and the correct libraries are picked up, etc.

    I find that too annoying to deal with and set up a directory containing a 32bit installation of my linux of choice (debian/ubuntu can do that using the debootstrap tool). I am then using chroot to switch into that directory (you will need to bind-mount /dev, /sys and /proc into that directory using "mount -o bind /dev /path/dev"). Afterwards I can install all the 32bit apps and libraries I need there and build Qt using the linux-g++ mkspec. Debian has a utility called schroot that makes using such a setup really practical.

  • Thank you, I've followed your instructions and managed to build it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.