I am trying to build a C library, that is internally implemented with C++ 17, that I can compile as a shared object on Ubuntu 20.04 and use in an executable that runs on Debian 10.x. The project is dependent on libsodium.
I got this to work by changing my project to build with g++7 (instead of g++9) and forced symbol versioning to use old glibc functions. For example, I forced the pow() function to pow@GLIBC_2.2.5. Without using symbol versioning, Debian 10.7 reports that there is a glibc 2.29 symbol that is required but missing and that my shared object is at fault. This error was unexpected because I was under the impression that g++7 comes with glibc 2.27 according to the libc6 package that comes with g++ (https://packages.ubuntu.com/focal/g++-7).