-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible: use gcc 4.9 on Ubuntu 14.04 #797
Conversation
Thanks for this! Will review. |
@jbergstroem can you remind me if for releases we build with a later compiler or stick to the one supported by the release. I'm just thinking this could affect the compiler on the release machines for PPC and s390 which in turn could affect the binaries for 4.x and 6.x |
I hate to be the bearer of bad news @seishun and @jbergstroem, but I'm pretty sure if you use the |
^ that should be pretty easy to test inside Docker if someone has time, run a 14.04 container and mount your local |
I'm going to be up late waiting on other compiles to finish, so I went ahead and tested this on ec2 nodes. Unfortunately I was correct. You can essentially see the problem from this:
I went ahead and compiled 8.2.1 on a Trusty instance with
So, I don't think using the |
Are Ubuntu 14.04 machines used for building public releases? If they are used just for CI, then why does it matter? |
sorry, should have thought more clearly about this, we build public releases for 8.x+ on CentOS6 using devtoolset3 (I think!), and I don't believe we've had to upgrade the compiler there (have we?) |
CentOS6 machines do indeed require an upgrade too (they use gcc 4.8 I think). I was going to work on that but am blocked by #801. Are release machines separate from CI machines? |
Rebased on master now that #735 has landed. |
(@seishun yes, release machines are separate from test CI machines. They run connected to an instance of Jenkins that's private for releasers and jenkins-admins.) Change seems good, I will run a test. The question about CentOS6 looks pertinent though. We have committed to this table: https://github.com/nodejs/node/blob/master/BUILDING.md#supported-platforms-1 (change to version branches to see the table for other node versions) . So, if we update gcc, will we break support? Even if we add a new machine to build the next semver major version of node, we'll have to keep the old machines until the versions that they build go out of LTS support. Should this PR still land if we can't update CentOS6? |
Can't we? I just built node with gcc 6.3.1 on CentOS 6 (using my PR #809), then moved the binary to a pristine CentOS 6 instance and it ran successfully. |
Tested, this works perfectly. This can land as soon as the issue with compatibility is resolved. @nodejs/build I don't feel qualified to decide about Linux compiler updates alone, can you please take a look? According to @seishun , the update does not break compatibility, but I'm not familiar with all the details. |
Sorry I'm a little late coming back to this thread @seishun and @joaocgreis. I've tested this extensively. Building Node with There are two (really 1.5) concerns here. The 0.5 is the concern about building a binary add-on with an older compiler may have some incompatibility issue due to the C++ ABI not being stable. So if you take those built binaries, put them on say CentOS 6, and then build an add-on there with whatever the native compiler there is, could there be a problem. I've been told by people who know a ton more about compilers than myself that this isn't a concern practically. The other concern is that |
Not an issue according to @bnoordhuis nodejs/node#13466 (comment)
No need to drop 32-bit support I think, we just wouldn't test node on 32-bit CentOS 6. +1 for dropping public 32-bit builds. (Alternatively, we could build 32-bit builds on newer OS, but I suspect that such builds wouldn't work on CentOS 6, which would be kind of confusing) |
Result of WG discussion was that this PR is fine to land, we don't build on Ubuntu so this only affects test boxes. |
@rvagg you said you were going to confirm this, but it sounds like we should be okay here in terms of devtoolset-6 builds running on stock CentOS 6 machines. |
@chrislea are you saying we can't build 32-bit binaries at all with devtoolset-6? |
@gibfahn That is correct. All of the |
@chrislea Could you clarify why this requires dropping support for 32-bit? Looking at https://ci.nodejs.org/job/node-test-commit-linux/12372/, there are a bunch of other 32-bit Linux machines where node is being tested. Among them is Ubuntu 14.04, which definitely can run gcc 4.9.4. |
@seishun sorry I should be more explicit. The current strategy as I understand it for building the released binary tarballs for x86 is to build things on CentOS 6 since that's the "oldest" distro we support. Those binaries will then work on any "newer" distro because we have forward compatibility with So if we're willing to drop support for 32bit CentOS 6 and Debian Wheezy, and also build the 32bit x86 binaries on a different distro than we build the 64bit x86 binaries on, then it can happen. At that point, things are somewhat messier and personally I'd be wondering if it was worth the effort, but I also don't have to do the work to make it all happen so ¯_(ツ)_/¯ . |
So the discussion in the Build WG yesterday was operating under the impression that we could continue to build 32-bit binaries with this change, as we can't we'll have to rethink. I don't think dropping CentOS 6 is likely to just happen, in fact I suspect that dropping 32-bit builds is more likely. I'll be raising a separate issue to discuss that anyway. |
Sounds good @gibfahn, please let me know if there's anything I can do to help. |
@refack status? |
ok, so I've run this on the x64 and x86 machines and merged this commit into master However we have a bunch of non-x machines that I'm not comfortable running this on. I started doing it on the ppc machines but there were too many changes being made (like setting hostname) that make me think that the new ansible scripts haven't been run on those before, so I'm not comfortable pushing forward. Also there's the xgene machines and I'm going to bet that ubuntu-toolchain-r doesn't have a gcc4.9 for arm64 ubuntu14.04 because that's a pretty unique combo (I've had a heap of trouble with Java on these). Plus I'd really like to yank those xgene machines anyway so ignoring them is probably OK for now. So, @mhdawson (or someone else IBM?), how safe do you think it is to run the current ansible scripts against the ppc machines? Is adding the ubuntu-toolchain-r ppa actually going to give us what we need on ppc le & ppc be? Launchpad says that these are built for "powerpc" but is that even what we need? Should we just exclude ppc ubuntu14.04 from all of this? I've had similar problems with the Java stuff I did in #964, I haven't put an arch restriction on that but I'm guessing webupd8 isn't available for ppc either, like it's not for arm64 ubuntu 14.04, I just haven't even bothered running it on those. |
Tossing my $0.02 back in here again (if this is getting annoying somebody please tell me and I'll stop). I don't think using the I am increasingly feeling like it's completely reasonable to just stop shipping 32bit Intel binaries as of Node 9.x. All of the major distros are moving away from even providing 32bit builds, and just discussing it is draining a lot of time for people on the build WG. I'm not saying that I think we should stop supporting 32bit Intel builds. I'm just saying that "supporting" for that arch should simply mean that we make sure the build works and passes tests on newer distros where people don't have to jump through a bunch of hoops just to get a modern compiler toolchain installed and working. I suspect most of the live 32bit Intel things out there that are running Node are devices like NAS appliances and the like, and I've never seen any of them that don't build their own binaries. So as long as we know that Node can be built on a reasonably modern 32bit box, I don't think we're short changing anybody. / $0.02 |
Finally! Thanks for taking the time.
I'm fine with that as long as it's also excluded from CI jobs on master.
Could you clarify how these two statements are related? gcc needs to be updated on 64-bit Ubuntu 14.04 as well. |
@seishun sure, I'll do my best. Using The bit with regard to dropping 32bit builds is because if we only care about 64bit, then we can build 64bit Node with the |
@chrislea According to #797 (comment), Ubuntu 14.04 isn't used for building public releases. |
Ah my bad @seishun! Please disregard that bit. |
@nodejs/build ping... what's the plan with the ppc machines? If gcc isn't going to be upgraded to 4.9.4 or newer on all CI machines (at least on master), then there is no point in upgrading it on any of them. |
So if while we are not 100% on the ansible scripts, I updated the 4 PPCs to GCC4.9, see how this works out.
adding
and for the BE machines
|
Looks good: https://ci.nodejs.org/job/node-test-commit-plinux/13557/ Although making manual changes kind of defeats the purpose of having Ansible scripts... |
@refack I don't think we should have removed 4.8 on the PPC machines, as the requirement for 4.9 only applies to later versions of Node.js and we should be testing/validating with 4.8 on those earlier releases right ? What we need is to have both 4.8 and 4.9 installed so that we can test later versions with 4.9 and earlier versions with 4.8. That is was we are going to need to do on the release machine as well. The problem is that we don't have as many PPC machines so we can't have different ones for each release. |
I had asked @jBarz to look at how we get both the older and the newer compiler on the machines at the same time. |
@refack one more request can I ask that before you do changes like this on the PPC, AIX or zLinux machines you give me a heads up first |
@refack do you have the steps to revert back to 4.8 ? We can figure them out but if you have them on hand because you just updated that would be great. |
Talking with Gibson, he seems to remember that Ben had looked at 4.8 -> 4.9 and it was not going to break compatibility with older systems (even though in many cases an update to the compiler will). I'll talk to Ben to see if that is the case, in which case we may not need to revert. |
@mhdawson Ack. As for 4.8 / 4.9 side-by-side, I had the same thought since my last message (old node version compatibility). It should be easy restore (making 4.9 stand alone was the more tricky part). |
P.S. I only updated the test machines, the release machines were not touched. This way we can verify binary compatibility. |
@refack the issue with Release at 4.8 and test is 4.9 is that things may look ok in the test infra but then fail when we go to do a release.... |
Generally we need to figure out how to have multiple versions of the compiler on the same machine and use the appropriate one for each release. @jBarz is working on that. Was there something that was broken and needed 4.9 right now ? |
Looking at the earlier comments the libstdc++ from 4.9 should be compatible with the one from 4.8 so we don't believe it will affect compatibility. What I'd like to do is
Opened issue #1020 to track |
Currently Ubuntu 14.04 machines use gcc 4.8 while Node.js requires at least gcc 4.9. See #762.
I was originally planning to make changes for all affected platforms in the same PR but it's taking longer than expected.
This PR depends on #735.