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

Python failure during build - setuptools pip wheel failed with error code 1 #216

Open
twilco opened this issue Dec 8, 2019 · 0 comments

Comments

@twilco
Copy link

twilco commented Dec 8, 2019

When trying to ./mach check a fresh clone of Servo, I encountered the below failure:

error: failed to run custom build command for `mozjs_sys v0.67.1 (https://github.com/servo/mozjs?rev=59065889ec7726b767d70b8702b43b4e4776cbfe#59065889)`

Caused by:
  process didn't exit successfully: `/home/twilco/projects/servo/target/debug/build/mozjs_sys-2afaddc10560323e/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=MAKE
cargo:rerun-if-env-changed=MOZTOOLS_PATH
[[ /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure -ot /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure.in ]] && touch /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure || true
[[ /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure -ot /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure.in ]] && touch /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure || true
! [[ /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure.in -ot /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure ]] && touch /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure || true
! [[ /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure.in -ot /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure ]] && touch /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/old-configure || true
if [[ /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure -nt /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/config.status ]] ; then \
  cd /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out && \
  PYTHON="python2" MOZ_TOOLS="" \
  CC="gcc" CFLAGS="" \
  CPP="gcc -E" CPPFLAGS="" \
  CXX="g++" CXXFLAGS="" \
  AS="" AR="ar" \
  STLPORT_LIBS="" \
  RUST_TARGET="x86_64-unknown-linux-gnu" RUST_HOST="x86_64-unknown-linux-gnu" \
  RUST_SYSROOT="" \
  /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/configure --disable-jemalloc --disable-js-shell --disable-tests --disable-shared-js --build-backends=RecursiveMake --enable-posix-nspr-emulation --disable-shared-js || (cat config.log && exit 1) ; \
fi
Creating Python environment
Using real prefix '/usr'
New python executable in /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python2
Not overwriting existing python script /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python (you must use /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python2)
Installing setuptools, pip, wheel...
  Complete output from command /home/twilco/project...nvs/init/bin/python2 - setuptools pip wheel:
  Collecting setuptools
  Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 2349, in <module>
    main()
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 953, in create_environment
    download=download,
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 904, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 796, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/twilco/project...nvs/init/bin/python2 - setuptools pip wheel failed with error code 1
INFO: Creating Python environment
INFO: Using real prefix '/usr'
INFO: New python executable in /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python2
INFO: Not overwriting existing python script /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python (you must use /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init/bin/python2)
INFO: Installing setuptools, pip, wheel...
INFO:   Complete output from command /home/twilco/project...nvs/init/bin/python2 - setuptools pip wheel:
INFO:   Collecting setuptools
INFO:   Could not find a version that satisfies the requirement setuptools (from versions: )
INFO: No matching distribution found for setuptools
INFO: ----------------------------------------
INFO: ...Installing setuptools, pip, wheel...done.
INFO: Traceback (most recent call last):
INFO:   File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 2349, in <module>
INFO:     main()
INFO:   File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 712, in main
INFO:     symlink=options.symlink)
INFO:   File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 953, in create_environment
INFO:     download=download,
INFO:   File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 904, in install_wheel
INFO:     call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
INFO:   File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/third_party/python/virtualenv/virtualenv.py", line 796, in call_subprocess
INFO:     % (cmd_desc, proc.returncode))
INFO: OSError: Command /home/twilco/project...nvs/init/bin/python2 - setuptools pip wheel failed with error code 1

--- stderr
Traceback (most recent call last):
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/../../configure.py", line 132, in <module>
    sys.exit(main(sys.argv))
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/js/src/../../configure.py", line 38, in main
    sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 431, in run
    self.include_file(path)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file
    exec_(code, self)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/util.py", line 59, in exec_
    exec(object, globals, locals)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/moz.configure", line 7, in <module>
    include('build/moz.configure/init.configure')
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 745, in include_impl
    self.include_file(what)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 422, in include_file
    exec_(code, self)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/util.py", line 59, in exec_
    exec(object, globals, locals)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/build/moz.configure/init.configure", line 212, in <module>
    @imports('distutils.sysconfig')
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 728, in decorator
    depends = DependsFunction(self, func, dependencies, when=when)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 125, in __init__
    sandbox._value_for(self)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 525, in _value_for
    return self._value_for_depends(obj)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/util.py", line 947, in method_call
    cache[args] = self.func(instance, *args)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 534, in _value_for_depends
    value = obj.result()
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/util.py", line 947, in method_call
    cache[args] = self.func(instance, *args)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 151, in result
    return self._func(*resolved_args)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 1097, in wrapped
    return new_func(*args, **kwargs)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/build/moz.configure/init.configure", line 261, in virtualenv_python
    manager.build(python)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 473, in build
    self.create(python)
  File "/home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 212, in create
    'Failed to create virtualenv: %s' % self.virtualenv_root)
Exception: Failed to create virtualenv: /home/twilco/projects/servo/target/debug/build/mozjs_sys-a2af02b693aea2e3/out/_virtualenvs/init
make: *** [makefile.cargo:197: maybe-configure] Error 1
thread 'main' panicked at 'assertion failed: result.success()', /home/twilco/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/5906588/build.rs:133:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

The actual error that seems to be causing this is: INFO: OSError: Command /home/twilco/project...nvs/init/bin/python2 - setuptools pip wheel failed with error code 1. I tried some of the things in this thread, such as downgrading my Python 2 version to 2.7.9 and downgrading to virtualenv 15.1.0 via conda, but had no luck.

Anyone know how to resolve this? I'm running Manjaro Linux.

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

1 participant