Unsolved Qwt from Windows to Linux Porting
-
@shivaVMC said in Qwt from Windows to Linux Porting:
Similarly I m tryinig to port my windows Qt app in a same way..
Ok, so you already know that you need to cross-compile everything, that is, your application code plus all the supporting libraries it uses (as a good starting point you've already cross-compiled Qt itself and some of its examples)
Now I m facing below error,what could be the solution for this
Project ERROR: Unknown module(s) in QT: svg
Makefile:45: recipe for target 'sub-src-make_first-ordered' faileThis a forum of/for programmers, not about magicians :-)
Seriously, please state clearly what you were trying to achieve when this error arose. That simply desciption is not enough, do you agree?
-
@Pablo-J.-Rogina
Really Sorry for that bad english,
I have compiled qt5.7.1 for rpi in my local PC(i.e., for cross compilation) its working fine and now I m using the same qmake generated in ~/raspi/qt5/bin/ for building qwt in my local linux machine for rpi.As below~/raspi/qt5/bin/qmake -o Makefile qwt.pro
~/Downloads/QWT/qwt-6.1.3$ make
cd src/ && ( test -e Makefile || /home/user/raspi/qt5/bin/qmake /home/user/Downloads/QWT/qwt-6.1.3/src/src.pro -o Makefile ) && make -f Makefile
Project ERROR: Unknown module(s) in QT: svg
Makefile:45: recipe for target 'sub-src-make_first-ordered' failed
make: *** [sub-src-make_first-ordered] Error 3can I know how can I fix this module in qmake
I m using below command for configuring
./configure -release -xkb -svg -fontconfig -openssl -opengl es2 -c++std 11 -device linux-rpi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/pi_raspi/sysroot -opensource -confirm-license -prefix /usr/local/qt5pi -extprefix ~/pi_raspi/qt5pi -hostprefix ~/pi_raspi/qt5 -no-use-gold-linker -v
make -j4
make installany option to set it in above configure command to make qtsvg enable for qmake to build qwt6.1.3
-
Check if QtSvg library is present in your cross-compiled Qt. It should be in
qtdir/lib/libQt5Svg.so
.Check the Makefile your created for Qwt - does it point to right Qt installation? Does it include corect compiler flags etc.
-
@sierdzio
Hi
I dont have QtSvg in qtbase/lib/libQt5Svg.so*Yes its pointing to the correct Qt installation as below
Makefile: qwt.pro ../../../raspi/qt5/mkspecs/devices/linux-rpi3-g++/qmake.conf ../../../raspi/qt5/mkspecs/features/spec_pre.prf
../../../raspi/qt5/mkspecs/common/unix.conf
../../../raspi/qt5/mkspecs/common/linux.conf
../../../raspi/qt5/mkspecs/common/sanitize.conf
to include the qtsvg lib,can I know the fix for it. -
@shivaVMC said in Qwt from Windows to Linux Porting:
I dont have QtSvg in qtbase/lib/libQt5Svg.so*
ok then you have to compile it. If you still have your Qt build directory, go into
qtbuilddir/qtsvg
and runmake && make install
there. -
@sierdzio
Hi,
I have cloned qtsvg module I followed below steps
~/raspi/qt5/bin/qmake -r
make
make install
Then I compiled the qwt-6.1.3 using
~/raspi/qt5/bin/qmake -o Makefile qwt.pro
make
make install
it went fine(no error's relating to svg Module) till last stage, but I came up with new error as belowProject ERROR: Unknown module(s) in QT: designer
Makefile:174: recipe for target 'sub-designer-make_first-ordered' failed
make: *** [sub-designer-make_first-ordered] Error 3I have cloned qttools module and
~/raspi/qt5/bin/qmake -r
make
During make I faced new errors again as below,
/home/user/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libproxy.so.1: undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
Makefile:95: recipe for target 'contextsensitivehelp' failed
make[3]: *** [contextsensitivehelp] Error 1
make[3]: Leaving directory '/home/user/raspi/qttools/examples/help/contextsensitivehelp'
Makefile:42: recipe for target 'sub-contextsensitivehelp-make_first-ordered' failed
make[2]: *** [sub-contextsensitivehelp-make_first-ordered] Error 2So can I know which module I need to clone to avoid this error?
or any other suggestive fix for this type of error -
@shivaVMC said in Qwt from Windows to Linux Porting:
So can I know which module I need to clone to avoid this error?
or any other suggestive fix for this type of errorAll these modules should be build together with your Qt build. When you did your Qt cross-compilation, did you do that on whole Qt source code or only qtbase or something?
-
@sierdzio
I cloned qtbase and followed./configure -release -xkb -svg -fontconfig -openssl -opengl es2 -c++std 11 -device linux-rpi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/pi_raspi/sysroot -opensource -confirm-license -prefix /usr/local/qt5pi -extprefix ~/pi_raspi/qt5pi -hostprefix ~/pi_raspi/qt5 -no-use-gold-linker -v
make -j4
make installSo I did only on qtbase.
Can I know the steps to build all modules together with Qt build?
-
@sierdzio
I followed this https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step siteAny changes in steps-by-step part of above site,please help me on it
-
@shivaVMC for a full Qt build you should read https://wiki.qt.io/Building_Qt_5_from_Git
its main difference should be the cloning part, configuration should be similar to qtbase alone.
-
Use whole Qt source code, not only qtbase. Qtbase contains only some basic modules like QtNetwork, QtCore etc. No widgets, no qml, etc.
Here's a short script to get you going with full Qt:
export QTVER=5.11.1 wget http://download.qt.io/official_releases/qt/5.11/$QTVER/single/qt-everywhere-src-$QTVER.tar.xz tar -xaf qt-everywhere-src-$QTVER.tar.xz mv qt-everywhere-src-$QTVER $QTVER-src mkdir qtbuild cd qtbuild ../$QTVER-src/configure -device linux-rasp-pi3-g++ -opengl es2 -confirm-license -opensource -release -nomake examples -skip qtwebview -skip qt3d -skip qtquick1 -skip qtwayland -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtscript -skip qtscxml -skip qtspeech -skip qtpurchasing -skip qtgamepad -skip qtserialbus -skip qtlocation -no-use-gold-linker -device-option CROSS_COMPILE=/path/toi/your/toolchain- -sysroot /path/to/your/sysroot -prefix /home/pi/$QTVER-cross -extprefix $PWD//../$QTVER-cross -hostprefix $PWD/../$QTVER-build -v
-
@sierdzio
okay...Thank You Thanks alot.
I m following the link https://wiki.qt.io/Building_Qt_5_from_Git and your mentioned short script..I will get back,if any issue I m facing. -
@shivaVMC said in Qwt from Windows to Linux Porting:
I m following the link https://wiki.qt.io/Building_Qt_5_from_Git and your mentioned short script..I will get back,if any issue I m facing.
Does not matter how you get Qt sources (from git like in your link or from archive like in my script), the result will be the same. Just remember to add all those
-skip
flags to configure line (and keep your sysroot and toolchain from the EGLFS guide). -
@sierdzio
I have tried to compile Qt build for Qt_V5.7.1,but I m facing the below error.obj/qeglfskmsintegration.o:(.data.rel.ro+0x74): undefined reference to `QEGLDeviceIntegration::destroyNativeWindow(void*)'
collect2: error: ld returned 1 exit statusCan I know which plugins/lib are missing or which lib I need to install?
-
@sierdzio
When I perform ../configure -device linux-rasp-pi3-g++ -opengl es2 -confirm-license -opensource -release -nomake examples -skip qtwebview -skip qt3d -skip qtquick1 -skip qtwayland -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtscript -skip qtscxml -skip qtspeech -skip qtpurchasing -skip qtgamepad -skip qtserialbus -skip qtlocation -no-use-gold-linker -device-option CROSS_COMPILE=~/raspi_QtBuild/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi_QtBuild/sysroot -prefix /usr/local/qt5pi -extprefix ~/raspi_QtBuild/qt5pi -hostprefix ~/raspi_QtBuild/qt5 -v
Note: Also available for Linux: linux-clang linux-icc
Note: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/home/user/raspi_QtBuild/qt5pi'.Prior to reconfiguration, make sure you remove any leftovers from
the previous build.When I perform --- make -j4
msgbmmain.o qeglfskmsgbmmain.cpp
qeglfskmsgbmwindow.cpp: In member function ‘virtual void QEglFSKmsGbmWindow::resetSurface()’:
qeglfskmsgbmwindow.cpp:58:5: error: ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’ was not declared in this scope
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface = nullptr;
^
qeglfskmsgbmwindow.cpp:58:46: error: expected ‘;’ before ‘createPlatformWindowSurface’
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface = nullptr;
^
qeglfskmsgbmwindow.cpp:61:9: error: ‘createPlatformWindowSurface’ was not declared in this scope
createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>(
^
qeglfskmsgbmwindow.cpp:61:56: error: expected type-specifier before ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’
createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>(
^
qeglfskmsgbmwindow.cpp:61:56: error: expected ‘>’ before ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’
qeglfskmsgbmwindow.cpp:61:56: error: expected ‘(’ before ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’
qeglfskmsgbmwindow.cpp:62:68: error: expected ‘)’ before ‘;’ token
eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"));
^
qeglfskmsgbmwindow.cpp:65:9: error: ‘createPlatformWindowSurface’ was not declared in this scope
if (createPlatformWindowSurface) {
^
Makefile:3029: recipe for target '.obj/qeglfskmsgbmwindow.o' failed
make[7]: *** [.obj/qeglfskmsgbmwindow.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms'
Makefile:72: recipe for target 'sub-eglfs_kms-make_first' failed
make[6]: *** [sub-eglfs_kms-make_first] Error 2
make[6]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src/plugins/platforms/eglfs/deviceintegration'
Makefile:104: recipe for target 'sub-deviceintegration-make_first-ordered' failed
make[5]: *** [sub-deviceintegration-make_first-ordered] Error 2
make[5]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src/plugins/platforms/eglfs'
Makefile:125: recipe for target 'sub-eglfs-make_first' failed
make[4]: *** [sub-eglfs-make_first] Error 2
make[4]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src/plugins/platforms'
Makefile:102: recipe for target 'sub-platforms-make_first' failed
make[3]: *** [sub-platforms-make_first] Error 2
make[3]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src/plugins'
Makefile:776: recipe for target 'sub-plugins-make_first' failed
make[2]: *** [sub-plugins-make_first] Error 2
make[2]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase/src'
Makefile:48: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/user/raspi_QtBuild/qt-everywhere-src-5.11.1/qtbase'
Makefile:70: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2 -
Why do you say you're compiling Qt 5.7.1 when the output you paste indicates 5.11.1?
Anyway, I've never seen that error, I don't know how to fix it.
-
@sierdzio
Qt_v5.7.1 .tar.xz file was already with me ,till Qt_v5.11.1 gets dowloaded I have compiled Qt5.7.1..... For both the version different errors I m facing as mentioned above -
@shivaVMC said in Qwt from Windows to Linux Porting:
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC
This comes from EGL headers. You probably don't have all Qt dependencies installed in your sysroot.
- Install necessary dependencies. Try with
sudo apt build-dep qt5-qmake qt5-default
on your Raspberry Pi. You may also trysudo apt install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
. - Update your sysroot and fix symlinks.
- Recompile Qt. Make sure to check
configure
output that it says EGL support is on.
- Install necessary dependencies. Try with
-
@sierdzio
Hi ,
Finally it got compiled...I m success on compiling and installing Qt-V5.11.1
Now,please suggest me that which qmake shall I take to compile qwt-6.1.3I m finding two qmake
- /home/user/raspi_QtBuild/Qtver-5.11.1/qtbase/bin/qmake
- /home/user/raspi_QtBuild/qt5/bin/
Thanks In advance for your help& support.
-
@shivaVMC said in Qwt from Windows to Linux Porting:
-hostprefix ~/raspi_QtBuild/qt5
This is your host prefix, so you should use the qmake from
/home/user/raspi_QtBuild/qt5/bin/
.You can verify which Qt version that qmake comes from by running:
/home/user/raspi_QtBuild/qt5/bin/qmake -version