Unsolved Using taglib on a i.MX6
-
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?
-
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.
-
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!
-
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.
-
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:- Add to my local.conf taglib package.
IMAGE_INSTALL_append = " qtbase \ ... taglib zlib \ ... "
- Bitbake my image
bitbake core-imag-base
- 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
- 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
- After generating the sdk script I just had to follow the normal steps to create a Qt Kit on QtCreator.
- 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. -
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.