Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to cross compile Qt with gstreamer



  • firstly, i have cross compiled gstreamer-1.0 and gstreamer-plugin-base-1.0,set PKG_CONFIG_PATH correctly,even -L,-I path in cofigure parameters,there is my configure parameters:

    #!/bin/sh
    ./configure \
    -v \
    -prefix /usr/local/bin/qte5.12.3 \
    -release \
    -opensource \
    -confirm-license \
    -xplatform linux-arm-gnueabi-g++ \
    -linuxfb \
    -nomake tests  \
    -qt-zlib \
    -qt-libjpeg \
    -qt-libpng \
    -qt-freetype \
    -qt-pcre \
    -no-opengl \
    -no-xcb \
    -no-sse2 \
    -no-openssl \
    -no-cups \
    -no-dbus \
    -no-harfbuzz \
    -nomake examples \
    -nomake tools \
    -skip qtvirtualkeyboard \
    -tslib \
    -I/usr/local/bin/tslib1.4/include \
    -L/usr/local/bin/tslib1.4/lib \
    -gstreamer 1.0 \
    -I/usr/local/bin/gstreamer/include/gstreamer-1.0 \
    -L/usr/local/bin/gstreamer/lib
    exit
    

    but error comes like this:

    ERROR: Feature 'gstreamer_1_0' was enabled, but the pre-condition 'libs.gstreamer_1_0' failed.
    
    

    How can i fiexd it?
    Thanks


  • Lifetime Qt Champion

    Hi,

    You should add the -v flag to your configure line so that you can see what is going wrong when the detection of GStreamer is done.

    I also recommend to make out of source builds, so that if something goes wrong you can simply nuke the folder and easily start fresh without having to clean the sources before calling configure again.



  • there is configure message about gstreamer.

    Checking for GStreamer 1.0... 
    Trying source 0 (type pkgConfig) of library gstreamer_1_0 ...
    pkg-config use disabled globally.
      => source produced no result.
    test config.qtmultimedia_multimedia.libraries.gstreamer_1_0 FAILED
    

    I am puzzled that i have set the path of gstreamer and tslib, tslib was detected succeed but gstreamer failed.


  • Lifetime Qt Champion

    Take a look at the test logs, you should see what went wrong.

    Otherwise, you can still add the paths needed to thé options of configure.


  • Moderators

    @fevancio
    you might need to add something like this:

    export PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig
    

    If your (armhf) gstreamer pkgconfig is placed somewhere else adapt it of course



  • @raven-worx
    i have exported PKG_CONFIG_LIBDIR correctly and add -sysroot to the options of configure, but configure output same error.
    But i find some different in conflg.log between tslib and gstreamer.
    conflg.log about tslib show needed file 'libts.so'

    Checking for tslib... 
    Trying source 0 (type inline) of library tslib ...
    **None of [libts.so libts.a] found in [] and global paths.**
      => source produced no result.
    test config.qtbase_gui.libraries.tslib FAILED
    

    But gstreamer show nothing needed just output 'pkg-config use disabled globally'.

    Checking for GStreamer 1.0... 
    Trying source 0 (type pkgConfig) of library gstreamer_1_0 ...
    pkg-config use disabled globally.
      => source produced no result.
    test config.qtmultimedia_multimedia.libraries.gstreamer_1_0 FAILED
    

    Then i tried again with these options of configure:

    -I/usr/local/bin/tslib1.4/include \
    -L/usr/local/bin/tslib1.4/lib \
    
    -I/usr/local/bin/gstreamer/include/gstreamer-1.0/gst \
    -L/usr/local/bin/gstreamer/lib \
    

    This time tslib test succeed but gstreamer still failed.

    some informations:
    my gstreamer(arm) include gstreamer-1.0 and gstreamer-plugin-base-1.0.
    do i need other plugins of gstreamer?


  • Lifetime Qt Champion

    Did you check exactly what failed in the test log ?



  • This post is deleted!


  • This post is deleted!

Log in to reply