01-17-2019 08:22 AM
Hello,
I've been struggling for a while know with an issue until I found the source.
I'm compiling c code on a windows machine using the Eclipse by NI and have managed to build many pieces of code and libraries.
I have an opensource library which I would like to use in my code so I've downloaded the source code and used the configure and make commands on the linux RTOS installed on an sbRIO-9607.
I've copied the generated .so file from the device to my windows computer and linked to my code but when I try to compile I get an error of undefined reference to __signgam@GLIBC_2.23.
I've checked the device and indeed as written in the documents the OS uses glibc 2.23 but the libraries which are on my windows OS which came with the eclipse installation and are the same in the oecore-i686-cortexa9-vfpv3-toolchain-5.0 (1).tar use glibc 2.21
Has anyone else encounter such an issue, or have suggestions?
Thank you
Roie
02-13-2019 02:30 PM
Hi Roie,
The version of glibc in the GCC toolchain on ni.com often lags behind the installed version on NI Linux RT controllers. Many glibc symbols are tagged with a version, like the one you encountered here. You therefore cannot load those binaries with a lower glibc. I can offer a couple solutions that might work:
(1) Download a more recent version of the GCC ARM toolchain (http://www.ni.com/download/labview-real-time-module-2018/7813/en/) which contains glibc 2.23. The glibc's in this toolchain will matches NILRT 2018 systems.
(2) Simply build everything with a lower version glibc, E.g. build all these SOs on your desktop using the oecore-i686-cortexa9-vfpv3-toolchain-5.0 toolchain. Glibc is backward compatible, so binaries linked to glibc 2.21 (on your desktop) will safely load in 2.23 (on target).
(3) Similar to (2), but build everything on the controller instead of your desktop. This will link everything to 2.23.
(4, if you're adventurous) Copy the target's filesystem (the whole / directory) to your desktop and use that instead of the sysroot bundled with the toolchain. I would give 1-3 a shot first before venturing down this path!
Regards,
Haris