How to build Qt on system without a GUI?
-
wrote on 24 Oct 2019, 12:19 last edited by
@jsulm said in How to build Qt on system without a GUI?:
@Pavel_47 Is it in your host system or sysroot?
Sorry, I didn't understand what you mean ...
The location of the screenshot: /usr/include/xkbcommon on my host
The location of .c snippet (where I compiled it): ~/raspi/ on my host -
@jsulm said in How to build Qt on system without a GUI?:
@Pavel_47 Is it in your host system or sysroot?
Sorry, I didn't understand what you mean ...
The location of the screenshot: /usr/include/xkbcommon on my host
The location of .c snippet (where I compiled it): ~/raspi/ on my host@Pavel_47 said in How to build Qt on system without a GUI?:
/usr/include/xkbcommon on my host
That's the point: you need these headers in your sysroot!
-
wrote on 24 Oct 2019, 12:36 last edited by
Indeed !
In ~/raspi/sysroot/usr/include/xkbcommon there is one less file comparing to /usr/include/xkbcommon ... and this missed file is precisely xkbcommon-compose.h.So, I copy xkbcommon-compose.h from /usr/include/xkbcommon to ~/raspi/sysroot/usr/include/xkbcommon and then build Qt toolchain once more ?
-
wrote on 24 Oct 2019, 14:03 last edited by
-
As we already wrote: you need the library too. And built for your target.
-
wrote on 24 Oct 2019, 14:43 last edited by
You mean that the errors announce in the screenshot from previous message are still related to the xkbcommon issue ?
So I should ask xkbcommon developpers for makefile dedicated for RPi3. Correct ?
Let's say I got it, what next ? Where should I put xkbcommon built directory ... i.e. which location in ~/raspi/sysroot.
After all ... I wonder if someone already faced this issue ? Or this probles rose for the 1st time ? What about previous Qt releases ? There were no similar issues ? -
It's a library that is now provided on all Linux flavours supported by the Qt project. Prior to that, it was bundled with Qt.
So what distribution are you running on your Pi ?
-
wrote on 24 Oct 2019, 15:42 last edited by
Linux raspberrypi 4.9.77-v7+
-
That's the kernel running on your target.
Are you using Raspbian ? Another distribution ?
-
wrote on 24 Oct 2019, 15:53 last edited by
Yes, I use raspbian "Jessie"
-
Then, AFAIR, you should have the library. So if it can't be found either:
- it wasn't synchronized properly back to your host machine
- the configure call has not been done from a clean state
- it's not the correct library that was found
For the first point you have to sync the library as well as the symbolic links pointing to it or re-create them in your host copy of the sysroot.
-
wrote on 24 Oct 2019, 18:06 last edited by
I did as you suggested:
(1) resync host wit RPi:
rsync -avz pi@raspberrypi.local:/lib sysroot
rsync -avz pi@raspberrypi.local:/usr/include sysroot/usr
rsync -avz pi@raspberrypi.local:/usr/lib sysroot/usr
rsync -avz pi@raspberrypi.local:/opt/vc sysroot/opt
(2) update symbolic names:
./sysroot-relativelinks.py sysroot
Then rebuild Qt (rather tried to rebuild).
Here is what I got:
This time it's different ... but still fails
-
I did as you suggested:
(1) resync host wit RPi:
rsync -avz pi@raspberrypi.local:/lib sysroot
rsync -avz pi@raspberrypi.local:/usr/include sysroot/usr
rsync -avz pi@raspberrypi.local:/usr/lib sysroot/usr
rsync -avz pi@raspberrypi.local:/opt/vc sysroot/opt
(2) update symbolic names:
./sysroot-relativelinks.py sysroot
Then rebuild Qt (rather tried to rebuild).
Here is what I got:
This time it's different ... but still fails
wrote on 24 Oct 2019, 18:40 last edited by@Pavel_47 two things please:
- Your last screenshot doesn't seem to show exact error, I guess you should scroll up
- stop posting screenshots, paste text instead (it's easier for others to comment back on any line of output for instance...)
-
wrote on 24 Oct 2019, 21:11 last edited by
The log is huge.
I scrolled up a few hundred lines - nothing that indicatedÅ errors.
Concerning text instead of screenshots - Ok, I took note. -
Run the build with only one process you'll have the error closer.
-
wrote on 25 Oct 2019, 10:01 last edited by
Yes, with one core the the log is more verbose.
Here is what I got at the end:rm -f libcomposeplatforminputcontextplugin.so /home/pavel/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/pavel/raspi/sysroot -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/pavel/raspi/sysroot/lib/arm-linux-gnueabihf -shared -o libcomposeplatforminputcontextplugin.so .obj/qcomposeplatforminputcontextmain.o .obj/qcomposeplatforminputcontext.o .obj/moc_qcomposeplatforminputcontext.o -L=/opt/vc/lib /home/pavel/raspi/qtbase/lib/libQt5Gui.so /home/pavel/raspi/qtbase/lib/libQt5Core.so /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so -lpthread /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::~QComposeInputContext()': qcomposeplatforminputcontext.cpp:(.text+0x34): undefined reference to `xkb_compose_state_unref' qcomposeplatforminputcontext.cpp:(.text+0x3c): undefined reference to `xkb_compose_table_unref' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::reset()': qcomposeplatforminputcontext.cpp:(.text+0x80): undefined reference to `xkb_compose_state_reset' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::ensureInitialized()': qcomposeplatforminputcontext.cpp:(.text+0x3bc): undefined reference to `xkb_compose_table_new_from_locale' qcomposeplatforminputcontext.cpp:(.text+0x3d0): undefined reference to `xkb_compose_state_new' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::filterEvent(QEvent const*)': qcomposeplatforminputcontext.cpp:(.text+0x6ac): undefined reference to `xkb_compose_state_feed' qcomposeplatforminputcontext.cpp:(.text+0x6b4): undefined reference to `xkb_compose_state_get_status' qcomposeplatforminputcontext.cpp:(.text+0x6f8): undefined reference to `xkb_compose_state_get_utf8' qcomposeplatforminputcontext.cpp:(.text+0x72c): undefined reference to `xkb_compose_state_get_utf8' collect2: error: ld returned 1 exit status Makefile:247: recipe for target '../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so' failed make[4]: *** [../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so] Error 1 make[4]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts/compose' Makefile:47: recipe for target 'sub-compose-make_first' failed make[3]: *** [sub-compose-make_first] Error 2 make[3]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts' Makefile:129: recipe for target 'sub-platforminputcontexts-make_first' failed make[2]: *** [sub-platforminputcontexts-make_first] Error 2 make[2]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins' Makefile:778: recipe for target 'sub-plugins-make_first' failed make[1]: *** [sub-plugins-make_first] Error 2 make[1]: Leaving directory '/home/pavel/raspi/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make: *** [sub-src-make_first] Error 2
Seem that problem is still related to xkb staff ...
-
Yes, with one core the the log is more verbose.
Here is what I got at the end:rm -f libcomposeplatforminputcontextplugin.so /home/pavel/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/pavel/raspi/sysroot -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/pavel/raspi/sysroot/lib/arm-linux-gnueabihf -shared -o libcomposeplatforminputcontextplugin.so .obj/qcomposeplatforminputcontextmain.o .obj/qcomposeplatforminputcontext.o .obj/moc_qcomposeplatforminputcontext.o -L=/opt/vc/lib /home/pavel/raspi/qtbase/lib/libQt5Gui.so /home/pavel/raspi/qtbase/lib/libQt5Core.so /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so -lpthread /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::~QComposeInputContext()': qcomposeplatforminputcontext.cpp:(.text+0x34): undefined reference to `xkb_compose_state_unref' qcomposeplatforminputcontext.cpp:(.text+0x3c): undefined reference to `xkb_compose_table_unref' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::reset()': qcomposeplatforminputcontext.cpp:(.text+0x80): undefined reference to `xkb_compose_state_reset' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::ensureInitialized()': qcomposeplatforminputcontext.cpp:(.text+0x3bc): undefined reference to `xkb_compose_table_new_from_locale' qcomposeplatforminputcontext.cpp:(.text+0x3d0): undefined reference to `xkb_compose_state_new' .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::filterEvent(QEvent const*)': qcomposeplatforminputcontext.cpp:(.text+0x6ac): undefined reference to `xkb_compose_state_feed' qcomposeplatforminputcontext.cpp:(.text+0x6b4): undefined reference to `xkb_compose_state_get_status' qcomposeplatforminputcontext.cpp:(.text+0x6f8): undefined reference to `xkb_compose_state_get_utf8' qcomposeplatforminputcontext.cpp:(.text+0x72c): undefined reference to `xkb_compose_state_get_utf8' collect2: error: ld returned 1 exit status Makefile:247: recipe for target '../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so' failed make[4]: *** [../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so] Error 1 make[4]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts/compose' Makefile:47: recipe for target 'sub-compose-make_first' failed make[3]: *** [sub-compose-make_first] Error 2 make[3]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts' Makefile:129: recipe for target 'sub-platforminputcontexts-make_first' failed make[2]: *** [sub-platforminputcontexts-make_first] Error 2 make[2]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins' Makefile:778: recipe for target 'sub-plugins-make_first' failed make[1]: *** [sub-plugins-make_first] Error 2 make[1]: Leaving directory '/home/pavel/raspi/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make: *** [sub-src-make_first] Error 2
Seem that problem is still related to xkb staff ...
@Pavel_47 said in How to build Qt on system without a GUI?:
undefined reference to `xkb_compose_state_get_utf8'
You're not linking against xkb lib
-
wrote on 25 Oct 2019, 10:22 last edited by
So, problems in Makefile ?
-
@Pavel_47 Try
file /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so
and post the output here.
-
wrote on 25 Oct 2019, 11:24 last edited by
here it is:
pavel@ALABAMA:~/raspi/qtbase$ file ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so: symbolic link to libxkbcommon.so.0.0.0
45/92