JanitorTechnology / dockerfiles

popular development environments as containers
https://hub.docker.com/u/janitortechnology/
53 stars 20 forks source link

[ubuntu-dev] install the latest gcc-6 for all images #185

Closed jankeromnes closed 6 years ago

jankeromnes commented 6 years ago

Should fix #180.

jankeromnes commented 6 years ago

Ok, ubuntu-dev builds and successfully installs gcc-6 and g++-6, but Fennec still uses gcc which links to gcc-5.

We should make gcc point to gcc-6 in the Fennec image with:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6

... or in all images by simply not installing gcc-5 in the first place.

jankeromnes commented 6 years ago

gcc-5 comes from build-essential. @ishitatsuyuki what are your thoughts on:

  1. Replacing build-essential with gcc-6, g++-6, libc6-dev, dpkg-dev, make in order to no longer install gcc-5; versus
  2. Just updating Fennec's alternatives to prefer gcc-6 over gcc-5?
ishitatsuyuki commented 6 years ago

Can I suggest wait until 26th and use Ubuntu 18.04? :P

jankeromnes commented 6 years ago

Why specifically the 26th? Also, maybe let's still fix Fennec build now (it's a really quick change), because maybe migrating to Ubuntu 18.04 will give us a few challenges on some projects.

ishitatsuyuki commented 6 years ago

We have three options:

In the case of backported compiler, may I suggest to install it only in fennec?

jankeromnes commented 6 years ago

Wait for Ubuntu 18.04 release (Chromium's script only support Ubuntu LTS and current)

I think this also implies waiting for 100% of current Janitor projects to support Ubuntu 18.04. Also, Ubuntu 18.04 support in open source projects shouldn't be something rare, otherwise we'll have a lot of troubles adding new projects to Janitor.

Use Ubuntu 17.10

I'd rather not use non-LTS versions (less churn and risk).

In the case of backported compiler, may I suggest to install it only in fennec?

Sure, if you strongly prefer that. Note that all Firefox images will probably start installing GCC 6 soon (see this bug to make ./mach bootstrap install GCC 6). However, maybe we only actually need GCC 6 in Fennec, because we actually use Clang in all other images (and Fennec uses Clang as target compiler, but GCC as host compiler, whatever that means).

jankeromnes commented 6 years ago

New approach: Only install g++-6 and gcc-6 in the Fennec image.

jankeromnes commented 6 years ago

Actually, maybe we don't even need GCC 6: it seems we could just define HOST_CC=clang-6.0 and HOST_CXX=clang++-6.0, as suggested in this bugzilla comment.

@ishitatsuyuki any thoughts on defining these in ubuntu-dev? 😄

ishitatsuyuki commented 6 years ago

That sounds like a good solution.

jankeromnes commented 6 years ago

Fixes Fennec build, and KDE / Rust failures seem unrelated. Merging. 🚀