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
Cross-compiling to SerenityOS fails #12093
Comments
Skip `check_c_source_runs()` call when cross-building. Regression from 04a3a37 curl#11979 Reported-by: Kartatz on Github Fixes curl#12093 Closes #xxxxx
Thanks for the report. This workaround might work till the fix Fix attempt here: #12094. Please test and report if it fixes this. Also, please report if |
It's working just fine. Thanks!
It seems that |
Thanks! What is the value of Add this to CMakeLists.txt to display it: message(STATUS "|${CMAKE_SYSTEM_NAME}|") |
Output:
So, it seems to be just " |
Thank you @Kartatz! |
Normal detection fails. This patch opts in SerenityOS into `HAVE_GETADDRINFO_THREADSAFE`. Ref: curl#12093 (comment) Ref: curl#12093 (comment) Assisted-by: Kartatz on Github Closes #xxxxx
Normal detection fails. This patch opts in SerenityOS into `HAVE_GETADDRINFO_THREADSAFE`. Ref: curl#12093 (comment) Ref: curl#12093 (comment) Assisted-by: Kartatz on Github Closes #xxxxx
@Kartatz Trying to match the opt-in in autotools (but maybe its detection worked already I don't know). If you have feedback for that, I'd appreciate it: #12095 (comment) |
Hi, I just wanted to say this also fixed compiling for arm64-ios.cmake via vcpkg thanks!! |
According to the issue curl/curl#12093 the curl build doesn't properly detect that Serenity has getaddrinfo() and outputs the following: --- Performing Test HAVE_H_ERRNO_ASSIGNABLE CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_H_ERRNO_ASSIGNABLE_EXITCODE (advanced) --- Setting the CMake cache variable HAVE_GETADDRINFO_THREADSAFE=1 solves the mentioned error.
According to the issue curl/curl#12093 the curl build doesn't properly detect that Serenity has getaddrinfo() and outputs the following: --- Performing Test HAVE_H_ERRNO_ASSIGNABLE CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_H_ERRNO_ASSIGNABLE_EXITCODE (advanced) --- Setting the CMake cache variable HAVE_GETADDRINFO_THREADSAFE=1 solves the mentioned error. Also see: curl/curl#12094
According to the issue curl/curl#12093 the curl build doesn't properly detect that Serenity has getaddrinfo() and outputs the following: --- Performing Test HAVE_H_ERRNO_ASSIGNABLE CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_H_ERRNO_ASSIGNABLE_EXITCODE (advanced) --- Setting the CMake cache variable HAVE_GETADDRINFO_THREADSAFE=1 solves the mentioned error. Also see: curl/curl#12094
Fix `HAVE_H_ERRNO_ASSIGNABLE` to not run, only compile its test snippet, aligning this with autotools. This fixes an error when doing cross-builds and also actually detects this feature. It affected systems not allowlisted into this, e.g. SerenityOS. We used this detection result to enable `HAVE_GETADDRINFO_THREADSAFE`. Follow-up to 04a3a37 curl#11979 Ref: curl#12095 (closed in favour of this patch) Ref: curl#11964 (effort to sync cmake detections with autotools) Reported-by: Kartatz on Github Assisted-by: Kartatz on Github Fixes curl#12093 Closes curl#12094
I did this
Trying to cross-compile curl to SerenityOS fails with the following output:
The relevant part is:
I expected the following
Curl configures and build successfully
curl/libcurl version
curl 8.4.0
operating system
Linux ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: