Cross compiling QtSerialBus for raspberry pi 3 complains that QtSerialPort is not available
I am cross compiling qt 5.10 for my raspberry pi 3. Everything want more or less well (with a lot of perseverance), but I have a last issue with the last module I would like to build: QtSerialBus. At the compilation, there is the following error:
"Some of the required modules (qtHaveModule(serialport)) are not available."
I have built Qt with the following command:
configure.bat -release -platform win32-g++ -xplatform linux-arm-gnueabihf-g++ -release -opensource -confirm-license -sysroot C:/dev/tools/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option CROSS_COMPILE=C:/dev/tools/SysGCC/raspberry/bin/arm-linux-gnueabihf- -no-gui -no-widgets -no-opengl -nomake tests -nomake examples -no-use-gold-linker
Then, I have build the QtSerialModule and QtRemoteObjects module following those steps:
- make a subdirectory in the build folder with the name of the module and go within
- Call qmake.exe /path/to/Qt_sources/qtXXX
- Run make install
Everything went well for those two modules. I tried to do the same for QtSerialBus, without success.
What did I miss ? How can I make the link with the previous build of the module QtSerialPort ?
Thank you in advance for your help.
Hi and welcome to devnet,
Are you sure you are invoking the correct version of
Yes. I retried by calling explicitly qmake.exe from my cross compilation build for qtserialport and qtserialbus, and it produces the same result.
How does the build process determine that I have or not the required module ? Is it looking into the path ? Is it looking into leftover build artifact of qtserialport ?
When you build a Qt module, the dependencies are listed in the
QT +=lines. This will trigger an inclusion of the corresponding pri files that you can find in the
Thank you SGaist.
I look at the big output of the qmake -d. It seems to browse a few directories to find the pri files of the modules, but never the good ones. After further investigation, I found that the function from qt_config.prf looks also in the QMAKEMODULES environment variable to configure the list of folders where to find the modules. After configuring this variable to my *.pri folder in qt installation path of the sysroot folder, the module qtserialport was found !
I think I will create a bug on the qt bug tracker. I really do not see what I miss to have that bug in my configuration of the qt build.