My application links to libraries which are built on RHEL 6. When I compile this application on RHEL 7 linker throws errors for glibc version. Following is one of the error :
undefined reference to symbol '__tls_get_addr@@GLIBC_2.12' /lib64/ld-linux-x86-64.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
For fixing I copied libc and libm from RHEL 6 to RHEL 7 and linked to these along with libc and libm from RHEL 7. Will it cause issue at runtime if I copy libc and libm from RHEL 6 to RHEL 7? Any other way to get away with such issues?
Thanks, Mangesh Sawant.