Building v8 5.9 on Centos 6

240 views
Skip to first unread message

Chris Hillery

unread,
Sep 7, 2017, 1:27:12 AM9/7/17
to v8-users
I've seen several earlier threads on variants of this problem, but none of the solutions appear to work any more as they were for older versions of v8, or because depot_tools has moved on, or both.

I need to build v8 5.9 for Centos 6. The big problem is that Centos 6 uses glibc 2.12, which is quite ancient, and all of the tools that are downloaded by the v8 build process are built using newer versions of glibc. This includes gn and clang in particular, but also the binutils tools. About the only thing that does work as expected is gclient.

The closest I've gotten so far is attempting to use the older gyp method, which at least bypasses gn. I believe I could also build gn for Centos 6, although it's challenging.

I can also request it not to use the built-in clang - the Centos 6 image I am using does have gcc 4.8.2 installed which should be good enough. However when not using clang, it is also necessary to skip the built-in sysroot. When I do that, I get errors about glib-2.0, gmodule-2.0, and other packages I don't recognize not being available.

Basically I'm wondering if there are any ways forward, in particular if anyone has successfully traveled this road already. Is v8 no longer officially supported for Centos / Red Hat 6? Are there any ways to get the older versions of the tools from days when v8 was built for Centos 6? (I assume those days existed at some point...)

Thanks,
Ceej
aka Chris Hillery

Zac Hansen

unread,
Sep 7, 2017, 1:43:33 AM9/7/17
to v8-users
It looks like it's a git repo, I would guess you be able to just check out the tools that were available at the same time as the version of V8 that you want to build?

--Zac

Chris Hillery

unread,
Sep 7, 2017, 1:49:41 AM9/7/17
to v8-users
The binary tools aren't in git; they're downloaded by various other build scripts.

I have tried rolling depot_tools back to an earlier time, but most of the problematic tools (clang, binutils, sysroot) aren't actually from there; they're from other projects embedded in v8 source code.

I've also tried rolling back the v8/build git repo to a time when it checked out a Debian wheezy sysroot, rather than Debian jessie sysroot. However even wheezy used glibc 2.14, so those tools still didn't work on Centos 6. I don't see any time in git history where the sysroot was any older than wheezy, which makes me wonder how this build *ever* worked on Centos 6.

Jakob Kummerow

unread,
Sep 7, 2017, 1:08:27 PM9/7/17
to v8-users
All old versions of all tools should still be available. However, it's possible that they won't solve your problem: e.g. when you use a compiler that's old enough to run on CentOS 6, then it will probably be too old to support the C++11 features that V8 uses nowadays.

Your best bet is probably to use the GYP build and the system toolchain (as opposed to the bundled clang/sysroot) and figure out what the names of the required CentOS packages are.

Regarding "official support": we never claimed to officially support all Linux distros/versions. We currently target Ubuntu Trusty (14.04 LTS); newer versions should work, older versions are down to their own luck. As you have discovered on this mailing list, RedHat/CentOS have traditionally been problematic due to shipping much older system libraries than Ubuntu LTS.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Hillery

unread,
Sep 8, 2017, 5:57:48 AM9/8/17
to v8-users
Thanks for the reply, Jakob. As I mentioned, I do have gcc 4.8.2 already running on Centos 6, which should be new enough to build v8 5.9, correct?

Jakob Kummerow

unread,
Sep 8, 2017, 2:45:46 PM9/8/17
to v8-users
GCC 4.8.4 definitely works, so 4.8.2 is probably fine too.

On Fri, Sep 8, 2017 at 2:57 AM, Chris Hillery <ce...@lambda.nu> wrote:
Thanks for the reply, Jakob. As I mentioned, I do have gcc 4.8.2 already running on Centos 6, which should be new enough to build v8 5.9, correct?

--
Reply all
Reply to author
Forward
0 new messages