Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node: build failure with binutils 2.37 #16729

Closed
LGA1150 opened this issue Sep 25, 2021 · 4 comments
Closed

node: build failure with binutils 2.37 #16729

LGA1150 opened this issue Sep 25, 2021 · 4 comments

Comments

@LGA1150
Copy link
Contributor

LGA1150 commented Sep 25, 2021

Maintainer: @nxhack
Environment: arm

Description:
Since commit openwrt/openwrt@f48ced5, node failed to build.
See https://www.mail-archive.com/bug-binutils@gnu.org/msg38662.html

@nxhack
Copy link
Contributor

nxhack commented Sep 26, 2021

Hi @LGA1150

This can be avoided by increasing the open file descriptors.

If your "shell" is bash, run the following command and try to build.

ulimit -n 2048

ref:
nodejs/node#39452
https://sourceware.org/bugzilla/show_bug.cgi?id=28138

@svlobanov
Copy link
Contributor

@nxhack could you please add 'ulimit -n 2048' solution to Makefile? otherwise, many other will spend their time like me (create a ticket, wait for your help...)

nxhack added a commit to nxhack/openwrt that referenced this issue Jan 8, 2022
…chive fd

This fixes the following build error:
/home/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /home/sergey/openwrt2/build_dir/target-aarch64_cortex-a53_musl/node-v14.18.2/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status

It's a bad error handling related to -EMFILE (too many open files). nodejs is probably just very close to open file limit.

https://sourceware.org/bugzilla/show_bug.cgi?id=28138
nodejs/node#39452

openwrt/packages#17496
openwrt/packages#16729
openwrt/packages#17164

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
jow- pushed a commit to openwrt/openwrt that referenced this issue Jan 8, 2022
…chive fd

This fixes the following build error:
/home/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /home/sergey/openwrt2/build_dir/target-aarch64_cortex-a53_musl/node-v14.18.2/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status

It's a bad error handling related to -EMFILE (too many open files). nodejs is probably just very close to open file limit.

https://sourceware.org/bugzilla/show_bug.cgi?id=28138
nodejs/node#39452

openwrt/packages#17496
openwrt/packages#16729
openwrt/packages#17164

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
[Take full patch from 2.37 branch and refresh]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
@nxhack
Copy link
Contributor

nxhack commented Jan 8, 2022

@LGA1150 @svlobanov
A patch has been applied to binutils 2.37. Please check it.
openwrt/openwrt@8c501bf

@svlobanov
Copy link
Contributor

@nxhack it works for me, thank you

I've checked on Ubuntu 20.04.3 LTS x86_64 with default ulimit -n (1024)

coolsnowwolf pushed a commit to coolsnowwolf/lede that referenced this issue Jan 10, 2022
* toolchain/binutils: switch to version 2.36.1 by default

Runtime-tested on:
* ath79
* bcm27xx/bcm2708
* bcm27xx/bcm2709
* bcm27xx/bcm2711
* mvebu/cortexa53
* octeon
* realtek
* x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>

* toolchain/binutils: switch to version 2.37 by default

Compile tests:
* all

Runtime tests:
* ipq806x/generic
* lantiq/mt7621
* lantiq/xrx200
* x86/64

Signed-off-by: Paul Spooren <mail@aparcar.org>
Tested-by: Paul Spooren <mail@aparcar.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>

* toolchain/binutils: v2.37 Close the file descriptor if there is no archive fd

This fixes the following build error:
/home/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /home/sergey/openwrt2/build_dir/target-aarch64_cortex-a53_musl/node-v14.18.2/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status

It's a bad error handling related to -EMFILE (too many open files). nodejs is probably just very close to open file limit.

https://sourceware.org/bugzilla/show_bug.cgi?id=28138
nodejs/node#39452

openwrt/packages#17496
openwrt/packages#16729
openwrt/packages#17164

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
[Take full patch from 2.37 branch and refresh]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Paul Spooren <mail@aparcar.org>
Co-authored-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this issue Jan 10, 2022
…chive fd

This fixes the following build error:
/home/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /home/sergey/openwrt2/build_dir/target-aarch64_cortex-a53_musl/node-v14.18.2/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status

It's a bad error handling related to -EMFILE (too many open files). nodejs is probably just very close to open file limit.

https://sourceware.org/bugzilla/show_bug.cgi?id=28138
nodejs/node#39452

openwrt/packages#17496
openwrt/packages#16729
openwrt/packages#17164

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
[Take full patch from 2.37 branch and refresh]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Boos4721 pushed a commit to Boos4721/openwrt that referenced this issue Jan 15, 2022
…chive fd

This fixes the following build error:
/home/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /home/sergey/openwrt2/build_dir/target-aarch64_cortex-a53_musl/node-v14.18.2/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status

It's a bad error handling related to -EMFILE (too many open files). nodejs is probably just very close to open file limit.

https://sourceware.org/bugzilla/show_bug.cgi?id=28138
nodejs/node#39452

openwrt/packages#17496
openwrt/packages#16729
openwrt/packages#17164

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
[Take full patch from 2.37 branch and refresh]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: boos4721 <3.1415926535boos@gmail.com>
@LGA1150 LGA1150 closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants