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

Add c-ares as Termux library dependency #178

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

marcprux
Copy link
Contributor

@marcprux marcprux commented Oct 7, 2024

Termux's libcurl was just changed to add a dependency on c-ares in libcurl 8.10.1-1 (termux/termux-packages#21686), so we need to add that to the libraries downloaded and processed by get-packages-and-swift-source.swift in order for FoundationNetworking to work.

@marcprux
Copy link
Contributor Author

marcprux commented Oct 7, 2024

Ugh … libcurl loads fine with this addition, but it is no longer working with FoundationNetworking. Every http and https URL is now returning NSFileReadUnknownError (256). It was working fine with the last libcurl 8.9.1, but has broken since libcurl 8.10.1-1 with the c-ares dependency.

@marcprux
Copy link
Contributor Author

marcprux commented Oct 7, 2024

This does indeed seem to be related to name resolution, which makes me suspicious of this c-ares dependency. My URL download tester program outputs the following with curl debugging enabled:

zap swift-projects/demo % ANDROID_SERIAL=19091FDF600BAY skip android run --env URLSessionDebugLibcurl=YES --env URLSessionDebug=YES demo "http://www.example.com/"
Building for debugging...
[0/3] Write swift-version--5366198ACE037756.txt
Build complete! (0.18s)
[✓] Check Swift Package (0.19s)
[✓] Connecting to Android (0.05s)
[✓] Copying executable files (1.05s)
[1]                   Could not resolve host: www.example.com␊
[1]                   Could not resolve host: www.example.com␊
[1]                   closing connection #0␊
Connecting to: http://www.example.com/
Error: Error Domain=NSCocoaErrorDomain Code=256 "(null)"

@finagolfin
Copy link
Owner

I'm fine with this pull, if you need this newly added dependency.

This does indeed seem to be related to name resolution, which makes me suspicious of this c-ares dependency. My URL download tester program outputs the following with curl debugging enabled

Tough to debug without a link to the actual failing code 😉

@finagolfin
Copy link
Owner

Rebuilt the SDK with this and ran it through the CI, so going ahead and merging. Let us know if you still see those testing failures and if so, what tests you're actually running.

@finagolfin finagolfin merged commit dfc3cad into finagolfin:main Oct 12, 2024
18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants