Results 1 to 3 of 3

Thread: QtEmbedded 4.4.1/Phonon/CrossCompile-arm

  1. #1
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default QtEmbedded 4.4.1/Phonon/CrossCompile-arm

    Hi,
    Has anyone successfully cross-compiled for Arm - QtEmbedded using phonon.
    I needed many dependancies. Installed and cross-compiled these
    1) Glib 2.0
    2) liboil
    3) Gstreamer
    4) Gstreamer -base
    5) LibXML2
    Had no problems. Then I configured Qt and it detected Glib, Gstreamer.
    When I compiled Qt I received this error.
    /usr/bin/ld - skipping incompatibable /usr/home/local/arm/lib libglib-2.0.so when searching for -lglib-2.0
    /usr/bin/ld - skipping incompatibable /usr/home/local/arm/lib libgmodule-2.0.so when searching for -lglibmodule-2.0
    /usr/bin/ld - skipping incompatibable /usr/home/local/arm/lib libgstream-0.10.so when searching for -llibGstream-0.10
    Cannot find -lgstreamer-0.10.so
    error

    When I googled this error it seems that libraries are built for 64bit under a 32bit architecture. I tried many CC options for glib, gstreamer and they all compiled fine under arm-linux-gcc.

    Anyone have successfully completed this feat?

    Thanks.

  2. #2
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QtEmbedded 4.4.1/Phonon/CrossCompile-arm - SOLVED!!

    Hi,
    After talking to Qt-support they pointed me in the right direction in solving this problem.

    1) I did not have the environment variable PKG_CONFIG set
    2) I DID have the PKG_CONFIG_PATH environment variable set to my CC directory /usr/local/arm/lib
    3) I checked the qt configure script AND it does NOT use the PKG_CONFIG unless the configure option '-force-pkg-config' is set. This is not documented anywhere, so I did not know about this or how to use it.
    4) In my previous attempt to load the glib, gstreamer libs, I put all the paths in the configure script, because I did not know any other way.
    5) I proceeded to set the environment variable PKG_CONFIG=/usr/bin/pkg-config (although this is not needed if '-force-pkg-config' is set - the qt script will pull the information from WHICH pkg-config. I also ran a configure script with -force-pkg-config.
    6) PKG_CONFIG_PATH = /usr/local/arm/lib/pkg-config. 'cross compiled libs'
    7) NOW COMPILATION IS WORKING!!! - Probably because the package configs have all the information needed for ALL the library dependencies.

  3. #3
    Join Date
    Nov 2009
    Posts
    60
    Thanks
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QtEmbedded 4.4.1/Phonon/CrossCompile-arm - SOLVED!!

    Hi,

    I trying Gstreamer on Qt4.6.1 source.

    I compiled Gstreamer with scratchbox2 (cross compiler tool chain used is arm-linux-gcc-4.3.2.tgz) by following this blog.
    http://felipec.wordpress.com/2009/12...ed-with-sbox2/

    cross compilation was fine, and integration with Qt phonon went without much trouble.

    Now when I compile 'qmediaplayer' in demo folder of qt4.6.1 source tree,I am get the below error message.

    arm-linux-g++ -Wl,-rpath-link,/root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib -fno-exceptions -Wl,-rpath,/new_disk/Embedded/qt-4.6/build/lib -Wl,-rpath,/new_disk/Embedded/qt-4.6/build/lib -o qmediaplayer .obj/debug-shared-emb-arm/main.o .obj/debug-shared-emb-arm/mediaplayer.o .obj/debug-shared-emb-arm/moc_mediaplayer.o .obj/debug-shared-emb-arm/qrc_mediaplayer.o -L/opt/gst/lib -L/opt/gst/lib/gstreamer-0.10 -L/root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib -lphonon -L/opt/gst/lib -L/opt/gst/lib/gstreamer-0.10 -L/root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib -lQtGui -lQtNetwork -lQtCore -lpthread
    /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libgthread-2.0.so.0, needed by /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libglib-2.0.so.0, needed by /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_threads_got_initialized'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_main_context_ref'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_main_context_unref'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_main_context_default'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_main_context_pending'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_thread_init'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_source_set_priority'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtCore.so: undefined reference to `g_source_unref'
    /root/QtEmbedded/qt-everywhere-opensource-src-4.6.1/lib/libQtGui.so: undefined reference to `g_source_set_can_recurse'


    Kindly help in fixing this issue.

    Thanks and regards,
    Ratheendran

Similar Threads

  1. Qt and QTEmbedded
    By vishakvkurup in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2008, 10:35
  2. Reuse QT code in QTEmbedded
    By the_bis in forum Newbie
    Replies: 3
    Last Post: 8th September 2006, 18:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.