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

Failure on install - make: printf: Argument list too long #30

Open
JasonBarnabe opened this issue Dec 17, 2021 · 8 comments
Open

Failure on install - make: printf: Argument list too long #30

JasonBarnabe opened this issue Dec 17, 2021 · 8 comments

Comments

@JasonBarnabe
Copy link

Ruby 3.0.1p64
bundler 2.2.15

I previously installed 16.10.0.0 with no issue. Trying to bundle update rails makes it want to reinstall libv8-node for whatever reason. It runs for a few minutes then spits out a failure message that ends with:

/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj.target/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' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DV8_TARGET_ARCH_X64' '-DV8_HAVE_TARGET_OS'
'-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.14"' '-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'
'-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0'
'-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include
-I/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj/gen/inspector-generated-output-root
-I../deps/v8/third_party/inspector_protocol
-I/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj/gen
-I/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj/gen/generate-bytecode-output-root
-I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/v8/third_party/zlib
-I../deps/v8/third_party/zlib/google  -pthread -Wno-unused-parameter -m64 -fPIC -Wno-return-type -fno-strict-aliasing -m64 -O3
-fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF
/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/.deps//home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/api/api-arguments.o.d.raw
-c
touch
/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/v8_compiler_for_mksnapshot.stamp
make: printf: Argument list too long
make: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:1024:
/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a]
Error 127
rm e0727ef2578d31016f6519be3cc91e6a8866de8e.intermediate 9ca6cd0d4c4bcbf36d91131f11c8e7f75c82228e.intermediate
make: Leaving directory '/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/src/node-v16.10.0/out'
/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:14:in `build_libv8!':
failed to build libv8 16.10.0 (Libv8::Node::BuilderError)
	from /home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in `install!'
	from extconf.rb:9:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/libv8-node-16.10.0.0 for inspection.
Results logged to
/home/jason/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/libv8-node-16.10.0.0/gem_make.out

An error occurred while installing libv8-node (16.10.0.0), and Bundler cannot continue.
Make sure that `gem install libv8-node -v '16.10.0.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mini_racer was resolved to 0.5.0, which depends on
    libv8-node

@nightpool
Copy link
Contributor

I'm having this issue also. A quick look through the node issue tracker turns up nodejs/node#9137, which suggests running ulimit -s 32768, which unfortunately does not seem to resolve the issue for me... not sure why. Maybe bundler is interfering?

@bretweinraub
Copy link

same issue....

@bretweinraub
Copy link

I'm making some progress here. @nightpool if you are still interested drop a line and I can try and describe my solution.

@nightpool
Copy link
Contributor

@bretweinraub please feel free to post it here. I went with precompiling my binaries instead of having them compiled as part of the bundle install process to work around this issue

@bretweinraub
Copy link

@nightpool I was very optimistic, but had to retreat and ended up doing the same.

No amount of ulimit, make, shell, or kernel magic could induce it to compile much to my amazement.

Luckily for me, I was just able to install the whole nodejs APT package and called it good. Others may not be so lucky though. Somewhere, there is someone who has a workaround because it has clearly been done, but I couldn't say what that might be. Maybe a recompiled kernel with a cranked up ARG_MAX? Just guessing.

@lloeki
Copy link
Collaborator

lloeki commented Mar 7, 2022

makes it want to reinstall libv8-node for whatever reason. It runs for a few minutes

Looks like this is fetching ruby platform gem, which tries to build from source. Is that intentional? Do you have force_platform set anywhere? Did you try running bundle lock --add-platform x64_64-linux?

@LiuJiedong-Coder
Copy link

I'm making some progress here. @nightpool if you are still interested drop a line and I can try and describe my solution.

I have the same issue,can you help me?
emial:[email protected]
thanks!

@jhgoebbert
Copy link

This patch fixes the issue for us:
nodejs/node#9137 (comment)

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

6 participants