Enable Gstreamer in Qt5 configuration
That's the kind of detail you should have mention earlier...
First thing, did you install a cross-compiling environment ? Did you pass the correct parameters to configure to enable cross-compilation ? Did you get the cross-compiled version of the dependencies you need ?
Sorry about mention cross-compiling lately.
The cross-compiling is installed in my system, it is linaro-arm-linux-
About parameters to configure, I think Qt can autodetect Gstreamer so I don't pass any option for Gstreamer in command.
When configuration, nomally it will display information why option is disable, which errors occurs... so I can fix errors and option is enable . With Gstreamer, nothing to display, it makes me confusion.
Thank for your support.
Are there any ideas?
You're configuration process fails while testing glib, do you have it for ARM ? Also can you post your complete configure command ?
I have just installed glib2.0, libglib2.0, libglib2.0-dev, libqtglib2.0 before.
../gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-g++ --sysroot=[TARGET_ROOTFS] -o glib glib.o -L[TARGET_ROOTFS]/usr/lib -L[TARGET_ROOTFS]/usr/lib/arm-linux-gnueabi -L[TARGET_ROOTFS/lib/arm-linux-gnueabi -lpthread -ldl -lGLESv2 -lEGL -lIMGegl -lsrv_um -lgmodule-2.0 -lgobject-2.0 -lffi -ldbus-1 -lpcre --sysroot=[TARGET_ROOTFS] -pthread -lgthread-2.0 -lrt -lglib-2.0
/arm-linux-gnueabi/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO ../lib/arm-linux-gnueabi/librt.so.1 so try adding it to the linker command line
/lib/arm-linux-gnueabi/librt.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [glib] Error 1
librt.so.1 exist in /lib/arm-linux-gnueabi
I try to search solution in Google and many answer is add " -lrt" but you can see that it exist in my command.
This is my complete configure command
./configure -confirm-license -opensource -v -arch arm -device linux-xxx-g++ -prefix /opt/share/qt5 -device-option CROSS_COMPILE=/home/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi- -sysroot /home/rootfs_br -debug -continue -opengl es2 -pkg-config -dbus -icu
Note : linux-xxx-g++ exist in qt-everywhere.../qtbase/mkspecs/devices/
Since you are cross-compiling, you also need to either get the ARM version of these libraries or cross-compile them.
Yes, i get the libraries - armel version, they are debian file and i install them by command "dpkg".
Where did you install them ?
I install them on target rootfs.
Then how can the configure script find the libraries ?
One way to do that is to copy the libraries and headers from your target rootfs in your toolchain directories
Hello, I know this thread is quite old but I'm running into the same issues. I mounted the target's rootfs in a local folder and I set the sysroot parameter to that path.
In that folder there is the complete arm filesystem with these packages installed:
Here the configure command:
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/dev/rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -developer-build -make libs -prefix /usr/local/qt5pi -no-pch -nomake examples -nomake tests -silent
Anyway both GLib and GStreamer supports are disabled. Here the related errors:
Glib auto-detection... ()
glib.cpp: In function ‘int main(int, char**)’:
glib.cpp:48:19: warning: variable ‘context’ set but not used [-Wunused-but-set-variable]
glib.cpp:55:38: warning: ‘pollfd’ is used uninitialized in this function [-Wuninitialized]
/home/femtotech/dev/rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: /mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(gmain.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.4'
/home/femtotech/dev/rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO /mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf/librt.so.1 so try adding it to the linker command line
/mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [glib] Error 1
But the /mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf/librt.so.1 is there, actually.
Please check the link to librt.so.1
Maybe it's broken
I cross compile Qt 5.2 for imx6 from source and ./configure just dont try find gstreamer from rootfs. I look at ./configure inside and dont find anything about gstreamer. What can I do?
[quote author="_dmp" date="1386143087"]I cross compile Qt 5.2 for imx6 from source and ./configure just dont try find gstreamer from rootfs. I look at ./configure inside and dont find anything about gstreamer. What can I do?[/quote]
Have you solved this problem?
I'm working on it too.
I did not try to cross-compile neither Qt nor GStreamer. So this is just my guess.
On Linux Qt configure tries to find gstreamer using pkg-config utility.
pkg-config uses $PKG_CONFIG_PATH to look for all available packages.
The packages are the text files with simple structure and .pc extension.
Try to find gstreamer*.pc files in your cross-compiled gstreamer and if you find the files then append a path to these files to PKG_CONFIG_PATH environment variable and then run configure from Qt.
Is there meanwhile a solution on how to configure Qt5.3 to use gstreamer? I have the same Problem on the Raspberry Pi.
I'm using this tutorial: http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi
I ignored the change of "QT_CFLAGS_GSTREAMER=" in the configure script, because it is not there. Additionally I set the following environment variables before running configure to get "pkg-config ............. yes":
I read a little bit in the configure script code and at the part where the "Configure summary" is generated I found nothing where it is possible to add additional Packages (for example found by pkg-config) so is it even possible that the configure script finds gstreamer or is it even searching?
Hi and welcome to devnet,
Did you install the gstreamer development packages ?
yes I have installed all packages which are listed on the "wiki page":http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi (first code section line 3). For gstreamer this are the following:
gstreamer itselfs works:
@gst-launch-0.10 videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! ffmpegcolorspace ! fbdevsink@
Did you do that on your Raspberry Pi ?
yes, all direct on the pi, not cross compiling
Do you have your Pi root filesystem accessible on your desktop computer ?
yes i just had to put the Raspi SD Card in the Computer and mount it
What parameters did you pass to configure ?
I copied it from the wiki page: "http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi":http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi
@./configure -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 &> output@
Ok… I missed it the first time… you are following the instructions to build Qt ON the raspberry pi but you are trying to cross-compile it from your desktop…
"This":https://qt-project.org/wiki/RaspberryPi_Beginners_guide guid shows how to cross-compile it
No, I'm building Qt direct on the Raspberry, like on the wiki page.
Sorry if I understand your question wrong when you asked if I had the filesystem accessible on my desktop computer. At the moment I dont have it on my desktop pc, I wanted to say that I could easily access it if needed for the solution by just insert the Raspberry Pi SD Card to my desktop computer. (Did you mean if I had an image of the filesystem on my desktop computer for cross compiling? => No)
If your thinking of the CROSS_COMPILE option by calling configure: This is sayed on the wiki page:
bq. In order to properly run configure for Qt5 on the Raspberry Pi, you need to point the CROSS_COMPILE variable to the native compiler located at /usr/bin/g++. The CROSS_COMPILE parameter is the path to the compiler (without the g++). If you do not do this properly it will complain that it is not being cross compiled.
My bad, I was thinking about the SYSROOT parameter that was missing. But in your case it's unrelated.
Found the solution in the compile logfiles. The configure script does not search for gstreamer anymore. Qt searches for gstreamer during compile of qt multimedia plugin in. But the compile step needs pkg-config to be set (see above) to find gstreamer.
Now I can play videos, but very very slow, so I don't know if additional steps are needed for hardware acceleration.
IIRC, you have to look for "gst omx raspberry pi"
gst-omx is the rigth track but it doesn't compile anymore.
I started with this: http://raspberrypi.stackexchange.com/questions/528/how-can-i-install-gstreamer-gst-omx
This post is 2 years old so the git repository moved here: http://cgit.freedesktop.org/gstreamer/gst-omx/ and the configure call need aditional parameters, see here: http://gstreamer-devel.966125.n4.nabble.com/Pb-with-omx-compilation-td4668631.html#a4668934
But make throws still errors like "unknown type name 'GStaticMutex'". With google i found presumtions that this is because GStaticMutex, etc. was deprecated in some librarys.
The gst-omx development of the 0.10 branch stopped a year ago. So I think this errors are fixed in current version but the current version needs gstreamer-1.x and Qt5 wants gstreamer.0.10 :-(
Depending on your needs you could use QtGStreamer in between