openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.49k forks source link

node failed to build #15986

Open kpoman opened 3 years ago

kpoman commented 3 years ago

Maintainer: @nxhack Environment: bcm27xx openwrt snapshot sdk

Description: Failed to build node v14.17.1 with below error:

  cc -o /home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1/out/Release/obj.target/openssl/deps/openssl/config/archs/linux-x86_64/asm/engines/e_padlock-x86_64.o ../deps/openssl/config/archs/linux-x86_64/asm/engines/e_padlock-x86_64.s '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DNDEBUG' '-DOPENSSL_USE_NODELETE' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_IA32_SSE2' '-DOPENSSL_BN_ASM_MONT' '-DOPENSSL_BN_ASM_MONT5' '-DOPENSSL_BN_ASM_GF2m' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DRC4_ASM' '-DMD5_ASM' '-DAESNI_ASM' '-DVPAES_ASM' '-DGHASH_ASM' '-DECP_NISTZ256_ASM' '-DX25519_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/etc/ssl"' '-DENGINESDIR="/dev/null"' '-DTERMIOS' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -I../deps/openssl/config -I../deps/openssl/config/archs/linux-x86_64/asm -I../deps/openssl/config/archs/linux-x86_64/asm/include -I../deps/openssl/config/archs/linux-x86_64/asm/crypto -I../deps/openssl/config/archs/linux-x86_64/asm/crypto/include/internal  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wa,--noexecstack -Wall -O3 -pthread -m64 -Wall -O3 -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer  -MMD -MF /home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1/out/Release/.deps//home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1/out/Release/obj.target/openssl/deps/openssl/config/archs/linux-x86_64/asm/engines/e_padlock-x86_64.o.d.raw -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/host/include -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/hostpkg/include -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/target-aarch64_cortex-a72_musl/host/include -O2 -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/host/include -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/hostpkg/include -I/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/staging_dir/target-aarch64_cortex-a72_musl/host/include -c
make[4]: execvp: printf: Argument list too long
make[4]: *** [deps/openssl/openssl.target.mk:905: /home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
make[3]: *** [Makefile:104: node] Error 2
make[3]: Leaving directory '/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1'
make[2]: *** [Makefile:157: /home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/build_dir/hostpkg/node-v14.17.1/.built] Error 2
make[2]: Leaving directory '/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/feeds/packages/lang/node'
time: package/feeds/packages/node/host-compile#101.79#14.28#123.60
    ERROR: package/feeds/packages/node [host] failed to build.
make[1]: *** [package/Makefile:114: package/feeds/packages/node/host/compile] Error 1
make[1]: Leaving directory '/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64'
make: *** [/home/kpoman/Dev/openwrt/openwrt-sdk-bcm27xx-bcm2711_gcc-8.4.0_musl.Linux-x86_64/include/toplevel.mk:223: package/feeds/packages/ntopng/compile] Error 2

error make[4]: execvp: printf: Argument list too long, apparently fixed here

nxhack commented 3 years ago

Hi @kpoman

Patch is available.

https://raw.githubusercontent.com/nxhack/openwrt-node-packages/master/node/patches/v14.x/010-execvp-arg-list-too-long.patch

However, I do not plan to apply it to this community package.

nxhack commented 3 years ago

A simple solution is to rename the ditectory name, as shown in this link.

https://github.com/nodejs/node/issues/9137#issuecomment-370728059

kpoman commented 3 years ago

Hi @kpoman

Patch is available.

https://raw.githubusercontent.com/nxhack/openwrt-node-packages/master/node/patches/v14.x/010-execvp-arg-list-too-long.patch

However, I do not plan to apply it to this community package.

Hello @nxhack ! Thanks for pointing that patch ! Why dont you want to commit it to the community package (just for curiosity) ?

nxhack commented 3 years ago

@kpoman

As discussed in the upstream,