Am performing ARM cross compilation on x86 and i have a tool chain like below :
SET(CMAKE_SYSTEM_NAME Linux)
include(CMakeForceCompiler)
SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)`
I have written own script to cross compile my code to generate binaries. Inside my script, I have installed following tools:
apt-get install -y debootstrap build-essential cmake libssl-dev:armhf gcc-arm-linux* g++-arm-linux* openssl:armhf libssl-dev:armhf curl:armhf libcurl4-gnutls-dev:armhf libtirpc-dev:armhf
I have openssl 1.1.1f installed on my ubuntu 18.04 OS, While running my script, I get below error:
libcrypto.so: undefined reference to `fcntl@GLIBC_2.28'
NOTE : This libcrypto.so library is built by me on ubuntu 20.04 and now cross compilation is done on ubuntu 18.04
Your libcrypto.so is making a reference to a function from glibc (the basic library for everything) version 2.28, which was present during your build on 20.04, but now you're building on 18.04 with a different, incompatible version of glibc.
The path of least resistance is probably to rebuild openssl with your current toolchain.