Skip to content

GHA/configure-vs-cmake: add Windows build, fix issues - #14678

Closed
vszakats wants to merge 10 commits into
curl:masterfrom
vszakats:gha-configure-vs-cmake-windows
Closed

vszakats wants to merge 10 commits into
curl:masterfrom
vszakats:gha-configure-vs-cmake-windows

Conversation

@vszakats

@vszakats vszakats commented Aug 25, 2024 •

Copy link
Copy Markdown
Member
  • configure: disable pthreads by default on Windows.
  • configure: disable detecting fseeko() on Windows.
    (It exists in mingw-w64 2.0.0 and newer, but it's permanently ignored
    in CMake, as this function is never necessary on Windows.)
  • extend existing exceptions with their Windows variants.
  • lib/formdata.c: prioritize _fseeki64() over fseeko().
    To reduce the difference between Windows builds, which now all use
    _fseeki64().
  • cmake: perm-enable HAVE_DIRENT_H and HAVE_OPENDIR for mingw-w64,
    to match configure.
    Follow-up to bfe54b0 file:// : Allow getting basic directory listings #13137
    This in theory could make the dir listing feature work in mingw-w64
    build, but in my tests (on WINE) it failed at the preceding open()
    call.
  • cmake: perm-enable HAVE_STRINGS_H and HAVE_UTIME_H for mingw-w64,
    to match configure. (They are wrappers and make no difference in the build.)

Also:

  • configure: sync USE_MANUAL macro with cmake, by only setting it for
    src. Drop checker exception.
  • CI: use --disable-dependency-tracking in existing jobs.
  • CI: install packages before git checkout, in existing jobs.

  • fix pthread vs win32 thread detection difference. cmake uses native always.
  • smoothen/ignore the fseeko detection. or an alternative.
  • cmake: add option to use pthreads (=or to not use native threads) with Windows?

@vszakats vszakats added Windows Windows-specific CI Continuous Integration labels Aug 25, 2024
It syncs Windows builds with each other.

Before this patch autotools mingw-w64 2.0.0 and later builds detected and
used fseeko(). Cmake did not with the same toolchain.

Another solution is to enable the fseeko check for mingw-w64 in cmake,
but its and extra check and it's also non-trivial to figure out what
fseeko gets translated to at the end and if it has proper 64-bit always.
It's PPd to this in local tests with mingw-w64 12.0.0:
```
fseeko64(stream, (off_t)offset, whence);
```
@dfandrich

Copy link
Copy Markdown
Contributor

Analysis of PR #14678 at a88c48ab:

Test 284 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 283 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 285 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 286 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 332 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 334 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

Test 1007 failed, which has NOT been flaky recently, so there could be a real issue in the PR.

There are more failures, but that's enough from Gha.

Generated by Testclutch

@vszakats vszakats changed the title GHA/configure-vs-cmake: add Windows build GHA/configure-vs-cmake: add Windows build, fix issues Aug 25, 2024
@vszakats
vszakats force-pushed the gha-configure-vs-cmake-windows branch from 958ddc9 to 21d52c4 Compare August 25, 2024 15:56
@vszakats vszakats closed this in aaacd02 Aug 26, 2024
@vszakats
vszakats deleted the gha-configure-vs-cmake-windows branch August 26, 2024 09:11
vszakats added a commit that referenced this pull request Aug 26, 2024
Recently added, but it's not saving anything at the configure stage,
the only stage in this workflow.

Follow-up to aaacd02 #14678
vszakats added a commit that referenced this pull request Nov 11, 2024
A recent update caused CMake builds to mis-detect this symbol on iOS.
Auto-detection also seems redundant given that it's a Windows-only
function and most Windows builds were already opted-in.

Drop detections and use it in all Windows builds with large file support
enabled.

Feature history:
- pririotizing for Windows: aaacd02 #14678
- Windows opt-in cmake: 8e74c07 #11950
- Windows opt-in: aa6c94c #11944
- use in libcurl: 9c7165e #11918
- use in example: 817d1c0

Regression from 8e34505 #15164

Reported-by: Maarten Billemont
Fixes #15525
Closes #15526
vszakats added a commit to vszakats/curl that referenced this pull request Jan 17, 2025
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
A recent update caused CMake builds to mis-detect this symbol on iOS.
Auto-detection also seems redundant given that it's a Windows-only
function and most Windows builds were already opted-in.

Drop detections and use it in all Windows builds with large file support
enabled.

Feature history:
- pririotizing for Windows: aaacd02 curl#14678
- Windows opt-in cmake: 8e74c07 curl#11950
- Windows opt-in: aa6c94c curl#11944
- use in libcurl: 9c7165e curl#11918
- use in example: 817d1c0

Regression from 8e34505 curl#15164

Reported-by: Maarten Billemont
Fixes curl#15525
Closes curl#15526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration cmdline tool Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants