Closed bramroelandts closed 5 years ago
This is an immortal issue. I was never able to debug this as I was never able to reproduce this. I suspect it is because the build environment is using the local Erlang installation instead the erlang-native, which should be used. Would you mind installing Erlang in the build machine itself (outside the bitbake environment)?
Judging from the multiple issues opened about this, this issue indeed seems quite persistent.
Because I tested the application server on my build machine first, Erlang 20 OTP is installed on the build machine (Ubuntu 18.04
). To include Erlang in the Yocto image, I'm using the meta-erlang layer. Although I am unsure which version of Erlang meta-erlang
installs, I think it installs Erlang 21, while on my build machine Erlang 20 is used.
Is it possible the issue is related to the difference between Erlang version of host machine and the bitbake image?
That's unlikely, but possible.
Just to be sure, I installed Erlang 21 instead of 20 onto my host machine. Still no luck with compilation, as the same error keeps popping up. Do you have any suggestions as to how I can debug this issue any further? Should I use another Ubuntu distro and just set up a vanilla Yocto environment? Anything else?
Would it be possible to use Debian instead of Ubuntu?
I had the same issue but I was able to fix it. You need to inherit erlang and npm so that it will use the escript and npm commands from the Yocto build system instead of the native installed tools. Also, the inherit line needs to be moved earlier so that the inherited classes do not overwrite some of the variables set in the recipe.
This patch shows the changes I made to get it to work:
diff --git a/recipes-core/lorawan-server/lorawan-server_0.6.6.bb b/recipes-core/lorawan-server/lorawan-server_0.6.6.bb index d2cf791..e14e9fe 100644 --- a/recipes-core/lorawan-server/lorawan-server_0.6.6.bb +++ b/recipes-core/lorawan-server/lorawan-server_0.6.6.bb @@ -7,6 +7,8 @@ DEPENDS = "erlang" LICENSE = "MIT" LIC_FILES_CHKSUM = >"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+inherit useradd update-rc.d erlang npm + SRCURI = "git://github.com/gotthardp/lorawan-server.git;branch=master \ file://lorawan-server.init \ file://lorawan-server.default" @@ -18,7 +20,7 @@ RDEPENDS${PN} += "bash erlang erlang-compiler erlang-syntax-tools erlang-crypto erlang-inets erlang-asn1 erlang-public-key erlang-ssl erlang-mnesia erlang-os-mon \ erlang-xmerl"
-inherit useradd update-rc.d +FILES_${PN} += " /etc "
USERADD_PACKAGES = "${PN}" USERADDPARAM${PN} = "--home-dir /var/lib/lorawan-server --create-home lorawan"
@sampopitkanen, thanks a lot!
I'm trying to compile the Erlang LoRaWAN server on Yocto. I successfully compiled
erlang
anderlang-modules
(I tried both, as suggested in this issue).All but one compile task succeeds. Bitbake throws the following error:
I'm compiling this on
Ubuntu 18.04
with 64-bitErlang 20
installed on my system. How would I go about debugging this issue? Help is greatly appreciated.