Building on Centos 7

159 views
Skip to first unread message

Tom Hegg

unread,
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 webrtc.github.io 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/libc.so.6: 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/BUILD.gn 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" ]
    }




Thanks,
Tom

Rajanikanth

unread,
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.

Thanks,
RK.

Byoungchan Lee

unread,
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 https://groups.google.com/a/chromium.org/g/gn-dev.


[1] https://source.chromium.org/gn/gn/+/281ba2c91861b10fec7407c4b6172ec3d4661243:infra/config/main.star;l=98

[2] https://gn.googlesource.com/gn/

[3] https://src.fedoraproject.org/rpms/chromium/blob/ec9d3bbd9e32e4f9d16ccd39eb7f52a9ae0a8ef6/f/chromium.spec#_1507

RK

unread,
Dec 20, 2021, 7:22:32 AM12/20/21
to discuss-webrtc
Thank you @ chic...@gmail.com  !

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/libc.so.6: version `GLIBC_2.18' not found (required by ./src/third_party/llvm-build/Release+Asserts/bin/../lib/libstdc++.so.6) . 

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

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