-
Notifications
You must be signed in to change notification settings - Fork 11
Add libcurl build phase #15
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
Conversation
1af1267 to
551bde5
Compare
|
Hi @hmelder, thanks for setting this up. After battling GitHub rate limit errors this is finally building on CI and seems to work ok. I ran the tests locally and unfortunately there’s errors from these tests that we would probably still need to fix before merging this: |
Nice! I’ve seen the new commits. I’ll take a look at the errors in the unit tests, but it is probably related to the local web server. |
|
That’d be fantastic, thanks. This test doesn’t have a local webserver, but instead tries to check if a connection to an nonexistent host fails correctly. I’m guessing it’s something with the libcurl integration. |
That's correct. Internally GNUstep uses a curl multi handle that manages multiple easy handles. The handles itself are wrapped into objects, and there are a couple of quite complex handlers (Translating C-based callback functions into the proper NSURLSessionProtocol methods). It would be great to have a CI log of the test. I guess I can just create a new branch in libs-base and modify the CI config? |
Yes, that’d be great! Thank you. |
|
I updated libs-base to fix unreliable CI runs, and in the process added an option to easily specify a branch from this repo to use. Here’s a run I did with this libcurl branch: |
|
Which Visual Studio version are you running? I'm guessing it's most likely related to that, as there haven't been any upstream changes in libdispatch in a while. You'll ideally want to use VS |
I am using VS 2022 with Windows Kit 11 and Clang 15. |
|
MSVC supports atomic<> from version 2012 onwards (https://learn.microsoft.com/en-us/cpp/standard-library/atomic-enums?view=msvc-140). Weird. |
Works with Clang 14 |
|
There is a minor difference between curl error handling on Windows and UNIX which results in different results when parsing them internally in urlErrorCodeWithEasyCode (https://github.com/gnustep/libs-base/blob/efccdb1d71166cfe096f309a97747175f46c1435/Source/GSEasyHandle.m#L271). I get -1001 (NSURLErrorTimedOut) on Windows and -1004 (NSURLErrorCannotConnectToHost) on Linux. urlErrorCodeWithEasyCode uses the curl error and a system-specific error code to determine the corresponding Foundation Error Code CURLINFO_OS_ERRNO. else if (easyCode == CURLE_COULDNT_CONNECT && failureErrno == ETIMEDOUT)
{
return NSURLErrorTimedOut;
}I'll look into this the next days. As I need to setup the dev vm and generate debug information. |
bdf9d1b to
39bb2fe
Compare
|
For some reason I actually don’t get any callback from curl when running the test locally, so the test’s run loop just times out... I’ll try to look into it further since I’m working on various NSURLSession improvements. |
0fec129 to
84a0c37
Compare
6613a0f to
47abc4b
Compare
…ing NSURLSession More info: swiftlang/swift-corelibs-libdispatch#772
Fixes 32-bit builds, which were picking up libz.a and libssh2.a found in this directory. More information: actions/runner-images#6627
47abc4b to
498a258
Compare
|
Unfortunately I didn’t manage to track down the NSURLSession/test01 failure, so for now I marked it as hopeful as part of my NSURLSession improvements PR gnustep/libs-base#286. With that the libs-base CI passes: |



There are still some patches required to the libs-base autoconf script to get the right version from pkg-config.