Repository navigation
fix(libcurl): build the curl backend for the macOS target architecture - #17425
Conversation
|
Read |
|
Independent confirmation on a second machine, and the backend comes out x86_64 now. Apple M4 (Mac mini), macOS 27.0.1 (26A434), Apple clang 21.0.0, x86-64 Release under Rosetta 2,
To reach the patch step I needed #18905 too, because The frameworks you add are exercised by that link, not by a run: no title or proxy path was tested. |
Pass CMAKE_OSX_ARCHITECTURES to the curl ExternalProject, as the libjpeg-turbo build already does, and link CoreFoundation and SystemConfiguration, which curl's proxy lookup on macOS needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ligmaSec
left a comment
There was a problem hiding this comment.
The architecture option splits into two CMake list entries for a universal build. I evaluated the added list(APPEND ...) with CMAKE_OSX_ARCHITECTURES=arm64;x86_64 and got -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 followed by a bare x86_64. Please pass the multi-value setting to the child as a single cache argument.
AI-assisted: yes.
A universal CMAKE_OSX_ARCHITECTURES such as arm64;x86_64 split into two ExternalProject arguments, so the curl backend saw only arm64. Join the list with | and set LIST_SEPARATOR so the child gets the whole list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Agreed, done in Merged into |
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix · Severity of issue fixed: Medium Merge Risk:
|
MarcZX10
left a comment
There was a problem hiding this comment.
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 using repo_read.py. No build environment or tests were run.
python3 repo_read.py cat core/libs/prx/libcurl/CMakeLists.txt 1 141
Results
| Check | Result | Note |
|---|---|---|
| Changed-file review | passed | One changed file read in full |
| Tests and build | not run | No independent platform run |
| Negative control | not run | No non-compiling control available |
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.json lists 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.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
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