How to build Qt 4.8.4 from source for 64bit or 32bit targets
-
@KroMignon , when building using:
./configure
I see the build uses g++ with -m64, is there a way to get it to build for a 32bit target?
wrote on 3 May 2022, 15:45 last edited by@SPlatten according to post https://forum.qt.io/post/521682, this should do the job:
./configure -platform linux-g++-32
-
@SPlatten according to post https://forum.qt.io/post/521682, this should do the job:
./configure -platform linux-g++-32
wrote on 3 May 2022, 15:48 last edited by@KroMignon said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:
./configure -platform linux-g++-32
Thank you, will give it a go.
-
wrote on 3 May 2022, 19:53 last edited by
Last year I had to cross-compile Qt 4 (in my case: Qt 4.4) for a number (4+) of different embedded targets. The compilers that were available to me for each platform each had their own quirks. Sometimes simply invoking the compiler from its full, absolute path was enough to make everything build and link, and other times it was necessary to explicitly manipulate some environment variables, to source some provided bash files, and to discern some specific compiler flags to add to the command line.
Two of the scripts that I ended up with are public on github.
To be clear, I am not suggesting that these will work verbatim for your case. Certainly they will not. But skimming them might give you inspiration or clues for any issues you run into with this Gentoo/Finx platform.
-
@SPlatten according to post https://forum.qt.io/post/521682, this should do the job:
./configure -platform linux-g++-32
wrote on 4 May 2022, 06:26 last edited by SPlatten 5 Apr 2022, 06:37@KroMignon , built thank you, when using:
sudo su gmake install
Where does this install the binaries too?
[Edit] Strange location but it seems to be installing everything in:
/usr/local/Trolltech/Qt-4.8.4
-
@KroMignon , built thank you, when using:
sudo su gmake install
Where does this install the binaries too?
[Edit] Strange location but it seems to be installing everything in:
/usr/local/Trolltech/Qt-4.8.4
@SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:
Where does this install the binaries too?
You can specify where to install when you call configure (don't remember exact parameter, -prefix probably).
-
@KroMignon , built thank you, when using:
sudo su gmake install
Where does this install the binaries too?
[Edit] Strange location but it seems to be installing everything in:
/usr/local/Trolltech/Qt-4.8.4
wrote on 4 May 2022, 07:39 last edited by@SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:
Where does this install the binaries too?
you can specify many things with
configure
(cf. https://www.linuxfromscratch.org/blfs/view/7.9/x/qt4.html).
This should work for you:./configure -platform linux-g++-32 -prefix /opt/qt4.8
-
@SPlatten said in How to build Qt 4.8.4 from source for 64bit or 32bit targets:
Where does this install the binaries too?
you can specify many things with
configure
(cf. https://www.linuxfromscratch.org/blfs/view/7.9/x/qt4.html).
This should work for you:./configure -platform linux-g++-32 -prefix /opt/qt4.8
wrote on 4 May 2022, 13:57 last edited by@KroMignon , thank you.
-
wrote on 5 May 2022, 12:01 last edited by
Another important step to include if like me you built 64 bit first then 32bit....remember to insert a call to:
make clean
Before the next configure or you will end up with architecture errors.
-
Another important step to include if like me you built 64 bit first then 32bit....remember to insert a call to:
make clean
Before the next configure or you will end up with architecture errors.
@SPlatten That is why you should do out of source builds
-
wrote on 5 May 2022, 12:52 last edited by
@jsulm for those that haven't heard this term:
https://cgold.readthedocs.io/en/latest/tutorials/out-of-source.html
14/14