Skip to content
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

build and install gcc 4.9.4 on rhel72 #1157

Closed
wants to merge 1 commit into from
Closed

Conversation

jBarz
Copy link
Contributor

@jBarz jBarz commented Mar 1, 2018

Builds and installs gcc 4.9 which isn't officially supported.
The install could take up to 30 mins.
Must use the following

export PATH=/data/gcc-4.9/bin:$PATH
export LDFLAGS="-Wl,-rpath,$(dirname $(/data/gcc-4.9/bin/gcc --print-file-name libgcc_s.so))"

@jBarz jBarz changed the title add rhel72 to new scripts build and install gcc 4.9.4 on rhel72 Mar 1, 2018
@mhdawson
Copy link
Member

mhdawson commented Mar 1, 2018

Not sure the commit title is quite right as it also adds the parts to install java as well right ?

@mhdawson
Copy link
Member

mhdawson commented Mar 1, 2018

or maybe its just the comment that is incorrect at the start ?

@jBarz
Copy link
Contributor Author

jBarz commented Mar 1, 2018

Hmm, I think java would get installed before this commit. The only new thing installed is gcc

mhdawson

This comment was marked as off-topic.

@mhdawson
Copy link
Member

mhdawson commented Mar 1, 2018

I assume all of the packages being installed are dependencies required for gcc to be compiled right ?

@jBarz
Copy link
Contributor Author

jBarz commented Mar 1, 2018

yea, gcc needs those three dependencies.

mhdawson

This comment was marked as off-topic.

gibfahn

This comment was marked as off-topic.

@jBarz jBarz force-pushed the master branch 6 times, most recently from cfec98f to 59021ba Compare April 5, 2018 18:38
@mhdawson
Copy link
Member

mhdawson commented Apr 5, 2018

As part of testing this out we found a pieces that were missed during the port over from the old ansible scripts. These included setting up the user home directory and ccache. Just running on existing machines is not really a good enough test as it does not validate if something was missed.

@gibfahn could you review again as I think it is ready to land.

gibfahn

This comment was marked as off-topic.

gibfahn

This comment was marked as off-topic.

@jBarz jBarz force-pushed the master branch 2 times, most recently from cbf74b7 to 2eadc17 Compare April 12, 2018 17:40
gibfahn

This comment was marked as off-topic.

@rvagg
Copy link
Member

rvagg commented Apr 13, 2018

devtoolset is available from the SCLo from CentOS, I would have assumed that it would work for RHEL as well.

What we're doing for Node 10 on CentOS 6 & 7 is pull in devtoolset-6, this is being done in both test and release now so we're at gcc-6 level. Thankfully because of the Red Hat hackery the binaries are backward compatible with vanilla CentOS 6 without devtoolset-* installed. I'm about to land those changes here #1223 but they are already active in CI and we are switching between devtoolset-2 for pre-10 (no devtoolset on centos7 for pre-10) and devtoolset-6 for 10+ (for both 6 & 7).

Please be aware that if you're pushing for 4.9.4 you're probably pulling in binutils 2.25 (I think) which isn't going to be enough. The OpenSSL upgrade is introducing some new headaches and we need to have 2.26. See #1229, for EL I've just been assuming that devtoolset-6 gets us out of that tangle, does it not help here?

I currently have a 4.9.4 + binutils 2.28 build for the ARM cross compiler so I know it's possible to munge the two. Just make sure you test as --version and get >=2.26.

@mhdawson
Copy link
Member

mhdawson commented Apr 13, 2018

@rvagg what do you mean by 'not enough' ? I guess its the asm support, if so then is there more impact than slower performance? Just thinking through what happens if we have to fix after the initial 10.x release.

@mhdawson
Copy link
Member

mhdawson commented Apr 13, 2018

In the past I'm we looked for a devtoolset equivalent for our platforms but either did not find one or did not find one with support for s390 and Power. @rvagg have you seen one for those platforms?

@mhdawson
Copy link
Member

mhdawson commented Apr 13, 2018

Testing linuxOne, does look like as is too old

user1@user1-lbuntu:~/.ssh$ ssh test-linuxonecc-rhel72-s390x-1
Last login: Fri Apr 13 14:44:44 2018 from 32.97.110.55
[root@test-linuxonecc-rhel72-s390x-1 ~]# export PATH=/data/gcc-4.9/bin:$PATH
[root@test-linuxonecc-rhel72-s390x-1 ~]# as --version
GNU assembler version 2.25.1-32.base.el7_4.2 

Testing on power also seems like as will also be too old.

iojs@test-osuosl-ubuntu1404-ppc64-le-1:~/build/workspace/node-test-commit-plinux/nodes/ppcle-ubuntu1404$ source build/jenkins/scripts/select-compiler.sh
Setting compiler for Node version 10 on ppc64le
Compiler set to 4.9
iojs@test-osuosl-ubuntu1404-ppc64-le-1:~/build/workspace/node-test-commit-plinux/nodes/ppcle-ubuntu1404$ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `powerpc64le-linux-gnu'.
iojs@test-osuosl-ubuntu1404-ppc64-le-1:~/build/workspace/node-test-commit-plinux/nodes/ppcle-ubuntu1404$ 

@mhdawson
Copy link
Member

@jBarz can you investigate to see what/how we have to do in order to get a later as onto the machine in similar way to gcc where it will only be used for newer versions?

Builds and installs gcc 4.9 which isn't officially supported.
The install could take up to 30 mins.
Must use the following

export PATH=/data/gcc-4.9/bin:$PATH
export LDFLAGS="-Wl,-rpath,$(dirname $(/data/gcc-4.9/bin/gcc --print-file-name libgcc_s.so))"
@jBarz
Copy link
Contributor Author

jBarz commented Apr 13, 2018

Added changes to build and install binutils 2.28.1 in the same location as gcc 4.9.4

@rvagg
Copy link
Member

rvagg commented Apr 16, 2018

sorry for the delay--if you have binutils <2.26 then you won't get asm built into openssl and you won't be able to take advantage of cpu crypto routines, which I assume will be a problem for your platforms? it'll be possible to compile and run with older binutils but you won't get an optimal binary. We're going to have to consider the messaging implications of that .. it's going to be tricky.

@jBarz if dropping in 2.28.1 leads to a 👍 compile then all good! I've taken a similar approach of putting a new binutils with gcc 4.9.4 for the cross-compiler for ARM so we're essentially solving it in the same way.

@mhdawson
Copy link
Member

@rvagg, if we make it good, otherwise I think we'll need something like 'the performance of the initial linxuOne and Linxux on Power builds for 10.x will not be optimal until we update our build tooling'.

@rvagg
Copy link
Member

rvagg commented Apr 17, 2018

@mhdawson you technically have until we upgrade to OpenSSL 1.1.1, and there's no urgency to do that once it's released (as far as I understand), folks might be itching for TLS 1.3 but that's about all we get from 1.1.1 over 1.1.0 in the short term. I think you could use an older binutils and then drop in a newer one and the binaries will work on the same distro-level, so you have some runway to figure that out.

@mhdawson
Copy link
Member

Both the compilers and binutils levels are now upgraded. AIX we still need to figure out but I think we are ok for 10.X

@mhdawson
Copy link
Member

I'm going to ahead and land this on Monday.

mhdawson pushed a commit that referenced this pull request Apr 30, 2018
Builds and installs gcc 4.9 which isn't officially supported.
The install could take up to 30 mins.
Must use the following:

export PATH=/data/gcc-4.9/bin:$PATH
export LD_LIBRARY_PATH="/data/gcc-4.9/lib64:$LD_LIBRARY_PATH"

PR-URL: #1157
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@mhdawson
Copy link
Member

Landed as 0683e99

@nealef
Copy link

nealef commented Jan 29, 2019

In the past I'm we looked for a devtoolset equivalent for our platforms but either did not find one or did not find one with support for s390 and Power. @rvagg have you seen one for those platforms?

You can find the devtoolset for s390x here - we build and maintain a CentOS clone called ClefOS. Also I think RHEL recently also released a subset of the SCLO for s390x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants