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

Linux platform builds on Windows host machine with Docker runs into errors #1128

Closed
Helveg opened this issue Jun 6, 2022 · 2 comments
Closed

Comments

@Helveg
Copy link
Contributor

Helveg commented Jun 6, 2022

Description

I'm following the cibuildwheel "Run cibuildwheel locally" instructions for a Windows machine. I have Docker running Linux containers. But the command found in the documentation:

cibuildwheel --platform linux

runs into a cross-compilation error (full error log below):

cibuildwheel: Invalid archs option {<Architecture.AMD64: 'AMD64'>}. Linux only supports [<Architecture.aarch64: 'aarch64'>, <Architecture.i686: 'i686'>, <Architecture.ppc64le: 'ppc64le'>, <Architecture.s390x: 's390x'>, <Architecture.x86_64: 'x86_64'>] at the moment.

So we fix that by adding the --archs x86_64 flag. This may be documented as a caveat with a warning/note admonition. Continuing with that, we run into an absolute path error (full error log below):

Error response from daemon: the working directory '\project' is invalid, it needs to be an absolute path

Is there a workaround/fix?

Full error logs:

PS D:\GIT\nest-simulator> cibuildwheel --platform linux

     _ _       _ _   _       _           _
 ___|_| |_ _ _|_| |_| |_ _ _| |_ ___ ___| |
|  _| | . | | | | | . | | | |   | -_| -_| |
|___|_|___|___|_|_|___|_____|_|_|___|___|_|

cibuildwheel version 2.6.0

Build options:
  platform: 'linux'
  architectures: {<Architecture.AMD64: 'AMD64'>}
  build_selector: BuildSelector(skip_config='*-musllinux_* *cp36* *cp37*', build_config='*', requires_python=<SpecifierSet('<4,>=3.8')>, prerelease_pythons=False)
  output_dir: WindowsPath('wheelhouse')
  package_dir: WindowsPath('D:/GIT/nest-simulator')
  test_selector: TestSelector(skip_config='', build_config='*', requires_python=None, prerelease_pythons=False)
  before_all: ''
  before_build: 'source extras/wheelbuild/prepare_container.sh'
  before_test: ''
  build_frontend: 'pip'
  build_verbosity: 0
  dependency_constraints: DependencyConstraints(WindowsPath('C:/Users/Robin/AppData/Roaming/Python/Python39/site-packages/cibuildwheel/resources/constraints.txt'))
  environment: ParsedEnvironment(['NEST_CMAKE_BUILDWHEEL="ON"'])
  manylinux_images: {'x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea', 'i686': 'quay.io/pypa/manylinux2014_i686:2022-05-22-fbe07ea', 'pypy_x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea', 'aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-05-22-fbe07ea', 'ppc64le': 'quay.io/pypa/manylinux2014_ppc64le:2022-05-22-fbe07ea', 's390x': 'quay.io/pypa/manylinux2014_s390x:2022-05-22-fbe07ea', 'pypy_aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-05-22-fbe07ea', 'pypy_i686': 'quay.io/pypa/manylinux2014_i686:2022-05-22-fbe07ea'}
  musllinux_images: {'x86_64': 'quay.io/pypa/musllinux_1_1_x86_64:2022-05-22-fbe07ea', 'i686': 'quay.io/pypa/musllinux_1_1_i686:2022-05-22-fbe07ea', 'aarch64': 'quay.io/pypa/musllinux_1_1_aarch64:2022-05-22-fbe07ea', 'ppc64le': 'quay.io/pypa/musllinux_1_1_ppc64le:2022-05-22-fbe07ea', 's390x': 'quay.io/pypa/musllinux_1_1_s390x:2022-05-22-fbe07ea'}
  repair_command: 'auditwheel repair -w {dest_dir} {wheel}'
  test_command: ''
  test_extras: ''
  test_requires: []
Cache folder: C:\Users\Robin\AppData\Local\pypa\cibuildwheel\Cache

Here we go!

cibuildwheel: Invalid archs option {<Architecture.AMD64: 'AMD64'>}. Linux only supports [<Architecture.aarch64: 'aarch64'>, <Architecture.i686: 'i686'>, <Architecture.ppc64le: 'ppc64le'>, <Architecture.s390x: 's390x'>, <Architecture.x86_64: 'x86_64'>] at the moment.
PS D:\GIT\nest-simulator> cibuildwheel --platform linux --archs "x86_64"

     _ _       _ _   _       _           _
 ___|_| |_ _ _|_| |_| |_ _ _| |_ ___ ___| |
|  _| | . | | | | | . | | | |   | -_| -_| |
|___|_|___|___|_|_|___|_____|_|_|___|___|_|

cibuildwheel version 2.6.0

Build options:
  platform: 'linux'
  architectures: {<Architecture.x86_64: 'x86_64'>}
  build_selector: BuildSelector(skip_config='*-musllinux_* *cp36* *cp37*', build_config='*', requires_python=<SpecifierSet('<4,>=3.8')>, prerelease_pythons=False)
  output_dir: WindowsPath('wheelhouse')
  package_dir: WindowsPath('D:/GIT/nest-simulator')
  test_selector: TestSelector(skip_config='', build_config='*', requires_python=None, prerelease_pythons=False)
  before_all: ''
  before_build: 'source extras/wheelbuild/prepare_container.sh'
  before_test: ''
  build_frontend: 'pip'
  build_verbosity: 0
  dependency_constraints: DependencyConstraints(WindowsPath('C:/Users/Robin/AppData/Roaming/Python/Python39/site-packages/cibuildwheel/resources/constraints.txt'))
  environment: ParsedEnvironment(['NEST_CMAKE_BUILDWHEEL="ON"'])
  manylinux_images: {'x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea', 'i686': 'quay.io/pypa/manylinux2014_i686:2022-05-22-fbe07ea', 'pypy_x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea', 'aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-05-22-fbe07ea', 'ppc64le': 'quay.io/pypa/manylinux2014_ppc64le:2022-05-22-fbe07ea', 's390x': 'quay.io/pypa/manylinux2014_s390x:2022-05-22-fbe07ea', 'pypy_aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-05-22-fbe07ea', 'pypy_i686': 'quay.io/pypa/manylinux2014_i686:2022-05-22-fbe07ea'}
  musllinux_images: {'x86_64': 'quay.io/pypa/musllinux_1_1_x86_64:2022-05-22-fbe07ea', 'i686': 'quay.io/pypa/musllinux_1_1_i686:2022-05-22-fbe07ea', 'aarch64': 'quay.io/pypa/musllinux_1_1_aarch64:2022-05-22-fbe07ea', 'ppc64le': 'quay.io/pypa/musllinux_1_1_ppc64le:2022-05-22-fbe07ea', 's390x': 'quay.io/pypa/musllinux_1_1_s390x:2022-05-22-fbe07ea'}
  repair_command: 'auditwheel repair -w {dest_dir} {wheel}'
  test_command: ''
  test_extras: ''
  test_requires: []
Cache folder: C:\Users\Robin\AppData\Local\pypa\cibuildwheel\Cache

Here we go!

Starting Docker image quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea for cp38-manylinux_x86_64, cp39-manylinux_x86_64, cp310-manylinux_x86_64, pp38-manylinux_x86_64, pp39-manylinux_x86_64...

Error response from daemon: the working directory '\project' is invalid, it needs to be an absolute path

                                                                       ✕ 1.40s
Error: Command ['docker', 'create', '--env=CIBUILDWHEEL', '--name=cibuildwheel-af460ccb-b849-464b-95a5-008b8bb944c1', '--interactive', '--volume=/:/host', '-w', '\\project', 'quay.io/pypa/manylinux2014_x86_64:2022-05-22-fbe07ea', '/bin/bash'] failed with code 1. None

Build log

No response

CI config

No response

@joerick
Copy link
Contributor

joerick commented Jun 7, 2022

Hi @Helveg , thanks for the report. Would you mind to look at #1117? It might fix your issue and your testing there would be welcome.

@joerick
Copy link
Contributor

joerick commented Jun 17, 2022

Fixed in #1117

@joerick joerick closed this as completed Jun 17, 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

2 participants