NatLabRockies / NatLabRockies/wex
fix for compiling with libcurl on aarch64 (arm 64bit)
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 66
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
I was compiling sam from sources on linux aarch64 (debian in docker running on macos M1) and had to make the following change, otherwise the corresponding constants stayed undefined and wex wouldn't compile.
I'm leaving my workaround here in case someone faces the same problem:
index 1e62f56..5bf9764 100644
--- a/build_resources/libcurl_ssl_x64/include/curl/curlbuild.h
+++ b/build_resources/libcurl_ssl_x64/include/curl/curlbuild.h
@@ -536,7 +536,7 @@ Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(__x86_64__) || defined(__ppc64__)
+# elif defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__)
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
My platform:
uname -a
Linux d6caf49a35b7 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 GNU/Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build_resources/libcurl_ssl_x64/include/curl/curlbuild.h and inspect the architecture conditionals around CURL_SIZEOF_LONG and CURL_TYPEOF_CURL_OFF_T. Build WEX on Linux aarch64, then confirm the curl constants are defined and wex compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker, linux
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100