[Interest] unable to cross-compile my Qt 5 program for BeagleBoard-xM

Thomas Senyk thomas.senyk at pelagicore.com
Thu Nov 22 11:56:03 CET 2012


On Thu, November 22, 2012 10:19:01 AM Lincoln Ramsay wrote:
> On 21/11/12 18:05, Stephan Kanthak wrote:
> > On 11/21/2012 04:53 AM, VStevenP wrote:
> >> For now, I set my configure "prefix" to point to a 'staging'
> >> directory.  So the Qt 5 Beta 2 cross-compiled output went there.
> >> 
> >>  Then, I copied all the needed shared objects from that QT
> >> 
> >> cross-compile output lib dir and also from the arm toolchain lib dir
> >> into /usr/lib on the micro-SD card.  Then, when I ran my program on
> >> the BB, it resolved all the shared libraries.  Is this how you do it,
> >> too?
> > 
> > ...
> > 
> >> The only problem I have right now is that I did not know where to
> >> copy the QPA platform plugins onto the card, so my program can not
> >> detect the eglfs plug-in.
> > 
> > Qt5 installs them to <staging>/usr/plugins and that's where they end
> > up on the target filesystem, too. The trick is to create a qt.conf in
> > the directory of your final executable (e.g. qmlscene) that points to
> > the base QTDIR. I placed mine into <staging>/usr/bin next to qmlscene:
> > 
> > [Paths]
> > Prefix = /usr/
> > 
> > All this is most likely documented somewhere, but I found out a bit by
> > trial and error :-).
> 
> The "correct" way is to build Qt with -prefix /usr and run make install
> INSTALL_ROOT=<staging>.
> 
> Note that you won't get a useful SDK from this though (ie. you can't
> build against a Qt that's not located in its prefix).
> 
> If you need a Qt SDK that can run from <staging> and is deployed to /usr
> then qt.conf or a binary patch on the paths in libQtCore.so are your
> options.

Another option would be to get away from -prefix /usr
and use /opt/<some name> or /usr/local/<some name>

... together with -sysroot <staging> he will install all host-files into 
<prefix> and all target into <sysroot>/<prefix>.

This why you can install it in both without polluting you're host-rootfs.




More information about the Interest mailing list