title: How do I build a shared object on Ubuntu 20.04 and have it run on Debian 10.x?
body: <p>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.</p>
  <p>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 <code>pow()</code> function to <code>pow@GLIBC_2.2.5</code>. 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++ (<a href="https://packages.ubuntu.com/focal/g++-7" rel="nofollow noreferrer">https://packages.ubuntu.com/focal/g++-7</a>).</p>