CMake c CMAKE_SYSROOT не видит библиотеки в rootfs Выглядит это так:
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_create.o): In function `timer_create':
(.text+0x44): undefined reference to `__libc_do_syscall'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_create.o): In function `timer_create':
(.text+0x126): undefined reference to `__libc_do_syscall'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_settime.o): In function `timer_settime':
(.text+0x8): undefined reference to `__libc_do_syscall'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_routines.o): In function `timer_helper_thread':
(.text+0x4e): undefined reference to `__libc_do_syscall'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_routines.o): In function `timer_sigev_thread':
(.text+0xf4): undefined reference to `__libc_do_syscall'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_routines.o):(.text+0x13e): more undefined references to `__libc_do_syscall' follow
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(timer_routines.o): In function `__start_helper_thread':
(.text+0x186): undefined reference to `pthread_atfork'
/var/lib/tftpboot/rootfs/usr/lib/arm-linux-gnueabihf/librt.a(librt-cancellation.o): In function `__librt_disable_asynccancel':
(.text+0xda): undefined reference to `__libc_do_syscall'
collect2: error: ld returned 1 exit status
библиотека librt-2.19.so и линк на нее librt.so.1 лежат в rootfs/lib/arm-linux-gnueabihf
CMAKE_TOOLCHAIN_FILE:
SET(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
# specify the cross compiler
SET(CMAKE_C_COMPILER /opt/gcc-linaro-arm-linux-gnueabihf-4.9/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/gcc-linaro-arm-linux-gnueabihf-4.9/bin/arm-linux-gnueabihf-g++)
# where is the target environment
SET(CMAKE_SYSROOT /var/lib/tftpboot/rootfs )
#SET(CMAKE_LIBRARY_PATH ${CMAKE_SYSROOT}/lib ${CMAKE_SYSROOT}/usr/lib)
#SET(CMAKE_FIND_ROOT_PATH /var/lib/tftpboot/rootfs /opt/gcc-linaro-arm-linux-gnueabihf-4.9/arm-linux-gnueabihf/libc/usr )
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
Такое окружение используется на двух компах: на одном проект собирается, на другом возникают ошибки (выше) с библиотеками.
При перемещении системных библиотеки в локальную директорию библиотек проекта сборка происходит успешно.
Установка переменных CMAKE_LIBRARY_PATH и CMAKE_FIND_ROOT_PATH ничего не дает.
Чего не хватает на втором компе?