Open miks opened 4 years ago
I am having a similar, or maybe related issue building on Ubuntu 18.04. Completely fresh VMs created specifically for compiling nerves firmware, and a physical box. (this has happened on multiple fresh installs this week)
I have been working on tweaking this systems GPU stack to optimize QTWebengine, as a result been rebuilding the firmware quite a bit - which takes a long time. I have run into this on all of my machines...
It is regarding the cross compilation of webengine_kiosk
for the target.
Anyway here is the problem.
After successfully building the firmware, during the compilation of webengine_kiosk
for the target (I assume) the following error is being thrown.
/home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5WebEngineWidgets.so /usr/lib/x86_
64-linux-gnu/libQt5WebEngineCore.so /usr/lib/x86_64-linux-gnu/libQt5Quick.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so
/usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so /usr/lib/x86_64-linux-gnu/libQt5WebC
hannel.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/li
bQt5Core.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5Widgets.so /home/doug/.n
erves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5Multimedia.so /home/doug/.nerves/artifacts/kiosk_
system_rpi3-portable-1.9.1/staging/usr/lib/libQt5WebEngineCore.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portabl
e-1.9.1/staging/usr/lib/libQt5Quick.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/lib
Qt5Gui.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5QmlModels.so /home/doug/.n
erves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5WebChannel.so /home/doug/.nerves/artifacts/kiosk_
system_rpi3-portable-1.9.1/staging/usr/lib/libQt5Qml.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/st
aging/usr/lib/libQt5Network.so /home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib/libQt5Core.
so -latomic -lrt -ldl -L/home/doug/.nerves/artifacts/kiosk_system_rpi3-portable-1.9.1/staging/usr/lib -lGLESv2 -lpthread
arm-unknown-linux-gnueabihf-g++: error: /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so: No such file or directory
Makefile:236: recipe for target 'kiosk' failed
make[1]: *** [kiosk] Error 1
make[1]: Leaving directory '/home/doug/projects/nrvs_ktchn_ksk/_build/rpi3_custom_dev/lib/webengine_kiosk/obj'
Makefile:23: recipe for target 'submake' failed
make: *** [submake] Error 2
could not compile dependency :webengine_kiosk, "mix compile" failed. You can recompile this dependency with "mix deps.co
mpile webengine_kiosk", update it with "mix deps.update webengine_kiosk" or clean it with "mix deps.clean webengine_kios
k"
==> nrvs_ktchn_ksk
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".
I am really not sure what it is doing looking at /usr/lib/x86_64-linux-gnu/
for that QT library.
arm-unknown-linux-gnueabihf-g++: error: /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so: No such file or directory
The weird, and concerning thing, is the firmware builds the first time OK but then this starts happening and no amount of mix nerves.clean
, or manually deleting ~/.nerves
or _build
or deps
seems to help. Using a different branch of the kiosk_system_rpi3
or the hex published one makes no difference, the same error occurs.
I have a suspicion something is polluting the host in an unclear and not easily reversible way.
Maybe it is related to something about Ubuntu 18.04 Server
?
Any insight or help is much appreciated!
Managed to sort this out with some help from @fhunleth on Slack.
When building this firmware, it leverages some host QT libraries. (sure)
The current nerves_br
is shipping with qt 5.14.
I think it is probably best to build this firmware on a system running the same version of QT to ensure compatibility.
On Ubuntu new versions of QT can be installed via this PPA
I think this issue can be closed.
To answer OPs question - YES, qmake does need to be installed on the host. (I am also a bit confused about this, but presume it is Qt related...)
What is the correct approach to build an image for rpi3 on Ubuntu? If I understand correctly then: 1) clone repository 2) cd kiosk_system_rpi3/example 3) export MIX_TARGET=rpi3 4) mix do deps.get, firmware, firmware.burn
on step 4. I'm getting:
But, if I understand correctly then I'm crossbuilding and there is no need to install qmake on host (Ubuntu 18.04). Am I right and missing something completely other?