You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results in error: ld.lld: error: undefined symbol: localtime_r
referenced by datetime.c:11 (/proc/self/cwd/external/pico-sdk+/src/common/pico_util/datetime.c:11)
datetime.o:(pico_localtime_r) in archive bazel-out/k8-dbg/bin/external/pico-sdk+/src/common/pico_util/libpico_util.a
clang++: error: ld.lld command failed with exit code 1 (use -v to see invocation)
localtime_r has this declared in pico-sdk/src/rp2_common/pico_clib_interface/include/llvm_libc/time.h struct tm* localtime_r(const time_t* timer, struct tm* buf);
I am using the pico_aon_timer library, specifically the aon_timer_set_time function
Uh oh!
There was an error while loading. Please reload this page.
When compiling using bazel build, and using the clang compiler, localtime_r is missing definition
i.e. in bazelrc
Results in error:
ld.lld: error: undefined symbol: localtime_r
referenced by datetime.c:11 (/proc/self/cwd/external/pico-sdk+/src/common/pico_util/datetime.c:11)
datetime.o:(pico_localtime_r) in archive bazel-out/k8-dbg/bin/external/pico-sdk+/src/common/pico_util/libpico_util.a
clang++: error: ld.lld command failed with exit code 1 (use -v to see invocation)
localtime_r has this declared in pico-sdk/src/rp2_common/pico_clib_interface/include/llvm_libc/time.h
struct tm* localtime_r(const time_t* timer, struct tm* buf);
I am using the pico_aon_timer library, specifically the aon_timer_set_time function
It looks as though the libc for clang doesnt support localtime_r. See https://libc.llvm.org/headers/time.html
The text was updated successfully, but these errors were encountered: