NatLabRockies / NatLabRockies/wex

fix for compiling with libcurl on aarch64 (arm 64bit)

Open
#126 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.