by Guest » 05 Jan 2025, 12:34
Ich versuche, Node.js für Raspberry Pi Zero v1 zu kompilieren. Im Gegensatz zum v2-Modell verfügt dieses Modell über eine Armv6-CPU und offizielle Node-Releases zielen nur auf Armv7+ ab.
Ich habe das Projekt mit dem folgenden Skript konfiguriert:
Code: Select all
export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export CC_host="gcc -m32"
export CXX_host="g++ -m32"
mkdir ../node_build_armv6
./configure --prefix=../node_build_armv6 --dest-cpu=arm --cross-compiling --dest-os=linux --with-arm-float-abi=hard --with-arm-fpu=neon
Das meiste davon habe ich diesem Artikel entnommen: Cross Compiling Node.js für ARM unter Ubuntu
Die Fehler, die ich erhalte, sehen so aus:< /p>
Code: Select all
/usr/lib/gcc-cross/arm-linux-gnueabihf/13/include/arm_neon.h:10460:1: error: inlining failed in call to ‘always_inline’ ‘vld1q_u16’: target specific option mismatch
10460 | vld1q_u16 (const uint16_t * __a)
| ^~~~~~~~~
../deps/zlib/slide_hash_simd.h:50:25: note: called from here
50 | uint16x8_t v8 = vld1q_u16(table + 8); \
| ^~~~~~~~~~~~~~~~~~~~
../deps/zlib/slide_hash_simd.h:107:5: note: in expansion of macro ‘Z_SLIDE_HASH_SIMD’
107 | Z_SLIDE_HASH_SIMD(prev, w_size, vec_wsize);
| ^~~~~~~~~~~~~~~~~
/usr/lib/gcc-cross/arm-linux-gnueabihf/13/include/arm_neon.h:10460:1: error: inlining failed in call to ‘always_inline’ ‘vld1q_u16’: target specific option mismatch
10460 | vld1q_u16 (const uint16_t * __a)
| ^~~~~~~~~
../deps/zlib/slide_hash_simd.h:49:25: note: called from here
49 | uint16x8_t vO = vld1q_u16(table + 0); \
| ^~~~~~~~~~~~~~~~~~~~
../deps/zlib/slide_hash_simd.h:107:5: note: in expansion of macro ‘Z_SLIDE_HASH_SIMD’
107 | Z_SLIDE_HASH_SIMD(prev, w_size, vec_wsize);
| ^~~~~~~~~~~~~~~~~
Was ich feststellen konnte ist, dass vld1q_u16 ein AVX-Vektoroperationsbefehl ist, der auf meiner Ziel-CPU nicht unterstützt wird. Das Problem scheint in zlib und nicht in nodejs selbst zu liegen, aber ich würde wirklich gerne dem gesamten Build-System irgendwie mitteilen, dass es nicht mit dieser Anweisung bauen soll.
Gibt es ein configure-Argument, das ich übergeben kann, um diesen Fehler zu vermeiden?
Ich versuche, Node.js für Raspberry Pi Zero v1 zu kompilieren. Im Gegensatz zum v2-Modell verfügt dieses Modell über eine Armv6-CPU und offizielle Node-Releases zielen nur auf Armv7+ ab.
Ich habe das Projekt mit dem folgenden Skript konfiguriert:
[code]export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export CC_host="gcc -m32"
export CXX_host="g++ -m32"
mkdir ../node_build_armv6
./configure --prefix=../node_build_armv6 --dest-cpu=arm --cross-compiling --dest-os=linux --with-arm-float-abi=hard --with-arm-fpu=neon
[/code]
Das meiste davon habe ich diesem Artikel entnommen: Cross Compiling Node.js für ARM unter Ubuntu
Die Fehler, die ich erhalte, sehen so aus:< /p>
[code]/usr/lib/gcc-cross/arm-linux-gnueabihf/13/include/arm_neon.h:10460:1: error: inlining failed in call to ‘always_inline’ ‘vld1q_u16’: target specific option mismatch
10460 | vld1q_u16 (const uint16_t * __a)
| ^~~~~~~~~
../deps/zlib/slide_hash_simd.h:50:25: note: called from here
50 | uint16x8_t v8 = vld1q_u16(table + 8); \
| ^~~~~~~~~~~~~~~~~~~~
../deps/zlib/slide_hash_simd.h:107:5: note: in expansion of macro ‘Z_SLIDE_HASH_SIMD’
107 | Z_SLIDE_HASH_SIMD(prev, w_size, vec_wsize);
| ^~~~~~~~~~~~~~~~~
/usr/lib/gcc-cross/arm-linux-gnueabihf/13/include/arm_neon.h:10460:1: error: inlining failed in call to ‘always_inline’ ‘vld1q_u16’: target specific option mismatch
10460 | vld1q_u16 (const uint16_t * __a)
| ^~~~~~~~~
../deps/zlib/slide_hash_simd.h:49:25: note: called from here
49 | uint16x8_t vO = vld1q_u16(table + 0); \
| ^~~~~~~~~~~~~~~~~~~~
../deps/zlib/slide_hash_simd.h:107:5: note: in expansion of macro ‘Z_SLIDE_HASH_SIMD’
107 | Z_SLIDE_HASH_SIMD(prev, w_size, vec_wsize);
| ^~~~~~~~~~~~~~~~~
[/code]
Was ich feststellen konnte ist, dass vld1q_u16 ein AVX-Vektoroperationsbefehl ist, der auf meiner Ziel-CPU nicht unterstützt wird. Das Problem scheint in zlib und nicht in nodejs selbst zu liegen, aber ich würde wirklich gerne dem gesamten Build-System irgendwie mitteilen, dass es nicht mit dieser Anweisung bauen soll.
Gibt es ein configure-Argument, das ich übergeben kann, um diesen Fehler zu vermeiden?