Skip to content

cmake, configure: Also link with CoreServices#11894

Closed
ryandesign wants to merge 1 commit intocurl:masterfrom
ryandesign:CoreServices
Closed

cmake, configure: Also link with CoreServices#11894
ryandesign wants to merge 1 commit intocurl:masterfrom
ryandesign:CoreServices

Conversation

@ryandesign
Copy link
Copy Markdown
Contributor

When linking with CoreFoundation, also link with CoreServices which is apparently required to avoid an NSInvalidArgumentException in software linking with libcurl on macOS Sonoma 14 and later.

Fixes #11893

I am running macOS Monterey 12 so I have not verified that this fixes the crash, though others claim that it does, and I have verified that this does cause libcurl.dylib to link with CoreServices using either the autotools or cmake build systems.

CoreServices is available on every version of macOS and dynamically linked libraries aren't loaded in unless their functions are actually used at runtime, so linking with this framework even on earlier macOS versions where it wasn't needed shouldn't cause any problems.

When linking with CoreFoundation, also link with CoreServices which is
apparently required to avoid an NSInvalidArgumentException in software
linking with libcurl on macOS Sonoma 14 and later.

Fixes curl#11893
@bagder
Copy link
Copy Markdown
Member

bagder commented Sep 20, 2023

Thanks!

@bagder bagder closed this in 6ab7e19 Sep 20, 2023
@ryandesign ryandesign deleted the CoreServices branch September 21, 2023 12:08
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
When linking with CoreFoundation, also link with CoreServices which is
apparently required to avoid an NSInvalidArgumentException in software
linking with libcurl on macOS Sonoma 14 and later.

Fixes curl#11893
Closes curl#11894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Crash of programs linked with libcurl on macOS Sonoma 14: unrecognized selector sent to instance

2 participants