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

latest MacOS breaks py2app packaging #3777

Closed
totaam opened this issue Mar 1, 2023 · 1 comment
Closed

latest MacOS breaks py2app packaging #3777

totaam opened this issue Mar 1, 2023 · 1 comment
Labels
bug Something isn't working macos packaging

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 1, 2023

I can't wait to hear the excuse wrapped in marketing speak that they will have to come up with for explaining doing dumb stuff like this:

$ from ctypes import cdll
$ lib=cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation')
$ print(lib)
<CDLL '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation', handle fff115f189f8 at 0x1053eec80>
% ls /System/Library/Frameworks/CoreFoundation.framework/
Resources
Versions
% ls /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
ls: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation: No such file or directory

As per MacOS Big Sur - Python ctypes find_library does not find libraries (ssl, CoreFoundation, etc: This behaviour stopped working in macOS Big Sur due to dylibs being removed from disk when they are included in the dyld shared cache

More hand waving in this thread: Missing librairies in /usr/lib on Big Sur?

So the files exist, but stat or ls can't see them!
Wow.

This causes the py2app packaging scripts to fail when they try to create_binaries: MachOGraphy.py doesn't find the file in run_file and bails out..

@totaam totaam added bug Something isn't working packaging macos labels Mar 1, 2023
totaam added a commit to Xpra-org/gtk-osx-build that referenced this issue Mar 1, 2023
but they actually exist... and cdll finds them.
See:
Xpra-org/xpra#3777
@totaam
Copy link
Collaborator Author

totaam commented Mar 1, 2023

I thought that these commits would have fixed things:
ronaldoussoren/macholib@7f610ee
ronaldoussoren/macholib@7d1b50c
But these are old and already included in macholib 1.16.x

So I wrote my own ugly patch:
Xpra-org/gtk-osx-build@9752e5d

@totaam totaam closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos packaging
Projects
None yet
Development

No branches or pull requests

1 participant