This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

librt.so missing?

Hi,

I'm trying to cross-compile an autotools project (UCX), and I'm getting an error on a missing librt.so (part of the libc package):

Command: CC=armclang.exe CFLAGS='--target=aarch64-arm-none-eabi' ./configure --host=arm-linux

Error:

configure:21777: checking for shm_open in -lrt
configure:21802: /.../compile armclang.exe -o conftest --target=aarch64-arm-none-eabi conftest.c -lrt >&5
Fatal error: L6450U: Cannot find library rt.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
armclang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:21802: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "ucx"
| #define PACKAGE_TARNAME "ucx"
| #define PACKAGE_VERSION "1.7"
| #define PACKAGE_STRING "ucx 1.7"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define PACKAGE "ucx"
| #define VERSION "1.7"
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| #define restrict __restrict
| #define HAVE_DECL_STRERROR_R 0
| #define UCX_CONFIGURE_FLAGS "--enable-optimizations --disable-logging --disable-debug --disable-assertions --disable-params-check --host=arm-linux
| #define UCX_MODULE_SUBDIR "ucx"
| #define UCX_ALLOC_ALIGN 16
| #define HAVE_ATTRIBUTE_NOOPTIMIZE 0
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char shm_open ();
| int
| main ()
| {
| return shm_open ();
| ;
| return 0;
| }
configure:21811: result: no
configure:21821: error: librt not found

Should I build librt from source, or is there some pre-built ARM-targeted replacement?

Any other tips for the command-line?

Parents
  • I got the answer, so posting here for future reference. Though there were some suggestions about the command-line, the issue is that this compiler version does not come with an environment equivalent to glibc, and so does not contain librt or the functions it holds. I was recommended to try out ARM's HPC compiler, which should have this.

Reply
  • I got the answer, so posting here for future reference. Though there were some suggestions about the command-line, the issue is that this compiler version does not come with an environment equivalent to glibc, and so does not contain librt or the functions it holds. I was recommended to try out ARM's HPC compiler, which should have this.

Children
No data