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

Error loading Carbon library in Sonoma #511

Open
ccesarcaball opened this issue Oct 11, 2023 · 8 comments
Open

Error loading Carbon library in Sonoma #511

ccesarcaball opened this issue Oct 11, 2023 · 8 comments

Comments

@ccesarcaball
Copy link

Im using MacOS Sonoma 14.0, I'm able to build the app, but I can't run it, this is the error:

Traceback (most recent call last):
  File "/Users/cccaballero/Projects/services-manager/dist/services_manager.app/Contents/Resources/__boot__.py", line 321, in <module>
    _argv_emulation()
  File "/Users/cccaballero/Projects/services-manager/dist/services_manager.app/Contents/Resources/__boot__.py", line 318, in _argv_emulation
    _run_argvemulator()
  File "/Users/cccaballero/Projects/services-manager/dist/services_manager.app/Contents/Resources/__boot__.py", line 127, in _run_argvemulator
    carbon = _ctypes_setup()
  File "/Users/cccaballero/Projects/services-manager/dist/services_manager.app/Contents/Resources/__boot__.py", line 51, in _ctypes_setup
    carbon = ctypes.CDLL("/System/Library/Carbon.framework/Carbon")
  File "ctypes/__init__.pyc", line 366, in __init__
OSError: dlopen(/System/Library/Carbon.framework/Carbon, 0x0006): tried: '/System/Library/Carbon.framework/Carbon' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Carbon.framework/Carbon' (no such file), '/System/Library/Carbon.framework/Carbon' (no such file, not in dyld cache)
@culler
Copy link

culler commented Oct 14, 2023

This is an Apple bug. They are shipping their Carbon.framework with a broken symlink:

$ file /System/Library/Frameworks/Carbon.framework/Carbon
/System/Library/Frameworks/Carbon.framework/Carbon: broken symbolic link to Versions/Current/Carbon

However, this is not new with Sonoma. It was also a broken link in Ventura.

@ccesarcaball
Copy link
Author

I don't know why it doesn't surprise me... any workaround?

@yesyves
Copy link

yesyves commented Jan 8, 2024

I have the same problem in Frescobaldi but I'm not sure the problem is an "Apple bug" first because the dlerror comes from looking in the wrong directory : OSError: dlopen(/System/Library/Carbon.framework/Carbon, 0x0006)
While it should be looking in /System/Library/Frameworks/Carbon.framework/Carbon

But also since Carbon framework is deprecated since 10.8 (2012) and has no 64-bits support while macOS supports only 64-bit since 10.15 Catalina.

@yesyves
Copy link

yesyves commented Jan 8, 2024

any workaround?
You can launch the python application from Terminal directly without using the .app wrapper

@culler
Copy link

culler commented Jan 8, 2024

While it should be looking in /System/Library/Frameworks/Carbon.framework/Carbon

There is no such directory. Instead that is the pathname of a broken symlink, and that broken symlink was put there by Apple. The expectation is that Carbon would be a dynamic library that could be opened by dlopen, not a directory.

I don't know of any workaround other than removing dependence on a library which no longer exists.

@GautamBose
Copy link

Is this affecting all builds on Ventura? Or only those with a specific dependency?

@matagus
Copy link

matagus commented Apr 23, 2024

Just in case it helps, I run into the same issue in this project using rumps + py2app. This workaround worked for me.

@GautamBose
Copy link

GautamBose commented Apr 23, 2024

@matagus Worked for me thanks!

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

5 participants