-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Description
Musl defines time_t as a 64 bit int on all platforms. When building against Musl (Alpine linux in this case) the build fails on 32-bit platforms because the nimUse64BitCTime flag isn't passed when building testament.
Example (from Alpine's CI - https://gitlab.alpinelinux.org/tokyovigilante/aports/-/jobs/1565125):
Nim Version
2.2.0
Current Output
/home/buildozer/.cache/nim/testament_r/@m..@slib@[email protected]: In function 'getLocalOffsetAndDst__pureZtimes_u1906':
/home/buildozer/.cache/nim/testament_r/@m..@slib@[email protected]:2179:28: error: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types]
2179 | tmPtr = localtime((&a));
| ~^~~
| |
| long int *
In file included from /home/buildozer/.cache/nim/testament_r/@m..@slib@[email protected]:11:
/usr/include/time.h:60:23: note: expected 'const time_t *' {aka 'const long long int *'} but argument is of type 'long int *'
60 | struct tm *localtime (const time_t *);
| ^~~~~~~~~~~~~~
CC: ../lib/pure/concurrency/cpuinfo.nim
CC: ../lib/std/monotimes.nim
Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -fno-math-errno -I/builds/tokyovigilante/aports/community/nim/src/nim-2.2.0/lib -I/builds/tokyovigilante/aports/community/nim/src/nim-2.2.0/testament -o /home/buildozer/.cache/nim/testament_r/@m..@slib@[email protected] /home/buildozer/.cache/nim/testament_r/@m..@slib@[email protected]' failed with exit code: 1
FAILURE
Expected Output
No response
Known Workarounds
Force 64-bit time_t by patching nim_posix_other.nim.
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels