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

pyinstaller-osx doesn't create OSX executables #96

Open
imxade opened this issue Jul 8, 2024 · 6 comments
Open

pyinstaller-osx doesn't create OSX executables #96

imxade opened this issue Jul 8, 2024 · 6 comments

Comments

@imxade
Copy link

imxade commented Jul 8, 2024

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):

  • Docker image: batonogov/pyinstaller-osx:latest
  • Docker version: 24.0.9
  • Run command: docker run --volume "$(pwd):/src/" batonogov/pyinstaller-osx:latest

.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,
)
Copy link

github-actions bot commented Jul 8, 2024

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

@imxade imxade changed the title pyinstaller-osx creates linux executable pyinstaller-osx doesn't create OSX executables Jul 8, 2024
@batonogov
Copy link
Owner

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
Copy link

choyri commented Aug 30, 2024

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

@batonogov
Copy link
Owner

@imxade
Copy link
Author

imxade commented Sep 4, 2024

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.

@batonogov
Copy link
Owner

Due to the removal of sickcodes/docker-osx images, I decided to remove the osx image build as it breaks the pipeline. :(

If you have any suggestions, please submit your merge requests.

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

3 participants