I'm trying to build a customized Yocto Image for my RaspberryPI3 device. Actually, I need to install NodeJS version 6.10.3 (I need this specific version), but the recipes I've found on "meta-nodejs" repo seems to be broken. (can't install directly from meta-nodejs, it gives me errors like "env python: env command not found"). So, after I tested directly on the Yocto os, I've decided to use the pre-compiled version for ARMV7L ( https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-armv7l.tar.gz ). I've made my custom recipe and "bitbaked" directly on my image without any error, but the binary seems to have some issues.
root@yocto:~# node --version
Segmentation fault
I've compared this file with the original one and see that the one on yocto's rootfs was "stripped"
root@yocto:~# file /usr/bin/node
/usr/bin/node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=cbdb85ab56e5b0f7c31aeb0671fd9b6ae5984f81, stripped
root@yocto:~# file /opt/node-v6.10.3-linux-armv7l/bin/node
/opt/node-v6.10.3-linux-armv7l/bin/node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=cbdb85ab56e5b0f7c31aeb0671fd9b6ae5984f81, with debug_info, not stripped
So I've tried to "play" around with my recipe adding:
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
but I continue to get the same error.
my recipe:
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
LICENSE = "MIT & BSD-2-Clause & BSD-3-Clause & ISC & AFL-2.0 & Apache-2.0 & OpenSSL & Zlib & Artistic-2.0 & (BSD-3-Clause | GPLv2)"
LIC_FILES_CHKSUM = "file://LICENSE;md5=41a3a0ccf7f515cac3377389dd8faac8"
RDEPENDS_${PN} += "bash"
SRC_URI = " https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-armv7l.tar.gz"
SRC_URI[sha256sum] = "c36f0713fcf397a6b278b61f4c1511938f7ad1e5385c31e530d074ce83163426"
S = "${WORKDIR}/node-v${PV}-linux-armv7l"
do_install_append() {
install -d ${D}/usr/
cp -rf ${S}/* ${D}/usr/
}
FILES_${PN} += "/usr/*"
INSANE_SKIP_${PN} += "already-stripped"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"