batonogov / docker-pyinstaller

PyInstaller for Linux, Windows and OSX (Experimental) inside Docker
MIT License
91 stars 8 forks source link

pyinstaller-osx doesn't create OSX executables #96

Open imxade opened 2 months ago

imxade commented 2 months ago

Describe the bug batonogov/pyinstaller-osx:latest doesn't create OSX executable. Following warning is shown:

7763 WARNING: Ignoring icon; supported only on Windows and macOS!

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/imxade/pictopygsoc
  2. Go inside pictopygsoc
  3. Run: docker run --volume "$(pwd):/src/" batonogov/pyinstaller-osx:latest

Expected behavior

Creates OSX executable

Log


182 INFO: PyInstaller: 6.9.0, contrib hooks: 2024.7
182 INFO: Python: 3.12.3
185 INFO: Platform: Linux-6.1.85+-x86_64-with-glibc2.39
185 INFO: Python environment: /root/.local/share/pipx/venvs/pyinstaller
187 INFO: Removing temporary files and cleaning cache in /root/.cache/pyinstaller
188 INFO: Module search paths (PYTHONPATH):
['/usr/lib/python312.zip',
 '/usr/lib/python3.12',
 '/usr/lib/python3.12/lib-dynload',
 '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages',
 '/root/.local/share/pipx/shared/lib/python3.12/site-packages',
 '/src']
350 INFO: Appending 'datas' from .spec
351 INFO: checking Analysis
351 INFO: Building Analysis because Analysis-00.toc is non existent
351 INFO: Running Analysis Analysis-00.toc
351 INFO: Target bytecode optimization level: 1
351 INFO: Initializing module dependency graph...
354 INFO: Caching module graph hooks...
365 INFO: Analyzing base_library.zip ...
1143 INFO: Loading module hook 'hook-encodings.py' from '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/hooks'...
3973 INFO: Loading module hook 'hook-pickle.py' from '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/hooks'...
5232 INFO: Loading module hook 'hook-heapq.py' from '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/hooks'...
6033 INFO: Caching module dependency graph...
6139 INFO: Looking for Python shared library...
6147 INFO: Using Python shared library: /usr/lib/libpython3.12.so.1.0
6148 INFO: Analyzing /src/build.py
6157 INFO: Loading module hook 'hook-sqlite3.py' from '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/hooks'...
6440 INFO: Processing module hooks...
6474 INFO: Performing binary vs. data reclassification (7 entries)
6507 INFO: Looking for ctypes DLLs
6519 INFO: Analyzing run-time hooks ...
6522 INFO: Including run-time hook '/root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py'
6529 INFO: Looking for dynamic libraries
6926 INFO: Warnings written to /tmp/build/warn-build.txt
6940 INFO: Graph cross-reference written to /tmp/build/xref-build.html
6953 INFO: checking PYZ
6953 INFO: Building PYZ because PYZ-00.toc is non existent
6954 INFO: Building PYZ (ZlibArchive) /tmp/build/PYZ-00.pyz
7761 INFO: Building PYZ (ZlibArchive) /tmp/build/PYZ-00.pyz completed successfully.
7763 WARNING: Ignoring icon; supported only on Windows and macOS!
7772 INFO: checking PKG
7773 INFO: Building PKG because PKG-00.toc is non existent
7773 INFO: Building PKG (CArchive) PictoPy.pkg
12696 INFO: Building PKG (CArchive) PictoPy.pkg completed successfully.
12698 INFO: Bootloader /root/.local/share/pipx/venvs/pyinstaller/lib/python3.12/site-packages/PyInstaller/bootloader/Linux-64bit-intel/run
12698 INFO: checking EXE
12698 INFO: Building EXE because EXE-00.toc is non existent
12698 INFO: Building EXE from EXE-00.toc
12698 INFO: Copying bootloader EXE to /src/dist/PictoPy
12699 INFO: Appending PKG archive to custom ELF section in EXE
13075 INFO: Building EXE from EXE-00.toc completed successfully

Docker information (please provide the following information):

.spec file

# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
    ['build.py'],
    pathex=[],
    binaries=[],
    datas=[('static/', 'static/'),('models/', 'models/'),],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    noarchive=False,
    optimize=1,
)
pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.datas,
    [],
    name='PictoPy',
    icon='static/asset/favicon.ico',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)
github-actions[bot] commented 2 months ago

🎉 Thank you for your first issue! We will look into it soon.

batonogov commented 2 months ago

Hi Thanks for the issue. I managed to reproduce the problem myself. I'll try to figure it out.

zsh: exec format error: ./main
choyri commented 2 weeks ago

Same problem, I think it is actually a linux program compiled under archlinux 🥲

batonogov commented 1 week ago

https://www.bleepingcomputer.com/news/security/docker-osx-image-used-for-security-research-hit-by-apple-dmca-takedown/amp/

:(

imxade commented 1 week ago

https://www.bleepingcomputer.com/news/security/docker-osx-image-used-for-security-research-hit-by-apple-dmca-takedown/amp/

Apple being themselves, Github-actions seems to be the only way for now.