cdrx / docker-pyinstaller

PyInstaller for Linux and Windows inside Docker
MIT License
616 stars 238 forks source link

/usr/bin/wine: cannot execute binary file: Exec format error #105

Closed davidhuser closed 3 years ago

davidhuser commented 3 years ago

First, thanks for the nice tool. I could build Windows Python apps without any Windows computer. NowI face the issue of a strange error when I ported the exact same code to another workspace (in Bitbucket).

In the old workspace the build pipeline looks like this:

image: cdrx/pyinstaller-windows:python3

pipelines:
  branches:
    master:
        - step:
            name: Test, build and deploy
            caches:
              - pip
            script:
              - which python && python --version
              - python -m pip install pip --upgrade
              - cp requirements.txt src/
              - python -m pip install -r requirements.txt
              - python -m pytest tests
              - pyinstaller --windowed --onefile src/main.py --name MyTool.exe --exclude-module=pytest --add-data "src/version.json;."
              - # .exe deployment steps...

This works!

Then I ported the same build tool (bitbucket pipeline) to another (bitbucket) workspace I get now at step python -m pip install pip --upgrade :

/usr/bin/python: line 1: /usr/bin/wine: cannot execute binary file: Exec format error

while the one in the old workspace is still working fine. Do you have any ideas what the cause could be?

davidhuser commented 3 years ago

the error message indicates that it is somehow running on a different kernel than it expects (64bit or 32bit). Is this an issue of the underlying docker image or wine?

davidhuser commented 3 years ago

after reaching out to Bitbucket support, the reason were the underlying containers of Bitbucket - see here https://github.com/kata-containers/packaging/issues/513