I was able to compile the last GLIBC following the steps suggested by @Alex-Kosh, and as @enthusiasticgeek mentioned, ldd didnt reflect the change even after rebooting, what I had to do was to setup LD_LIBRARY_PATH in a command prompt to test it, however in Ubuntu 18.04 and GLIBC 2.34, I am getting Segmentation fault (core dumped).
$ export LD_LIBRARY_PATH=/opt/glibc-2.34/lib:$LD_LIBRARY_PATH
$ ldd --version | head -n1
Segmentation fault (core dumped)