Install devtoolset-7 for RHEL 7 derivatives#86
Conversation
|
See #31 -- the difficult bit is persisting the |
|
There is also devtoolset-11 which is newer, and works on CentOS 7 too (I'm using it). devtoolset doesn't modify the PATH on purpose, each package has to opt-in by sourcing the appropriate file. This is not persisted in 'native_c_compiler' output of 'ocamlc -config' because that still refers to 'gcc' (although using older GCC to compile stubs "works", but obviously won't help if the headers themselves want newer compiler). It might be possible to "persist" the devtoolset compiler by overriding CC (and related) flags instead of just extending the PATH, another alternative is to drop a script into This would be similar to how we handle 'eval $(opam env)' in RPM builds: |
This will matter for 5.0 - the |
RHEL 7 and clones (CentOS, Oracle Linux, etc.) have GCC 4.8 which is too old for multicore. It is possible to get GCC 7 via RedHat Software Collections which this PR starts to enable.
Accessing the commands needs some trickery via the
sclcommand (scl enable devtoolset-7 bashgives you a shell with the appropriate tweaks - I haven't looked in enough detail to see if you can persist it).There'd then be the question of whether to have all CentOS 7 and Oracle Linux 7 images using GCC 7 (probably bad - better for the images for the older compilers to use the stock GCC, however old it is) or to build a separate opam image specifically for use by OCaml 5.00.0+ (more work, more space).
Anyway, this is what I'd done so far.