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

does v16 work on openwrt v21.02.1? #1046

Closed
p3x-robot opened this issue Oct 27, 2021 · 51 comments
Closed

does v16 work on openwrt v21.02.1? #1046

p3x-robot opened this issue Oct 27, 2021 · 51 comments

Comments

@p3x-robot
Copy link
Contributor

on v21.02.0 node v14 worked on the default without using branches.
now on v21.02.1 as v16 is LTS i tried today, but it was giving errors.

is it supposed to work now v21.02.1 openwrt and nodejs v16?

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 27, 2021

on my debian docker is binutils is lower than it is problematic.

@p3x-robot
Copy link
Contributor Author

binutils-common/stable,now 2.35.2-2 amd64 [installed,automatic]
binutils-x86-64-linux-gnu/stable,now 2.35.2-2 amd64 [installed,automatic]
binutils/stable,now 2.35.2-2 amd64 [installed]
libbinutils/stable,now 2.35.2-2 amd64 [installed,automatic]

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 27, 2021

i increased the make cores from 8 to 9, i hope that is the problem. i am using an amd 5950x, but it stopped working above using 8 cores, i never tried 9 cores, 10 cores was giving more problems, 8 worked, so i hope the 9 make core settings was the problem.
re-building with 8 cores using make -j parameter.

@nxhack
Copy link
Owner

nxhack commented Oct 27, 2021

@p3x-robot

It is being test built just now. Please wait a little longer.
#1044

@p3x-robot
Copy link
Contributor Author

ok thanks, so waiting for it. take care.

@p3x-robot
Copy link
Contributor Author

ok so it will not working with default, i have to enable the feed openwet-21.02.0 branch?

@p3x-robot
Copy link
Contributor Author

so does i use the feeds now?
RUN echo 'src-git node https://github.com/nxhack/openwrt-node-packages.git' >> feeds.conf
is it ok as it is?

@p3x-robot
Copy link
Contributor Author

i suppose it works like RUN echo 'src-git node https://github.com/nxhack/openwrt-node-packages.git;openwrt-21.02' >> feeds.conf

@p3x-robot
Copy link
Contributor Author

the branch openwrt-21-02 is not including the node v16 right now. :)

@nxhack
Copy link
Owner

nxhack commented Oct 28, 2021

Completed a set of tests. no problems with v21.02.1. Merged.

@p3x-robot
Copy link
Contributor Author

ok testing, with the https://github.com/nxhack/openwrt-node-packages.git;openwrt-21.02 feed. thanks.

@p3x-robot
Copy link
Contributor Author

have you experienced that /bin/sh: Argument list too long when compiling node?

@p3x-robot
Copy link
Contributor Author

i tried that master feed yesterday, building from the master, and it was the same error.

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 28, 2021

@p3x-robot
Copy link
Contributor Author

@nxhack could you tell me the difference from the master and the openwrt-21.02 branch?

do we have to update the feed branch from now or if we are building from your master and the latest stable openwrt, will it work?

@p3x-robot
Copy link
Contributor Author

cannot build it:
nodejs/node#9137

how do you build? not docker right?

@p3x-robot
Copy link
Contributor Author

@nxhack is it possible to include this snippet in the build? nodejs/node#9137 (comment)

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 28, 2021

ok, trying with docker run --storage-opt size=200G --ulimit stack=-1:-1 --ulimit core=-1:-1 unlimited ulimit

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 28, 2021

i see that patch is included in the build, so why is it giving this similar error?

@p3x-robot
Copy link
Contributor Author

@nxhack i think this argument too long error is missing in this path tools/gyp/pylib/gyp/generator/make.py, the patch is another place, here: deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 28, 2021

override:
010-execvp-arg-list-too-long.patch

--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -155,6 +155,31 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 quiet_cmd_link = LINK($(TOOLSET)) $@
 cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
 
+# Note: this does not handle spaces in paths
+define xargs
+	$(1) $(word 1,$(2))
+$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+	@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # We support two kinds of shared objects (.so):
 # 1) shared_library, which is just bundling together many dependent libraries
 # into a link line.
@@ -199,6 +224,31 @@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
 quiet_cmd_alink_thin = AR($(TOOLSET)) $@
 cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 
+# Note: this does not handle spaces in paths
+define xargs
+	$(1) $(word 1,$(2))
+$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+	@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # Due to circular dependencies between libraries :(, we wrap the
 # special "figure out circular dependencies" flags around the entire
 # input list during linking.
@@ -1766,14 +1816,28 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
                 self.flavor not in ("mac", "openbsd", "netbsd", "win")
                 and not self.is_standalone_static_library
             ):
-                self.WriteDoCmd(
+                if self.flavor in ('linux', 'android'):
+                  self.WriteMakeRule(
                     [self.output_binary],
                     link_deps,
-                    "alink_thin",
-                    part_of_all,
-                    postbuilds=postbuilds,
-                )
+                    actions = ['$(call create_thin_archive,$@,$^)']
+                  )
+                else:
+                  self.WriteDoCmd(
+                      [self.output_binary],
+                      link_deps,
+                      "alink_thin",
+                      part_of_all,
+                      postbuilds=postbuilds,
+                  )
             else:
+              if self.flavor in ('linux', 'android'):
+                self.WriteMakeRule(
+                    [self.output_binary],
+                    link_deps,
+                    actions = ['$(call create_archive,$@,$^)']
+                )
+              else:
                 self.WriteDoCmd(
                     [self.output_binary],
                     link_deps,

building non stop. let you know if it works.

@p3x-robot
Copy link
Contributor Author

it is a different patch, than it is in the deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py

@p3x-robot
Copy link
Contributor Author

i override, both files make.py:

  • tools/gyp/pylib/gyp/generator/make.py
  • deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
    with the above patch.
    testing if it works now.

@p3x-robot
Copy link
Contributor Author

ok, the fix is working now.
nodejs is ok, building all @nxhack packages.

@p3x-robot
Copy link
Contributor Author

@nxhack
Copy link
Owner

nxhack commented Oct 28, 2021

@p3x-robot

openwrt/packages#15986 (comment)

I myself would like to remove this patch for this reason, but I am keeping it for convenience[To reduce the cost of support].
(I don't intend to adopt it for openwrt/packages/lang/node at all.)

@p3x-robot
Copy link
Contributor Author

what do you mean? shoud i rename the filename? just let me know. sure.

@p3x-robot
Copy link
Contributor Author

for now, the latest argument to long patch is working even in docker.

@p3x-robot
Copy link
Contributor Author

@nxhack #1048

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

@p3x-robot #1048 (comment)

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

what do you mean? shoud i rename the filename? just let me know. sure.

Shortening the path would solve this problem.

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 29, 2021

other people are getting this argument error and using this patch:
nodejs/node#9137 (comment)

@p3x-robot p3x-robot reopened this Oct 29, 2021
@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 29, 2021

what do you mean? shoud i rename the filename? just let me know. sure.

Shortening the path would solve this problem.

that root path is /build/source/. it is not very long i think.

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

Is the node-related feed you are using from this repository? Check it again calmly.

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 29, 2021

the error is on the node build. as i said before above /bin/sh argument too long error...
if i use your feed on p3x-robot patched. it works. now i build from you original nxhack feed using ulimit -n 65535. you said that would fix it.

@p3x-robot
Copy link
Contributor Author

right right, 2 issues, now i see clearly :)

@p3x-robot
Copy link
Contributor Author

RECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D__STDC_FORMAT_MACROS' '-DNODE_ARCH="arm"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DHAVE_OPENSSL=1' '-DOPENSSL_API_COMPAT=0x10000000L' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../src -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/include -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/src -I../deps/googletest/include -I../deps/histogram/src -I../deps/uvwasi/include -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/llhttp/include -I../deps/cares/include -I../deps/cares/src/lib -I../deps/brotli/c/include  -Wall -Wextra -Wno-unused-parameter -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/.deps//build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/libnode/gen/src/node/inspector/protocol/NodeTracing.o.d.raw  -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0=node-v16.13.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/usr/include -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/include/fortify -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/include  -c
  arm-openwrt-linux-muslgnueabi-g++ -Os -pipe -o /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/libnode/gen/src/node/inspector/protocol/NodeRuntime.o /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/src/node/inspector/protocol/NodeRuntime.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D__STDC_FORMAT_MACROS' '-DNODE_ARCH="arm"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DHAVE_OPENSSL=1' '-DOPENSSL_API_COMPAT=0x10000000L' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../src -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/include -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/src -I../deps/googletest/include -I../deps/histogram/src -I../deps/uvwasi/include -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/llhttp/include -I../deps/cares/include -I../deps/cares/src/lib -I../deps/brotli/c/include  -Wall -Wextra -Wno-unused-parameter -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/.deps//build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/libnode/gen/src/node/inspector/protocol/NodeRuntime.o.d.raw  -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0=node-v16.13.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/usr/include -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/include/fortify -I/build/source/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-8.4.0_musl_eabi/include  -c
  g++ -m32 -o /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api-arguments.o ../deps/v8/src/api/api-arguments.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DCAN_USE_VFP3_INSTRUCTIONS' '-DCAN_USE_VFP32DREGS' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.13"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUSE_EABI_HARDFLOAT=1' -I../deps/v8 -I../deps/v8/include -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/inspector-generated-output-root -I../deps/v8/third_party/inspector_protocol -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen -I/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj/gen/generate-bytecode-output-root -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil -I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google -I/build/source/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include  -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -m32 -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/.deps//build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api-arguments.o.d.raw   -c
rm -f /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a ar-file-list; mkdir -p `dirname /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a`
make[5]: /bin/sh: Argument list too long
make[5]: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:1038: /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a] Error 127
make[5]: *** Waiting for unfinished jobs....
rm 86c73dbebb852e276145122b9284652ac900ca64.intermediate 5b537c8662424e8220a17ebbf61891b40e600295.intermediate 73754207999de0ac4847aa448dfbae0f23f938bd.intermediate ba42664bbc39650f74dc6a1feca2e670dd4e8079.intermediate 17f013dc1c3cfe05058fdb3215401cf5df3afffa.intermediate
make[4]: *** [Makefile:110: node] Error 2
make[4]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0'
make[3]: *** [Makefile:196: /build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/.built] Error 2
time: package/feeds/node/node/compile#5988.77#313.36#1875.39

ok i keep this patch as that works, the ulimit -n is not working...

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

@p3x-robot

To clarify again, this error is not about binutils.

We will now focus on the "Argument list too long" issue.

I'm talking about the Docker build environment.
First of all, I would like to check if you have the corresponding file in this repository?

Please check.

ls -l /build/source/feeds/node/node/patches/v16.x/010-execvp-arg-list-too-long.patch

@p3x-robot
Copy link
Contributor Author

well, my work is done here.
i tested both builds. using your from branch or master. not working.
and the pull i sent you is working even in docker and it is used by other people i just copied to code and patch you build problem. and it works https://cdn.corifeus.com/openwrt/21.02.1/packages/arm_cortex-a9_vfpv3-d16/node/ node v16... linksys wrt.

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

that root path is /build/source/. it is not very long i think.

Please change your view of this as well.

A long path means, for example, this.

/build/source/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/node-v16.13.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/

@p3x-robot
Copy link
Contributor Author

okok

@p3x-robot
Copy link
Contributor Author

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

I would like to clarify the difference between my current patch and this one. It will take a while.

@p3x-robot
Copy link
Contributor Author

okok

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

The difference is this.

 define xargs
-$(1) $(wordlist 1,1000,$(2))
-$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+$(1) $(word 1,$(2))
+$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
 endef

This meaning indicates the difference in the unit of making the list of files to build.
In the existing, 1000 files are passed to xargs. In the modified version, they are passed to xargs one by one. (There is no reason to use xargs).

From this, it can be assumed that the Docker container environment probably has fewer values indicated by ARG_MAX. (I am investigating).

I'm testing this with some modifications based on the meta-nodejs implementation, etc.
https://github.com/riedonetworks/meta-nodejs/blob/dora/recipes/nodejs/files/0001-fix-execvp-printf-argument-list-too-long.patch

@p3x-robot
Copy link
Contributor Author

p3x-robot commented Oct 29, 2021

not true, the ulimits are unlimited already. it is i think some kind of page variable in the kernel somewhere i saw...
but at least now it works.

patrikx3@demona:~/Projects/patrikx3/openwrt-insomnia$ ./run
[sudo] password for patrikx3:           
Unable to find image 'patrikx3/openwrt-insomnia:latest' locally
latest: Pulling from patrikx3/openwrt-insomnia
bb7d5a84853b: Pulling fs layer 
f259d115b326: Pulling fs layer 
c35130a3d396: Pull complete 
bb10bf1e114d: Pull complete 
b14940c71cdd: Pull complete 
f14ca82012d3: Pull complete 
097042bd4dd2: Pull complete 
b13824e7c72b: Pull complete 
693b6664cff4: Pull complete 
d4ecd4c46cef: Pull complete 
5eca87b6d3e3: Pull complete 
c6ef2d1cc52c: Pull complete 
1a878a0c2c33: Pull complete 
d1d0d017eda8: Pull complete 
40faa14a0c7b: Pull complete 
d1a89dd2aace: Pull complete 
7009d3173835: Pull complete 
10d19c956a9a: Pull complete 
32572c3c7bb0: Pull complete 
aa59043a5e2c: Pull complete 
43b047bb56f2: Pull complete 
0f1bb852bc0f: Pull complete 
6f7f9472c7e5: Pull complete 
abfa15df5c90: Pull complete 
b7c0b9cf8fc5: Pull complete 
73d4e33c795c: Pull complete 
c8ea0201eae0: Pull complete 
0c2354eac6b6: Pull complete 
417e9dd06c80: Pull complete 
cec84494fb6e: Pull complete 
Digest: sha256:9b767f5b6333af5b7e4a05e18205a4890e87bc431e369431f7e8e84a48730f16
Status: Downloaded newer image for patrikx3/openwrt-insomnia:latest
docker@7c52a6f678a3:/build/source$ getc
getcap   getconf  
docker@7c52a6f678a3:/build/source$ getc
getcap   getconf  
docker@7c52a6f678a3:/build/source$ getconf ARG_MAX
4611686018427387903
docker@7c52a6f678a3:/build/source$ ulimit 
unlimited
docker@7c52a6f678a3:/build/source$ 

@nxhack
Copy link
Owner

nxhack commented Oct 29, 2021

What a surprise.

docker@7c52a6f678a3:/build/source$ getconf ARG_MAX
4611686018427387903

@p3x-robot
Copy link
Contributor Author

you think i did not try everything else without patch? wow

@p3x-robot
Copy link
Contributor Author

i built from the master on openwrt 20.02.1 successfully without any additional patches. thanks for the work!

@bretweinraub
Copy link

@p3x-robot
Copy link
Contributor Author

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