fix(libcurl): build the curl backend for the macOS target architecture #17425
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17425"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-11-08T19:27:28Z.
What
libcurldoes not link in the macOS build onmain, for two reasons:ExternalProjectthat does not receiveCMAKE_OSX_ARCHITECTURES. The top-levelCMakeLists.txtsets it tox86_64on macOS, but on Apple Silicon the backend is configured for the host andlibcurl.acomes out arm64, soldignores every object in it. This now passes the architecture ascore/Decoder/Jpeg/CMakeLists.txtalready does for libjpeg-turbo.SCDynamicStoreCopyProxiesandCFReleaseon macOS (lib/hostip.c,CURL_OSX_CALL_COPYPROXIES). curl's own CMake adds the frameworks to its own targets only, andCURL_ENABLE_EXPORT_TARGETis off here, soanyps5_curl_backendnow linksCoreFoundationandSystemConfigurationon Apple, next to the existing Windows and Linux system libraries.When
libcurlfails, the NID patch step for the wholelibstarget does not run either.Both changes are under
APPLE, so Linux and Windows build the same as before.Tested
macOS 27.3, Apple M5 Pro, Apple clang, x86_64 Release under Rosetta 2. Tree:
main095ff72367with #16591 and #17532, which macOS still needs to buildlibs.ld: warning: ignoring file '.../libcurl.a(...)': found architecture 'arm64', required architecture 'x86_64'and undefined symbols such as_Curl_ccalloc.Undefined symbols for architecture x86_64: "_CFRelease", "_SCDynamicStoreCopyProxies".libcurl.ais x86_64 (lipo -info),libsandrelinkerbuild, and the 8guest_curl*tests pass (ctest -R guest_curl).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-16T11:17:26Z.
Review: COMMENTED
Tested on macOS 27.2, Apple Silicon (M4), full build (x86-64 under Rosetta 2), merged onto
main04f7633c01withgit merge --no-ff.core/libs/libs/unpatched/libcurl.prxfails to link because the curl backend is built as arm64. As a result, every target that depends oncore/libs/libsis skipped, and its tests show as Not Run.ninja -k 0 -C buildfinishes with no failures, andlipo -archs libcurl.prxreportsx86_64.mainleaves Not Run here pass. That covers all 11guest_curl*tests, the FreeType postscript, memory, module-property, stroker and legacy-metadata tests (both NID and non-NID variants),guest_libressl_protocol(both variants),guest_libressl3_ec_parameters,guest_libressl3_ecdsa_sig,guest_libressl3_rsa_getters,net_reuseport_patched,net_ipv6only_patchedandpatched_libraries.Not tested: an Intel Mac, and a native arm64 build.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T07:55:50Z.
Review: APPROVED
Reviewed — looks good
The change passes the macOS target architecture to the external curl build and links the Apple frameworks used by curl; no blocking defect was found in the changed code.
What I ran
Read the prepared description, commit summary, manifest, and diff for head
e039596d8e9ce68b505de99f784981e1ef941586. Read the complete changed filecore/libs/prx/libcurl/CMakeLists.txtthroughrepo_read.pyand searched repository references toCMAKE_OSX_ARCHITECTURESand the curl external project. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Builds and tests were not run independently. The author reports a macOS 27.3 Apple M5 Pro x86_64 Release build under Rosetta, successful
libsandrelinkerbuilds, and eightguest_curl*tests passing. Linux and Windows behavior was not verified. The changed file was read in full; no other files were listed as changed in the manifest.files.jsonwas not available in the prepared review folder.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Jazeupoi on 2026-11-30T07:50:19Z.
Review: COMMENTED
Tested on an Apple M4 (macOS 27.0.1, Apple clang 21.0.0, x86_64 Release under Rosetta 2). Tree:
main6b74d9d67bplus #26739 and #27739, which macOS needs to build, and #27801; none of them touches libcurl.libcurl.prxfails to link with undefined_CFReleaseand_SCDynamicStoreCopyProxies(the break also listed in #27647).libsbuilds completely and the 11guest_curl*tests pass 3 of 3 rounds.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T16:15:24Z.
Review: COMMENTED
The architecture option splits into two CMake list entries for a universal build. I evaluated the added
list(APPEND ...)withCMAKE_OSX_ARCHITECTURES=arm64;x86_64and got-DCMAKE_OSX_ARCHITECTURES:STRING=arm64followed by a barex86_64. Please pass the multi-value setting to the child as a single cache argument.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T21:02:27Z.
Review: APPROVED
Reviewed — looks good
The reviewed CMake changes pass the macOS architecture list to the curl external build and add its required system framework link dependencies.
What I ran
Reviewed head
1c24bba754fb4f945067db44bde6b3022a76efa8. Read the prepared description, commits, diff, manifest, and the complete changed file usingrepo_read.py. No build environment or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The author reports a successful macOS build and curl tests; these were not independently run. Linux and Windows builds were not run.
files.jsonlists one reviewed file and no excluded files; the complete text of that changed file was read.To get this to a good state
Nothing is required.