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

[ML] Upgrade the compiler used on Linux #2

Merged
merged 5 commits into from
Mar 9, 2018
Merged

[ML] Upgrade the compiler used on Linux #2

merged 5 commits into from
Mar 9, 2018

Conversation

droberts195
Copy link
Contributor

We have already upgraded the macOS and Windows compilers on the master
branch. This change upgrades the Linux compiler.

The new compiler is gcc 7.3, upgraded from gcc 6.2. The OS used to
build releases is also upgraded, to CentOS 6 from Fedora 10.

gcc 7.3 is built from source with the --enable-vtable-verify option so
that the -fvtable-verify=std option could possibly be used in the future.

Finally, the -std flag has been changed to allow C++14 features to be
used. This matches macOS and Windows. However, for ease of backporting
it is best that we don't use C++14 features until version 6.x is nearing
end-of-life.

We have already upgraded the macOS and Windows compilers on the master
branch.  This change upgrades the Linux compiler.

The new compiler is gcc 7.3, upgraded from gcc 6.2.  The OS used to
build releases is also upgraded, to CentOS 6 from Fedora 10.

gcc 7.3 is built from source with the --enable-vtable-verify option so
that the -fvtable-verify=std option could possibly be used in the future.

Finally, the -std flag has been changed to allow C++14 features to be
used.  This matches macOS and Windows.  However, for ease of backporting
it is best that we don't use C++14 features until version 6.x is nearing
end-of-life.
@droberts195
Copy link
Contributor Author

droberts195 commented Feb 23, 2018

When this is merged the Jenkins slave for the master branch will need to be swapped. The new CentOS 6 slave is ready to go and I tested that it works on this branch in my fork.

I'll wait for @hendrikmuhs to update his Linux machine before merging this.

@@ -48,22 +48,27 @@ The `CXX` environment variable only needs to be set when building tools on Linux

We have to build on old Linux versions to enable our software to run on the older versions of Linux that users have. However, this means the default compiler on our Linux build servers is also very old. To enable use of more modern C++ features, we use the default compiler to build a newer version of gcc and then use that to build all our other dependencies.

Download `gcc-6.2.0.tar.bz2` from <http://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2>.
Download `gcc-7.3.0.tar.bz2` from <http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.bz2>.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link does not work for me, looks like they removed bz2 archives.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I changed it to the .gz one instead.

(I also removed a reference to YaST in the same file, as I think nobody uses that any more.)

(Also removed a reference to YaST)
@hendrikmuhs
Copy link

the link for apr is broken as well, they upped the version to 1.5.3, just changing the version should work.

@hendrikmuhs hendrikmuhs closed this Mar 8, 2018
@hendrikmuhs hendrikmuhs reopened this Mar 8, 2018
@hendrikmuhs
Copy link

sorry, wrong button

@droberts195
Copy link
Contributor Author

I changed the APR download links to match what we use in the Docker setup (which is what we ship).

@hendrikmuhs
Copy link

hendrikmuhs commented Mar 9, 2018

I worked through it.

For some reasons I had some problems with builtin expat of apr utils. I succeeded to compile it using the system expat. This should work, if not I will further investigate.

As a final suggestion:

After compiling gcc, it should be mentioned that you have to switch to the environment mentioned in the very beginning. Otherwise you (I did) easily forget when working through this document.

@droberts195
Copy link
Contributor Author

Thanks @hendrikmuhs. I pushed another commit that adds a note about reseting CXX after building gcc.

As for using the built in expat of APR utils, it built fine with the built in expat in our Docker container and on our Jenkins build VMs. For a personal development laptop it really doesn't matter either way. It's probably not worth putting any effort into finding out what the problem was unless it starts to affect many people.

Copy link

@hendrikmuhs hendrikmuhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@droberts195 droberts195 merged commit ad634ff into elastic:master Mar 9, 2018
@droberts195 droberts195 deleted the upgrade_linux_compiler branch March 9, 2018 16:16
@sophiec20 sophiec20 changed the title Upgrade the compiler used on Linux [ML] Upgrade the compiler used on Linux Mar 28, 2018
@sophiec20 sophiec20 added the :ml label Apr 4, 2018
droberts195 added a commit that referenced this pull request Apr 23, 2018
We have already upgraded the macOS and Windows compilers on the master
branch.  This change upgrades the Linux compiler.

The new compiler is gcc 7.3, upgraded from gcc 6.2.  The OS used to
build releases is also upgraded, to CentOS 6 from Fedora 10.

gcc 7.3 is built from source with the --enable-vtable-verify option so
that the -fvtable-verify=std option could possibly be used in the future.

Finally, the -std flag has been changed to allow C++14 features to be
used.  This matches macOS and Windows.  However, for ease of backporting
it is best that we don't use C++14 features until version 6.x is nearing
end-of-life.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants