-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
_fseeki64 incorrectly detected as found when cross-compiling for iOS. #15525
Comments
Thanks for your report. Would you mind posting the lines from Also if you could make a |
Detecting `_fseeki64` can be tricky, but also seems redundant given that it's Windows-only and we already opt-in all Windows builds to use it (in CMake). Drop detections and use it in all Windows builds with large file support enabled. Regression-from: 8e34505 curl#15164 Reported-by: Maarten Billemont Fixes curl#15525
I figure it may be a more effective approach to just skip the detection Unless someone is aware that Also related:
|
In the meantime for anyone bumping into this issue, the workaround is passing |
It's not offered by Apple operating system, but in some cases it may get mis-detected when using `check_function_exists()`, then making the build fail later. A better fix would be to figure out why are these mis-detections. One common pattern seen is this option, but it may or not be the cause: ``` -DCMAKE_TOOLCHAIN_FILE=[...]/toolchains/ios.toolchain.cmake ``` Ref: curl#15525 Regression from 8e34505 curl#15164 Reported-by: Dan Rosser Fixes curl#15557 Closes curl#15558
It's not offered by Apple operating system, but in some cases it may get mis-detected when using `check_function_exists()`, then making the build fail later. A better fix would be to figure out why are these mis-detections. One common pattern seen is this option, but it may or not be the cause: ``` -DCMAKE_TOOLCHAIN_FILE=[...]/toolchains/ios.toolchain.cmake ``` Ref: curl#15525 Regression from 8e34505 curl#15164 Reported-by: Dan Rosser Fixes curl#15557 Closes curl#15558
It's not offered by Apple operating system, but in some cases it may get mis-detected when using `check_function_exists()`, then making the build fail later. A better fix would be to figure out why are these mis-detections. One common pattern seen is this option, but it may or not be the cause: ``` -DCMAKE_TOOLCHAIN_FILE=[...]/toolchains/ios.toolchain.cmake ``` Ref: curl#15525 Regression from 8e34505 curl#15164 Reported-by: Dan Rosser Fixes curl#15557 Closes curl#15558
It's not offered by Apple operating systems, but in some cases it gets mis-detected when using `check_function_exists()`. Then making the build fail later. A better fix would be to figure out why are these mis-detections. One common pattern seen is this option, but it may or not be the cause: ``` -DCMAKE_TOOLCHAIN_FILE=[...]/toolchains/ios.toolchain.cmake ``` Ref: curl#15525 Regression from 8e34505 curl#15164 Reported-by: Dan Rosser Fixes curl#15557 Closes curl#15558
@lhunath Can you give a pointer where to find the referenced |
I could trace this back to an issue in |
It's not offered by Apple operating systems, but in some cases it gets mis-detected when using `check_function_exists()`. Then making the build fail later. A better fix would be to figure out why are these mis-detections. One common pattern seen is this option, but it may or not be the cause: ``` -DCMAKE_TOOLCHAIN_FILE=[...]/toolchains/ios.toolchain.cmake ``` Ref: curl#15525 Regression from 8e34505 curl#15164 Reported-by: Dan Rosser Fixes curl#15557 Closes curl#15558
* OpenSSL [3.3.1~3.4.0] - https://github.com/openssl/openssl/blob/master/CHANGES.md - Formulae: Fix for tag on cmake script / SHA * cURL [8.9.1 ~ 8.11.0] - Changelog https://curl.se/ch/8.11.0.html - Formulae - updated SHA / tag * cURL - Cmakelist : FSEEK disabled till next version curl/curl#15525 * cURL macOS Getpass fix * cURL macOS patch 8.11.0 * cURL Disable LibPSL / LibSSH sub (cherry picked from commit 7bd3c0f) * cURL HAVE_GETPASS_R=0 * cURL CMake macOS ignore homebrew subs (cherry picked from commit b89902a) * cURL enable -DENABLE_STRICT_TRY_COMPILE=ON * cURL / OpenSSL no package registry * cURL disable PSL/SSH
Fix builds with CMake configured to falsely return successful detection when using `check_function_exists()` (and `check_library_exists()`, and anything based on `try_compile()` that's relying on the linker). After such mis-detection the build fails when trying to use the feature that doesn't in fact exist. The mis-detection is caused by this CMake setting: ``` set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) ``` It is set by default (or on conditions) when using 3rd-party toolchain: https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake After this patch the curl build overrides this setting for the duration of feature tests, and logs a message about it. Also preset and skip feature tests for known mis-detections: - `connect()` in `libsocket` - `getpass_r()` - `eventfd()` (did not cause an issue due to a separate bug) - `sendmmsg()` (did not cause an issue because it's Linux-only) If mis-detections are still seen, the workaround is to force-set the specific feature by passing `-DHAVE_*=OFF` to cmake. Also consider passing `-DENABLE_STRICT_TRY_COMPILE=ON` for `ios.toolchain.cmake` to fix the root cause. Interestingly curl itself uses this setting to speed up compile-only detections: be17f29 #3744 Also: - OtherTests.cmake: restore original value of `CMAKE_TRY_COMPILE_TARGET_TYPE`. Before this patch it reset it to empty. - OtherTests.cmake: unset a local variable after use, quote a string. Follow-up to 8e34505 #15164 Follow-up to 8b76a8a #15525 Ref: leetal/ios-cmake#47 Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/18121 Ref: https://cmake.org/cmake/help/latest/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.html Reported-by: Dan Rosser Fixes #15557 Closes #15559
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
I did this
It appears the change introduced by #15164 caused an issue cross-compiling curl for iOS/aarch64.
With the following in
CMakeLists.txt
:Running the following:
Results in:
And a failed build:
While reverting the
CMakeLists.txt
back to using:Yields:
And a successful build.
I expected the following
For
HAVE__FSEEKI64
to be correctly detected as0
rather than1
when the symbol is unavailable during build time.curl/libcurl version
curl-8_11_0
operating system
Cross-compiling for iPhoneOS18.1.sdk from macOS 15.0.1 (24A348).
The text was updated successfully, but these errors were encountered: