Unsolved Qt modules, classes, libraries
-
Hi,
What is your embedded target device?
@embdev said in Qt modules, classes, libraries:
"cannot open this QML document because of an error in the QML file:
line 3: using qt quick 1 code model instead of qt quick (M234).Which kit(s) are present on your host PC? Which one(s) are you using for your project?
See Tools -> Options -> Build & Run -> Kits
@embdev said in Qt modules, classes, libraries:
Do i install the gstreamer in my host PC and then configure with Qt?
Yes. Make sure you install the version of GStreamer that is compatible with your embedded board, not your host PC. After that, configure and build the Qt Multimedia module again.
When you configure, check the configure output. It will tell you if it found GStreamer or not.
-
-
my embedded target device is some arm-based Linux processor for network video recorder (NVR) and i'm performing my development work in my host Ubuntu PC. It's connected to embedded target device via NFS.
-
I've created the kit myself, specifically i need to configure qmake and cross-compile for my embedded target device. So i'm using the cross-compiler provided by the vendor.
-
i'm pretty new to Qt itself, would you be able to provide some guidance on how to install gstreamer? I've found some qt gstreamer online. So should i cross-compile gstreamer first in my host Ubuntu PC using the cross-compiler and then add gstreamer to my Qt configure?
-
-
Depends, what distribution are you using on your target ? If it provides GStreamer then install the matching dev-packages and use that to build QtMultimedia.
-
@SGaist i don't think my SDK provides gstreamer. So which means i'd need to install gstreamer on my host Ubuntu and then configure with Qt again?
May i say that without QtMultimedia module, i'd be unable to create video players to play e.g. mp4, avi etc video formats?
-
@embdev GStreamer from your host Ubuntu cannot be used on your embedded device. You will need to cross compile GStreamer if the vendor does not provide it.
-
@jsulm i see. So i'd need to use my cross-compiler to cross-compile gStreamer, and then run ./configure and append -gstreamer to it right?
-
@embdev Yes
-
@jsulm thanks! I'll give it a shot
-
What does that SDK provide ?
If you take for example the RPi computers, you need the cross-toolchain however for all the additional dependencies you might have/want like gstreamer, MySQL etc., you install the dev packages on the root filesystem of the RPi and then use that for development.
-
@SGaist the SDK contains the cross-compiler, Linux kernel and other sample codes pertaining to the board. so a right way to do it is to cross-compile in my host PC and then install into target embedded board via my NFS?
-
@embdev said in Qt modules, classes, libraries:
so a right way to do it is to cross-compile in my host PC and then install into target embedded board via my NFS?
Yes, as @jsulm has described.
Out of curiosity: How do you install other 3rd-party libraries (such as camera libraries) to your board?
-
@JKSH i'm quite new to this; but I haven't installed other 3rd-party libraries to my board at this juncture. But the rule-of-thumb is to cross-compile any 3rd-party libraries in my host PC each time, and then run Qt configure to include the 3rd party libraries?
-
@embdev You only need to run Qt configure if Qt uses that new library.
If the library is not related to Qt then there is no need to run Qt configure.
For example Qt uses GStreamer for media. If you want your Qt installation to be able to play media files then you need to install GStreamer libraries and headers and then configure and build Qt. -
To add to @jsulm, for gstreamer, if you already have Qt compiled, then you only need to rebuild the QtMultimedia module.
-
@SGaist @jsulm thanks for your advice. I managed to resolved some gstreamer dependencies and installed into my host Ubuntu PC. I did a clean qt5.7 sources and rebuild the whole source again, with -gstreamer 1.0 but has the following errors:
(...truncated) /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -mfloat-abi=softfp -Wl,-O1 -o gstreamer gstreamer.o -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib/a7_softfp_vfpv4 -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgstaudio-1.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgstvideo-1.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgstbase-1.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgstpbutils-1.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgstreamer-1.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgobject-2.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lglib-2.0 collect2: error: ld returned 1 exit status Makefile:92: recipe for target 'gstreamer' failed make: *** [gstreamer] Error 1 GStreamer 1.0 disabled. checking for GStreamer 0.10... Project ERROR: gstreamer-0.10 development package not found GStreamer 0.10 disabled. GStreamer support cannot be enabled due to functionality tests! Turn on verbose messaging (-v) to ./configure to see the final report. aa@aa:~/qt-everywhere-enterprise-src-5.7.0/qtbase$
Seems that gstreamer 1.0 is not enabled. But it's installed in /usr/include
-
IIRC you can set
GST_VERSION=1.0
before trying to build QtMultimedia. -
@embdev Did the configure script check for GStreamer 1.0?
Maybe you need to tell it to use GStreamer 1.0 instead of 0.10Also: "installed into my host Ubuntu PC" - do you mean you installed it for your target device or for your host Ubuntu? You need GStreamer for the target device, not host Ubuntu.
-
This post is deleted! -
@jsulm @SGaist i'm trying to cross-compile gstreamer using the cross-compiler but met the following errors. I think it's got something to do with glib-2.5. I've also tried to cross-compile glib2.5 but it says that i can't run test while cross-compiling (see below). If there a way to disable the tests in glib while cross-compiling? Can't seem to find the parameter to disable the test though.
I know this probably is not directly related to Qt but would greatly appreciate if anyone could share any experience / comments on the errors.
Thank you!Cross-compiling gstreamer:
(...truncated) /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgobject-2.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lgmodule-2.0 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lglib-2.0 collect2: error: ld returned 1 exit status make[4]: *** [libgstreamer-1.0.la] Error 1 Makefile:1010: recipe for target 'libgstreamer-1.0.la' failed make[4]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/gstreamer-1.10.0/gst' make[3]: *** [all-recursive] Error 1 Makefile:1724: recipe for target 'all-recursive' failed make[3]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/gstreamer-1.10.0/gst' make[2]: *** [all] Error 2 Makefile:936: recipe for target 'all' failed make[2]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/gstreamer-1.10.0/gst' make[1]: *** [all-recursive] Error 1 Makefile:769: recipe for target 'all-recursive' failed make[1]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/gstreamer-1.10.0' make: *** [all] Error 2 Makefile:675: recipe for target 'all' failed
Cross-compiling glib-2.5 dependency for gstreamer:
(... truncated) checking for growing stack pointer... configure: error: in `/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/glib-2.50.0': configure: error: cannot run test program while cross compiling See `config.log' for more details
-
@embdev It's not the kind of test you think. configure builds many small test programs to check availability of needed and optional components. It looks like in this case it wants to execute one of that test programs. Since you're building for a different CPU architecture it is not able to execute this program (you should check config.log file as suggested by the error message). You could try to build glib on your target device. Or check glib documentation to find out how to build it.