getting this error when pants is trying to rebuild...
# development
f
getting this error when pants is trying to rebuild engine (triggered via pulling and running `./pants --version):
Copy code
/data/home/tdyas/pants/build-support/bin/native/cargo: line 48: /bin/uname: Argument list too long
has anyone ever seen anything like this?
h
I personally haven’t. @aloof-angle-91616? I think in the past you’ve seen issues with the Cargo build, but iirc it was a different issue
a
ugh maybe i have. i'm a little surprised because i didn't think we called
uname
with any args? @fast-nail-55400 have you tried adding
set -x
to the top of
/data/home/tdyas/pants/build-support/bin/native/cargo
?
f
I did and it does call uname
Copy code
# We implicitly pull in `ar` to create libnative_engine_ffi.a from native_engine.o via the `cc`
# crate in engine_cffi/build.rs.
case "$(uname)" in
  "Darwin")
    # The homebrew version of the `ar` tool appears to "sometimes" create libnative_engine_ffi.a
    # instances which aren't recognized as Mach-O x86-64 binaries when first on the PATH. This
    # causes a silent linking error at build time due to the use of the `-undefined dynamic_lookup`
    # flag, which then becomes:
    # "Symbol not found: _wrapped_PyInit_native_engine"
    # when attempting to import the native engine library in native.py.
    # NB: This line uses the version of `ar` provided by OSX itself, which avoids the linking error.
    export AR='/usr/bin/ar'
    ;;
  "Linux")
    # While the linking error when consuming libnative_engine_ffi.a does not repro on Linux, since
    # we have a reliable version of `ar` available from the pantsbuild s3, we might as well use it.
    binutils="$("${download_binary}" "binutils" "2.30" "binutils.tar.gz")"
    export AR="${binutils}/bin/ar"
    ;;
  *)
    die "Unknown platform: uname was $(uname)"
    ;;
esac
a
is this osx or linux?
f
linux - ubuntu 20.04 LTS
a
thanks
f
hmm I do have some changes, let me remove them
(going back to just master)
a
best i can find in 30 seconds is this: https://www.ibm.com/mysupport/s/question/0D50z000062kmA2/wsadminsh-stop-operating-due-to-argument-list-too-long?language=en_US where it says that can happen due to too many processes, but idk if that's just on whatever box they have
f
now it’s fine
a
ok sick
f
I had added some additional logging to parts of pants
not sure why it got caught up in a uname invocation though
a
yeah that stuff is weird if this happens please don't feel like you need to waste your time too much with it and just post here. i've wasted too much time trying to figure stuff like that out
specifically the cargo bootstrap
ughhhhhhh i really should get to the rust backend!!