Build qt project on Raspberry Pi
-
-
Hi and welcome to devnet,
Did you build these two modules for the Raspberry Pi ?
-
I followed this guide : http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi
Should I have to build something else ?
[edit: corrected link SGaist]
-
Did you call configure in qtbase ?
-
If you called in qtbase then you only have qtbase built. You need to build the other modules now
-
go into the submodule folder call the correct qmake (the one created from your qtbase build) then make and make install
-
When I call
@which qmake@
I got
@/usr/bin/qmake@In the guide, they say that I have to got something like :
@/usr/local/qt5/bin/qmake@What did I wrong ?
In the guide, they say :
@After this you need to add some lines to your .bashrc file:export LD_LIBRARY_PATH=/usr/local/qt5/lib/ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/qt5/bin
@
I have to type those 2 commands in my terminal or should I have to do something different ?
Thanks a lot,
-
When I try to build qtmultimedia, I get this error :
@In file included from examples/multimediawidgets/customvideosurface/customvideowidget/main.cpp:41:0:
examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.h:44:24: fatal error: QMediaPlayer: No such file or directory
compilation terminated.
Makefile:103835: recipe for target '.obj/main.o' failed
make: *** [.obj/main.o] Error 1@ -
You did nothing wrong, you simply have installed the Qt development package from your distribution.
Are you building the examples as part of the module build or just to test it ?
-
Sorry, but I don't understand your question..
I tried to build an example like in the guide :
@cp -r ~/opt/qt5/qtbase/examples/opengl/cube ~/
cd ~/cube
qmake
make
./cube@And it works if I use @/usr/local/qt5/bin/qmake@.
But for my project, it doesn't work.
It's this example project : "http://doc.qt.io/qt-5/qtmultimediawidgets-camera-example.html":http://doc.qt.io/qt-5/qtmultimediawidgets-camera-example.html -
Did you build the Qt Multimedia module ?
-
I did this (I did it before, and the response are those I get now)
@~/opt/qt5/qtmultimedia $ /usr/local/qt5/bin/qmake -project@
@/usr/local/qt5/bin/qmake qtmultimedia.pro@ -
@make
Makefile:7405: warning: overriding recipe for target '.moc/moc_videoplayer.cpp'
Makefile:7175: warning: ignoring old recipe for target '.moc/moc_videoplayer.cpp'
[...]
Makefile:22911: warning: overriding recipe for target '.moc/moc_videowidget.cpp'
Makefile:6999: warning: ignoring old recipe for target '.moc/moc_videowidget.cpp'
Makefile:24555: warning: overriding recipe for target '.moc/moc_avfvideorenderercontrol.cpp'
Makefile:24043: warning: ignoring old recipe for target '.moc/moc_avfvideorenderercontrol.cpp'
Makefile:66871: warning: overriding recipe for target '.moc/video.moc'
Makefile:66656: warning: ignoring old recipe for target '.moc/video.moc'
Makefile:67707: warning: overriding recipe for target '.obj/main.o'
Makefile:67704: warning: ignoring old recipe for target '.obj/main.o'
[...]
Makefile:78782: warning: overriding recipe for target '.obj/videoplayer.o'
Makefile:78311: warning: ignoring old recipe for target '.obj/videoplayer.o'
Makefile:100902: warning: overriding recipe for target '.obj/main.o'
Makefile:78550: warning: ignoring old recipe for target '.obj/main.o'
[...]
Makefile:103595: warning: overriding recipe for target '.obj/videoplayer.o'
Makefile:78782: warning: ignoring old recipe for target '.obj/videoplayer.o'
Makefile:103830: warning: overriding recipe for target '.obj/main.o'
Makefile:103243: warning: ignoring old recipe for target '.obj/main.o'
Makefile:104011: warning: overriding recipe for target '.obj/videoplayer.o'
Makefile:103595: warning: ignoring old recipe for target '.obj/videoplayer.o'
Makefile:104166: warning: overriding recipe for target '.obj/videowidget.o'
Makefile:77959: warning: ignoring old recipe for target '.obj/videowidget.o'
Makefile:125330: warning: overriding recipe for target '.obj/wavheader.o'
Makefile:124733: warning: ignoring old recipe for target '.obj/wavheader.o'
Makefile:149987: warning: overriding recipe for target '.obj/audiorecorder.o'
Makefile:76253: warning: ignoring old recipe for target '.obj/audiorecorder.o'
Makefile:150178: warning: overriding recipe for target '.obj/camera.o'
Makefile:77036: warning: ignoring old recipe for target '.obj/camera.o'
Makefile:150527: warning: overriding recipe for target '.obj/qsound.o'
Makefile:84816: warning: ignoring old recipe for target '.obj/qsound.o'
Makefile:150867: warning: overriding recipe for target '.obj/camera.o'
Makefile:150178: warning: ignoring old recipe for target '.obj/camera.o'
Makefile:151081: warning: overriding recipe for target '.obj/video.o'
Makefile:150744: warning: ignoring old recipe for target '.obj/video.o'
/usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -fno-exceptions -Wall -W -D_REENTRANT -fPIE -DQT_NO_MTDEV -DQT_NO_XKB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -Isrc/multimedia/gsttools_headers -Isrc/multimedia/video -Isrc/multimedia/controls -Isrc/multimedia/audio -Isrc/multimedia/camera -Isrc/multimediawidgets -Isrc/multimedia -Isrc/multimedia/playback -Isrc/multimedia/qtmultimediaquicktools_headers -Isrc/qtmultimediaquicktools -Iexamples/multimedia/audiodecoder -Iexamples/multimedia/audiodevices -Iexamples/multimedia/audioinput -Iexamples/multimedia/audiooutput -Iexamples/multimedia/audiorecorder -Iexamples/multimedia/radio -Iexamples/multimediawidgets/camera -Iexamples/multimediawidgets/player -Iexamples/multimediawidgets/videographicsitem -Isrc/imports/audioengine -Isrc/imports/multimedia -Isrc/multimedia/radio -Isrc/multimedia/recording -Isrc/plugins/alsa -Isrc/plugins/audiocapture -Isrc/plugins/directshow -Isrc/plugins/directshow/camera -Isrc/plugins/directshow/player -Isrc/plugins/m3u -Isrc/plugins/opensles -Isrc/plugins/pulseaudio -Isrc/plugins/qnx -Isrc/plugins/qnx/camera -Isrc/plugins/qnx/mediaplayer -Isrc/plugins/resourcepolicy -Isrc/plugins/v4l -Isrc/plugins/v4l/radio -Isrc/plugins/windowsaudio -Isrc/plugins/winrt -Isrc/plugins/wmf -Isrc/plugins/wmf/player -Isrc/plugins/wmf/decoder -Iexamples/multimedia/spectrum/app -Iexamples/multimedia/spectrum/3rdparty/fftreal -Iexamples/multimedia/video/qmlvideo -Iexamples/multimedia/video/snippets/performancemonitor -Iexamples/multimedia/video/qmlvideofx -Iexamples/multimediawidgets/customvideosurface/customvideoitem -Iexamples/multimediawidgets/customvideosurface/customvideowidget -Isrc/plugins/android/src -Isrc/plugins/android/src/mediaplayer -Isrc/plugins/android/src/mediacapture -Isrc/plugins/android/src/wrappers/jni -Isrc/plugins/android/videonode -Isrc/plugins/gstreamer/audiodecoder -Isrc/plugins/gstreamer/camerabin -Isrc/plugins/gstreamer/mediacapture -Isrc/plugins/gstreamer/mediaplayer -Isrc/plugins/qnx/common -Isrc/plugins/qnx-audio/audio -Isrc/plugins/videonode/egl -Isrc/plugins/videonode/imx6 -Itests/auto/integration/qaudioinput -Itests/auto/unit/qmultimedia_common -Iexamples/multimedia/spectrum/3rdparty/fftreal/stopwatch -Iexamples/multimedia/video/qmlvideofx/qmlapplicationviewer -Iexamples/multimedia/video/snippets/frequencymonitor -Isrc/plugins/android/src/common -Itests/auto/unit/qmediaserviceprovider -I/home/pi/opt/qt5/qtbase/include -I/home/pi/opt/qt5/qtbase/include/QtGui -I/home/pi/opt/qt5/qtbase/include/QtCore -I.moc -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/local/qt5/mkspecs/devices/linux-rasp-pi-g++ -o .obj/main.o examples/multimediawidgets/customvideosurface/customvideowidget/main.cpp
In file included from examples/multimediawidgets/customvideosurface/customvideowidget/main.cpp:41:0:
examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.h:44:24: fatal error: QMediaPlayer: No such file or directory
compilation terminated.
Makefile:103835: recipe for target '.obj/main.o' failed
make: *** [.obj/main.o] Error 1@ -
Did you call make install after you built the module ?