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. Using taglib on a i.MX6

Using taglib on a i.MX6

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 2.2k Views
  • 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.
  • R Offline
    R Offline
    Raz3l
    wrote on last edited by Raz3l
    #1

    Hi guys!

    So, on the application that I am developing for the couple weeks I need to use taglib library. All goes well when compiling it for the desktop. I follow some steps to be able to use taglib under debian. I just installed taglib and taglib-extras by apt-get package manager, and on my .pro file I add the following lines:

    CONFIG += link_pkgconfig
    PKGCONFIG += taglib taglib-extras
    

    Until here everything went fine, but my end target it's an i.MX6 platform. I am using Yocto for building my Linux image and after searching for taglib recipes I found one, which I included in my local.conf file. After this I build again the Qt SDK by performing bitbake meta-toolchain-qt5 and I sourced the script created and I did the proper configurations on Qt Creator - Poky 2.1.1 (just I did before we the last SDK - poky 2.1).

    Unfortunately, I can't compile my application and I am getting this error:

    Starting: "/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" /home/hmi/workspace/my_projects/taglib/taglib.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
    Project ERROR: taglib development package not found
    16:03:26: The process "/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited with code 3.
    Error while building/deploying project taglib (kit: iMX6 Qt5.6.2)
    The kit iMX6 Qt5.6.2 has configuration issues which might be the root cause for this problem.
    When executing step "qmake"
    

    I know that I am missing some steps for using taglib in an embedded platform like i.MX6, but I am out of ideas. Any can help?

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

      Hi,

      You need to build it through Poky as well. You can't use your desktop version of taglib to build against your application that will run on an ARM device.

      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
      • R Offline
        R Offline
        Raz3l
        wrote on last edited by
        #3

        Yes I understand that @SGaist , but my doubt is how should I then configure the .pro file to use taglib as a library. As I understand you are saying that I should build taglib though poky, right? Thank you for the help!

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

          Yes you should.

          As for the .pro file, you can either test with pkg-link or use the classic method by point to the right place where the library is installed.

          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
          • R Offline
            R Offline
            Raz3l
            wrote on last edited by Raz3l
            #5

            For future references, this is how I did it:
            As I told above I was able to compile and use Taglib library on a desktop target. Moving for an embedded device such as an iMX6 was where the difficulties started to appear. I use Yocto as a Linux building system for my platform. For being able to use taglib and cross-compile an Qt/QML application using it I needed to:

            1. Add to my local.conf taglib package.
            IMAGE_INSTALL_append = " qtbase 		\
                    ...
            	taglib zlib				\
                    ...
            	"
            
            1. Bitbake my image
            bitbake core-imag-base
            
            1. Add to it's recipe (core-image-base.bb) an inherit statement which, as far I know, will populate my sysroot with much need Qt libraries.
            inherit populate_sdk_qt5
            
            1. Create the SDK, which will reflect to my cross compiling environment not just my target file system but also Qt libraries, since I did step 3.
            bitbake core-image-base -c populate_sdk
            
            1. After generating the sdk script I just had to follow the normal steps to create a Qt Kit on QtCreator.
            2. On my .pro file of my application I added a new library dependency.
            CONFIG+=target_platform_imx
            #CONFIG+=target_platform_desktop
            
            target_platform_imx {
                unix:!macx: LIBS += -L/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/ -ltag
            
                INCLUDEPATH += /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include
                DEPENDPATH += /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include
            
            } else {
            
                target_platform_desktop
                {
            
                    CONFIG += link_pkgconfig
                    PKGCONFIG += taglib taglib-extras
                }
            }
            

            I should notice that I don't know if these are the correct steps to follow on Yocto, but still was able to accomplish my goal. If anyone has something to mention I am looking forward to ear it.
            Thank you.

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

              Looks correct to me, note that you might even be able to do it with pkg-config if you get the matching .pc file in your poky sysroot.

              Check here, I think it's worth trying.

              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

              • Login

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