0

I am building an application in which the application is using GN and ninja to build files. The application is currently building on Ubuntu 20.04 and I am using clang to compile files. But the issue is when I try to build and execute the executable in Ubuntu 18.04, it is giving me this error:-

./application: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /path/to/lib.so)

So, this basically means that clang is not able to build the files according to the current OS. Is there any flag I need to use to make it work with the current OS? or is there any other to overcome this issue?

  • It looks like you are building on Ubuntu 20 and trying to run on Ubuntu 18. Try to actually build on Ubuntu 18. Maybe a full rebuild is required. – n. m. could be an AI Jul 21 '21 at 06:15
  • @n.1.8e9-where's-my-sharem. I have done a full rebuild but still same error. – Rohit Nagpal Jul 21 '21 at 06:17
  • Normally you build on the oldest OS you want to support. Do you get the error when you build on Ubuntu 18 or on Ubuntu 20? – HolyBlackCat Jul 21 '21 at 06:18
  • @HolyBlackCat I am getting error on Ubuntu 18. For Ubuntu 20, it is working fine. – Rohit Nagpal Jul 21 '21 at 06:20
  • Is **everything** built on Ubuntu 18? All libraries, all object files? – HolyBlackCat Jul 21 '21 at 06:21
  • @HolyBlackCat Yes – Rohit Nagpal Jul 21 '21 at 06:22
  • It appears to not be the case. Try making a VM (possibly a docker) with a fresh Ubuntu 18 and build there. – HolyBlackCat Jul 21 '21 at 06:23
  • @HolyBlackCat I have been using a freshly installed wsl(Ubuntu 18) on my system. Do i need to check on VM also? – Rohit Nagpal Jul 21 '21 at 06:25
  • Yes, I would try it. – HolyBlackCat Jul 21 '21 at 06:32
  • Ubuntu 18 has glibc 2.27. It is next to physically impossible to produce a library that refers to glibc 2.29 if all you have is glibc 2.27. – n. m. could be an AI Jul 21 '21 at 06:35
  • @n.1.8e9-where's-my-sharem. Yeah! I know that, but I have two versions of linux distro installed on wsl and I am trying to build using that. But the thing is application is working on ubuntu 20 but not in ubuntu 18. So, I wanted to see if there is any solution to that. – Rohit Nagpal Jul 21 '21 at 06:37
  • 1
    You claim that you are building everything on Ubuntu 18, but Ubuntu 18 (a fresh install at least) knows nothing about glibc 2.29. Therefore that particular library must have come from elsewhere. We cannot possibly know where it comes from and how, you need to track it down and figure out how on god's green earth it has traveled from the future to your Ubuntu 18 install. We cannot tell you how to fix your Ubuntu 18 build because it doesn't appear to come from that build. – n. m. could be an AI Jul 21 '21 at 06:44
  • 1
    Are you using docker env to build ?? A possibility is that docker could change build env – nhatnq Jul 21 '21 at 07:41

0 Answers0