- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
linker error in AOCC-2.1.0 because of stime removal in glibc-2.31
Dear community,
I just installed the aocc-compiler and it compiles my code but at the linker stage exits with the following error:
ld.lld: error: /opt/aocc/bin/../lib/libflang.so: undefined reference to stime
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
From what I gather this happens because of the deprecation and removal of stime in glibc-2.31 and has been fixed upstream in flang [0]. Is there a workaround or do we know when an updated version of the compiler will be released?
Thanks in advance,
Georg
- Labels:
-
Tools and Libraries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One alternative is to create a C function stime and link this C file with flang.
-- stime.c ---
#include <time.h>
int stime(const time_t *t)
{
struct timespec ts = {};
ts.tv_sec = *t;
return clock_settime(CLOCK_REALTIME, &ts); }
$ flang test.f90 stime.c
Please let us know if above helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hah, brilliant idea. It works as a workaround for a small toy project on which I tested Thanks!
