Closed benrom closed 3 years ago
This is likely due to having compiled the version for mac first and then switching targets. The webengine kiosk application likely needs to be updated to build in the _build
directory instead of in the source directory. I suspect that if you were to clean the dependency and build it again with the target set that it would work successfully.
That was a super quick reply, cheers!
As you can see in my steps to reproduce, the target is set before the dependencies are fetched and compiled.
I've just tried again the following, to make sure:
mix deps.clean --all
MIX_TARGET=rpi3 mix deps.get
MIX_TARGET=rpi3 mix deps.compile
MIX_TARGET=rpi3 mix firmware
I got the same error.
During the deps.compile step I can see the following:
==> webengine_kiosk
mkdir -p /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/priv
cp -r assets/www /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/priv
mkdir -p /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/obj
cd /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/obj && qmake /Users/chris/tests/kiosk/deps/webengine_kiosk//src/kiosk.pro
Info: creating stash file /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/obj/.qmake.stash
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j3 -C /Users/chris/tests/kiosk/_build/rpi3_dev/lib/webengine_kiosk/obj
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I/Users/chris/tests/kiosk/deps/webengine_kiosk/src -I. -I/usr/local/Cellar/qt/5.15.0/lib/QtWebEngineWidgets.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtPrintSupport.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtMultimedia.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtWebEngineCore.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtQuick.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtQmlModels.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtWebChannel.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtQml.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtPositioning.framework/Headers -I/usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.15.0/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.15.0/lib -o main.o /Users/chris/tests/kiosk/deps/webengine_kiosk/src/main.cpp
So it looks like indeed it targeted the x86_64 platform (Mac). Is there something I'm missing there to compile for Pi?
This looks like you have wrong system image
Can you post your mix.exs
?
Basically you should have this {:kiosk_system_rpi3, "~> 1.10.0", runtime: false, targets: :rpi3},
instead of {:nerves_system_rpi3, "~> 1.12", runtime: false, targets: :rpi3}
in your mix.exs
Thanks @pavels ! That was the problem indeed. I ran into more issues after that (asdf / curl / openssl versions), but I got it to compile and to work in the end!
Basically this example project told me everything I needed to do to get started: https://github.com/nerves-web-kiosk/kiosk_system_rpi3/tree/main/example
Hi,
I ran into an issue building the project for RPi3 with nerves on MacOS. I started with a blank new nerves project and added the dependency (QT installation via brew was fine with correct PATH added).
Here's the error I got:
The
_nerves-tmp
did not exist at that location, but it might have been removed at the end of the script.I followed the given checklist but it did not help.
The project dependencies:
My build environment:
Here are the steps to reproduce:
Thanks for any help!