Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Executable for mac should be built separately #2

Open
orsenthil opened this issue Jan 18, 2016 · 11 comments
Open

Executable for mac should be built separately #2

orsenthil opened this issue Jan 18, 2016 · 11 comments
Labels

Comments

@orsenthil
Copy link

$ ./spaceShooter
bash: ./spaceShooter: cannot execute binary file

My system is

$ uname -a
Darwin K2047 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.10.5 (14F27)
      Kernel Version: Darwin 14.5.0
      Boot Volume: fibonacci
      Boot Mode: Normal
      Computer Name: fibonacci
      User Name: Senthil Kumaran (senthilkumaran)
      Secure Virtual Memory: Enabled
      Time since boot: 7:18
@mgrady3
Copy link

mgrady3 commented Jan 20, 2016

I also ran into this problem (on OS X)

In general, I have found that, when using pyinstaller, you must always build on the target OS. If you build on Ubuntu, chances are it will not run on OS X. Likewise if you build on OS X, chances are it will not run on Ubuntu/Debian.

If you have an OS X machine, it is relatively easy to spin up a number of small virtual machines for building on different linux environments. The other way around is not as simple.

Will check that building form source on OS X works later on.

@tasdikrahman
Copy link
Owner

Hey @mgrady3

Looks like I will have to find an OS X machine fast 😄
But then building from source should work on your case.

@mgrady3
Copy link

mgrady3 commented Jan 20, 2016

There was once a time some year ago when pyinstaller was much younger that they supported targeted builds where you could build on, say, Ubuntu, but target Windows or target OS X.

However, if I recall, the feature was eventually dropped because it was very unstable - possibly there were concerns about needing to distribute system specific binaries/DLL's along with pyinstaller to make it work? Or maybe it was left to the developer to provide a path to the necessary DLL's to be packaged alongside the executable? Either way it did not last long nor did it work well.

@orsenthil
Copy link
Author

@prodicus , I will build it on my machine and provide you a binary for Mac OS X. ( I get a chance to try pyInstaller for this).

@tasdikrahman
Copy link
Owner

@mgrady3 Well it sure would have been an icebreaker if they still had that feature.

And that would be really kind of you @orsenthil . Looking forward to it 👍

@orsenthil
Copy link
Author

Friendly update. Still don't have a standalone app for mac. Ran into bugs that require more time to troubleshoot.

$ /Users/senthilkumaran/spaceShooter/dist/spaceShooter/spaceShooter ; exit;
ERROR: pygame.macosx.Video_AutoInit() call FAILED
ERROR: pygame.macosx.Video_AutoInit() call FAILED
Jan 28 11:07:36 K2047 spaceShooter[73227] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Jan 28 11:07:36 K2047 spaceShooter[73227] <Warning>: Invalid Connection ID 0
Traceback (most recent call last):
  File "<string>", line 54, in <module>
  File "pygame/sysfont.py", line 629, in match_font
  File "pygame/sysfont.py", line 522, in initsysfonts
  File "pygame/sysfont.py", line 418, in initsysfonts_darwin
  File "genericpath.py", line 26, in exists
  File "pygame/macosx.py", line 22, in Video_AutoInit
  File "pygame/pkgdata.py", line 50, in getResource
  File "pkg_resources.py", line 873, in resource_exists
  File "pkg_resources.py", line 1308, in has_resource
  File "pkg_resources.py", line 1361, in _has
NotImplementedError: Can't perform this operation for unregistered loader type
spaceShooter returned -1
logout

@tasdikrahman
Copy link
Owner

@orsenthil No problem at all!

I am happy that you are trying 😃

@orsenthil
Copy link
Author

Here are the binaries for mac. I would like someone to test it.

https://www.dropbox.com/sh/hfjhmagsnmtpjyt/AABjtm3PSBZy7xMOFf2GNLKpa?dl=0

  1. Test files in PyInstaller. It has console as well as mac-app both supported on Mac.
  2. If 1. does not work, try the file in py2app folder.

If none of the above work out of box. try the app in memorypuzzle and see if it works.

I discovered that PyInstaller + Pygame + mac is pretty fragile at the moment.

@tasdikrahman
Copy link
Owner

@orsenthil Thank you for your time. Just one question.

You have build the executable keeping in mind the latest release right? Please do that if not. And Great work by the way.

I will try from my side if I can test it on somewhere 👍

Any OS X system with you @mgrady3 ?

@orsenthil
Copy link
Author

Yup. I built it off latest master.

$ git log -n 1
commit 5aecb59382582cef8c36850f1e20cd736aaac1cd
Author: Tasdik Rahman <tasdik95@gmail.com>
Date:   Fri Jan 29 11:38:06 2016 +0530

    updated README for fixing issue #1

@tasdikrahman
Copy link
Owner

👍

@tasdikrahman tasdikrahman added question and removed bug labels Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants