Building on Centos 7

Skip to first unread message

Tom Hegg

Apr 12, 2021, 6:11:38 PM4/12/21
to discuss-webrtc
Hi, I'm able to build the M89 sources on both Windows and Mac, but running into a problem on Centos 7.  The normal build instructions at work fine until the call to gn:

gn gen out/debug --args="is_debug=true rtc_build_tools=false rtc_include_tests=false rtc_build_examples=true"

/buildroot/webrtc/src/main/webrtc/src/buildtools/linux64/gn: /lib64/ version `GLIBC_2.18' not found (required by /buildroot/webrtc/src/main/webrtc/src/buildtools/linux64/gn)

Centos 7 is on glibc 2.17, and there doesn't appear to be any way to upgrade it without going to Centos 8, which nobody wants to do since Centos 7 even though end-of-life'd will be supported a lot longer that Centos 8.  (If I've got that story right).

I saw a comment in third_party/perfetto/buildtools/ that indicated someone had fixed a similar issue before:

    # On linux this seems to introduce an unwanted glibc 2.18 dependency.
    if (is_android) {
      sources += [ "libcxxabi/src/cxa_thread_atexit.cpp" ]



Dec 16, 2021, 11:42:07 PM12/16/21
to discuss-webrtc
Hi Tom,

Did you able to solve this problem ?

I am also facing the same issue on Centos 7.

Looks  /webrtc/src/buildtools/linux64/gn  is expecting `GLIBC_2.18' version.  

Is it possible to use the older version of  '/buildtools /linux64/gn' to solve this problem ?

Please share your thoughts.


Byoungchan Lee

Dec 17, 2021, 10:26:22 AM12/17/21
to discuss-webrtc

In general, CentOS 7, released 7 years ago, is not supported by Chromium's build ecosystem. gn's Linux pre-build binaries build on Ubuntu 16.04 (glibc 2.23) [1], so it's no wonder these binaries won't work on CentOS 7. You have to build gn from source.

Fortunately, gn itself can be built with a C++17 compliant compiler without any other dependencies. See [2] for details.

You can also take inspiration from the RPM spec of EPEL(Extra Packages for Enterprise Linux) 7. See [3].

Also, if you have other gn related questions, I recommend discussing them at





Dec 20, 2021, 7:22:32 AM12/20/21
to discuss-webrtc
Thank you @  !

After re-building gn from source, I am able to resolve the above error.

But getting the below error after applying 'ninja -C out/Debug webrtc'  command.

../../third_party/llvm-build/Release+Asserts/bin/clang++: /lib64/ version `GLIBC_2.18' not found (required by ./src/third_party/llvm-build/Release+Asserts/bin/../lib/ . 

Do I need to build  'llvm-build' as well on CentOS 7 server ?

Please share your thoughts.
Reply all
Reply to author
0 new messages