Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved]Need a help in building (Qt5.1.1)qtmultimedia with gstreamer
Forum Updated to NodeBB v4.3 + New Features

[solved]Need a help in building (Qt5.1.1)qtmultimedia with gstreamer

Scheduled Pinned Locked Moved Mobile and Embedded
23 Posts 4 Posters 15.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sakshi
    wrote on last edited by
    #1

    Hi all,
    I am trying to crosscompile Qt 5.1.1 qtmultimedia with gstreamer on imx6 arm based device. This is my config file:
    #!/bin/sh
    ./configure --prefix=/tools/rootfs/usr/local/qt-5.1.1 -examplesdir /tools/rootfs/usr/local/qt-5.1.1/examples -verbose -opensource -confirm-license -make libs -make examples -device imx6
    -device-option CROSS_COMPILE=
    /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-
    -no-pch -no-opengl -no-icu -no-xcb -no-c++11
    -opengl es2
    -eglfs
    -compile-examples
    -glib -gstreamer \

    this is my qmake.conf:
    include(../common/linux_device_pre.conf)
    ROOTFS=/tools/rootfs
    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp

    QMAKE_INCDIR += $$ROOTFS/usr/include
    $$ROOTFS/usr/include/glib-2.0
    $$ROOTFS/usr/include/glib-2.0/gio
    $$ROOTFS/usr/include/glib-2.0/glib
    $$ROOTFS/usr/include/glib-2.0/gobject
    $$ROOTFS/usr/include/glib-2.0/include
    $$ROOTFS/usr/include/gstreamer-0.10
    $$ROOTFS/usr/include/libxml2
    QMAKE_LIBDIR += $$ROOTFS/usr/lib
    QMAKE_LIBS += -L/tools/rootfs/usr/lib -lgthread-2.0 -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10
    QMAKE_INCDIR_OPENGL_ES2+= $$ROOTFS/usr/include/GLES2
    QMAKE_LIBDIR_OPENGL_ES2+= $$ROOTFS/usr/lib
    QMAKE_LIBS_EGL += -lEGL
    QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
    QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL

    QMAKE_LFLAGS += -Wl,-rpath-link,$$ROOTFS/usr/lib

    IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
    IMX6_CFLAGS_RELEASE = -O2 $$IMX6_CFLAGS
    QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
    QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
    QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
    QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS

    include(../common/linux_device_post.conf)

    load(qt_config)

    when i configured gstreamer was enabled.
    but it was not building multimedia. i went to qt-everywhere-opensource-src-5.1.1 and did make module qtmultimedia. after make install i tried to run my application on the device. it says:
    QtMultimedia : defaultServiceProvider::requestService(): no service found for - “org.qt-project.qt.mediaplayer”

    according to qtmultimedia config.log package gstreamer-0.10 not found. after that tried to build it exporting PKG_CONFIG_PATH
    still result is same. can any one please help me solve this error.

    sakshi

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sakshi
      wrote on last edited by
      #2

      hi all i have solved this problem.
      exporting package config path was not proper due to which configuration was failing:

      export PKG_CONFIG_DIR= export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

      configure and build again.

      Hope this might help some one.

      sakshi

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Glad you found out and thanks for sharing the solution !

        Please also update the thread title prepending [solved] so other forum users may know a solution has been found :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          maatong
          wrote on last edited by
          #4

          [quote author="sakshi" date="1388040327"]hi all i have solved this problem.
          exporting package config path was not proper due to which configuration was failing:

          export PKG_CONFIG_DIR= export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

          configure and build again.

          Hope this might help some one.[/quote]

          Hi sakshi,
          I met the same problem here, my qt version is 5.3.0, I can only use git to get this version, and my arm cpu is imx6, just like yours.

          about there lines:

          export PKG_CONFIG_DIR= export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

          Do I need to add them to my qmake.conf files?
          And when should I do this, before or after I make the qtmultimedia modules?
          I'm a beginner of Qt and Embedded system here, so I sometimes just maybe ask silly question, sorry for troubling you.
          Thanks a lot.

          https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maatong
            wrote on last edited by
            #5

            And when I trie to add -gstreamer to my ./configure,
            this error appears:
            -gstreamer: invalid command-line switch
            So I can't add this on 5.3.0?

            https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sakshi
              wrote on last edited by
              #6

              open a terminal, export your cross compiler path,
              then type the following command:
              ~/Qt5.1.1 $ export PKG_CONFIG_DIR=

              ~/Qt5.1.1 $ export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig

              ~/Qt5.1.1 $ export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

              Do this before You run configuration. then configure. and then do make.

              follow this link for basic build:

              1. http://sakshigopalsblog.blogspot.in/2014/01/hi-all-cross-compiling-is-rocket.html
              2. https://community.freescale.com/docs/DOC-96390

              sakshi

              1 Reply Last reply
              0
              • M Offline
                M Offline
                maatong
                wrote on last edited by
                #7

                [quote author="sakshi" date="1398931421"]open a terminal, export your cross compiler path,
                then type the following command:
                ~/Qt5.1.1 $ export PKG_CONFIG_DIR=

                ~/Qt5.1.1 $ export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig

                ~/Qt5.1.1 $ export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}

                Do this before You run configuration. then configure. and then do make.

                follow this link for basic build:

                1. http://sakshigopalsblog.blogspot.in/2014/01/hi-all-cross-compiling-is-rocket.html
                2. https://community.freescale.com/docs/DOC-96390[/quote]

                Hi sakshi:
                Thank you very much for your respond.
                And after I reading your blog, I have some questions that,
                "first download qt-everywhere-opensource-src-5.1.1.tar.gz.
                then untar it on your home folder."
                When I build 5.3.0 by git, I first downloaded a file system that I run on the board to my computer, then I untar it to a folder. After this, I built a same file system as my board on my computer. Then I untar the toolchain to this folder. But in your building process, It seemed that you didn't download a file system on your computer, so my question is that, if I install 5.1.1 cross compiler, I don't need to download the file system? Does it fit all the file systems? Or at any step in the process, a file system is downloaded but I didn't realize that?
                And after install the cross compiler on my PC, need I copy some folder to my target board to run a program?
                Thank you very much.
                It's hard to find a person which succeeded building a cross complier on imx6 around me so I'm very glad to know you and appreciate for your help.

                https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sakshi
                  wrote on last edited by
                  #8

                  Hi,
                  Sorry, I have never tried cross compiling Qt from git. It may be easier. But i find little complicated.

                  the procedure i followed is: go to http://qt-project.org/downloads
                  click on show downloads.
                  search for a qt source zip. not binary.
                  FYI(search at the end of the list - You can get split source packages from here. The source code is also available as a single *zip * (277 MB) (Info) file for Windows users or as tar.gz (223 MB) (Info) file for Linux/Mac users. All the installers are available also here. Or visit the repository at qt.gitorious.org/qt) click on zip which will download qt-everywhere-opensource-src-5.2.1.zip

                  i have no idea about 5.3. But last time i saw is qt 5.2.1 open source.

                  cross compiler: I had arm-fsl-linux-gnueabi

                  i had built qt on host. not on target.
                  on host export crosscompiler path: for example
                  export PATH=/opt/freescale/usr/arm-fsl-linux/bin

                  Next follow the procedure from the blog.

                  when u do make install it will install qt binaries on specified folder.

                  copy that folder to your target.

                  sakshi

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    maatong
                    wrote on last edited by
                    #9

                    [quote author="sakshi" date="1398966822"]Hi,
                    Sorry, I have never tried cross compiling Qt from git. It may be easier. But i find little complicated.

                    the procedure i followed is: go to http://qt-project.org/downloads
                    click on show downloads.
                    search for a qt source zip. not binary.
                    FYI(search at the end of the list - You can get split source packages from here. The source code is also available as a single *zip * (277 MB) (Info) file for Windows users or as tar.gz (223 MB) (Info) file for Linux/Mac users. All the installers are available also here. Or visit the repository at qt.gitorious.org/qt) click on zip which will download qt-everywhere-opensource-src-5.2.1.zip

                    i have no idea about 5.3. But last time i saw is qt 5.2.1 open source.

                    cross compiler: I had arm-fsl-linux-gnueabi

                    i had built qt on host. not on target.
                    on host export crosscompiler path: for example
                    export PATH=/opt/freescale/usr/arm-fsl-linux/bin

                    Next follow the procedure from the blog.

                    when u do make install it will install qt binaries on specified folder.

                    copy that folder to your target.
                    [/quote]

                    Hi:
                    Thank you for the respond.
                    May I know that what kind of system that on your target board?
                    And need I copy a same file system into my computer for make?
                    In the qmake.conf file on your blog, there's a $$ROOTFS there, does it stands for the file system that on the board?
                    Thanks.

                    https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sakshi
                      wrote on last edited by
                      #10

                      my target is linux operating system. I dont have anything on the board. My targets file system is on my host. and i use telnet on the board to get root file system from the host.

                      You can copy the complete file system to the host and try building.
                      Before that make sure You have all the required packages installed on target file system. for example if you are stuck in multimedia audio it needs gstreamer, glib pulse audio etc.. so install all the dependencies on the file system and the copy it on the host.

                      Or easier way copy qt source on your target. and install gcc related packages(which is required) and compile qt on the board. Which is exactly like compiling qt on the host. :)

                      sakshi

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        maatong
                        wrote on last edited by
                        #11

                        [quote author="sakshi" date="1398969109"]my target is linux operating system. I dont have anything on the board. My targets file system is on my host. and i use telnet on the board to get root file system from the host.

                        You can copy the complete file system to the host and try building.
                        Before that make sure You have all the required packages installed on target file system. for example if you are stuck in multimedia audio it needs gstreamer, glib pulse audio etc.. so install all the dependencies on the file system and the copy it on the host.

                        Or easier way copy qt source on your target. and install gcc related packages(which is required) and compile qt on the board. Which is exactly like compiling qt on the host. :)[/quote]

                        OK Thank you very much.
                        I'll try to install everything on my board (ubuntu 12.04) and copy that to my host PC.
                        And I think I would give 5.3.0 up because of the gstreamer option.
                        So let me confirm that,
                        now I need to run apt-get install on my target board to install all the package I need, and then I take copy the file system to my host, then in the path that I paste it, I untar the 5.1.1 package and copy the tool chain, then install the cross compiler according the blog right?
                        Thank you.

                        https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sakshi
                          wrote on last edited by
                          #12

                          yes... or the easier way copy your downloaded qt source on the target and compile :)

                          sakshi

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            maatong
                            wrote on last edited by
                            #13

                            [quote author="sakshi" date="1398971770"]yes... or the easier way copy your downloaded qt source on the target and compile :)[/quote]

                            Hi I'm trying to build it now, and I'm at step four on your blog,
                            in qmake.conf, you wrote :ROOTFS=/tools/rootfs.
                            So /tools/rootfs is your directory of your file system right?
                            If I copyed my whole file system to the host in /home/myname/filesystem,
                            the my ROOTFS=/home/myname/filesystem right?
                            And in export command, the ${SYSROOT} is the same path right?
                            And these name need not to be the same as my target system right?
                            thank you.

                            https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              maatong
                              wrote on last edited by
                              #14

                              Hi sakshi:
                              I now am running the configure by ./config.imx6
                              when I tried to run it, I got:

                              glib.cpp:44:18: fatal error: glib.h: No such file or directory
                              compilation terminated.
                              make: *** [glib.o] Error 1
                              Glib disabled.
                              Glib support cannot be enabled due to functionality tests!
                              Turn on verbose messaging (-v) to ./configure to see the final report.
                              If you believe this message is in error you may use the continue
                              switch (-continue) to ./configure to continue.

                              But actually I did install the modules and libs that needed, And I can find glib.h in glib-2.0 directory under /usr/include.
                              And I've set the path PKG_CONFIG_SYSROOT_DIR, PKG_CONFIG_LIBDIR, and PKG_CONFIG_DIR like your blog, so did you meet this knid of problem before?
                              Thank you.

                              https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                sakshi
                                wrote on last edited by
                                #15

                                1.did you install glib-dev (apt-get install glib-dev)?
                                2. Do you find glib-2.0.pc in your target file system?

                                sakshi

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  maatong
                                  wrote on last edited by
                                  #16

                                  [quote author="sakshi" date="1399006803"]1.did you install glib-dev (apt-get install glib-dev)?
                                  2. Do you find glib-2.0.pc in your target file system?[/quote]

                                  I installed libglib-2.0-dev.
                                  And I didn't find glib-dev when I tried to search it.
                                  And after installing that, I didn't find glib-2.0.pc in my /usr/include/pkgconfig.
                                  So is there other dev I need to get that .pc file?
                                  Thank you.
                                  Sorry for troubling you with so many questions.

                                  https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    sakshi
                                    wrote on last edited by
                                    #17

                                    i meant libglib-2.0-dev only.
                                    just try to uninstall and install glib. May be it got missed during process.
                                    ******.pc is a package config file. if *.pc of any package is missing then you cannot enable the perticular package.

                                    sakshi

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      maatong
                                      wrote on last edited by
                                      #18

                                      [quote author="sakshi" date="1399052319"]i meant libglib-2.0-dev only.
                                      just try to uninstall and install glib. May be it got missed during process.
                                      ******.pc is a package config file. if *.pc of any package is missing then you cannot enable the perticular package.[/quote]

                                      OK, I'm trying on it.
                                      And about the qtmultimedia module, in 5.3.0 version, I make the module inside the ../qtmultimedia directory, and after that, I copied the .pri files to the modules and modules-inst folder in /qtbase/mkspecs/modules && modules-inst.
                                      Is your process the same?
                                      Thank you.

                                      https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        sakshi
                                        wrote on last edited by
                                        #19

                                        No. With libglib-2.0-dev it shud have installed glib-2.0.pc. do
                                        $cd /
                                        $find ./ -name glib-2.0.pc

                                        sakshi

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          maatong
                                          wrote on last edited by
                                          #20

                                          [quote author="sakshi" date="1399295058"]No. With libglib-2.0-dev it shud have installed glib-2.0.pc. do
                                          $cd /
                                          $find ./ -name glib-2.0.pc [/quote]

                                          My system does have glib-2.0 directory, it came with the orginal system, but there's no glib-2.0.pc with it.
                                          So I will unstall it and reinstall it.
                                          Thank you for your help.
                                          And is it possible to know what kind of developing board you're using now? My board is UDOO, so far there are not much resources about it.

                                          And one more question, about this website:
                                          https://community.freescale.com/docs/DOC-96390
                                          Did you install LTIB like the website requires?
                                          Thank you.

                                          https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved