Nixpkgs: Fix fallout from GCC 7

Created on 16 Nov 2017  路  27Comments  路  Source: NixOS/nixpkgs

Before merging the gcc-7 branch to master (#27794), let's fix as much as possible beforehand. Here are the current direct failures (i.e. not including failing reverse dependencies) when comparing a gcc-7 evaluation (https://hydra.nixos.org/eval/1430074) to a trunk one (https://hydra.nixos.org/eval/142964):

  • [ ] [aacgain.x86_64-linux](https://hydra.nixos.org/build/68390283)
  • [ ] [ace.x86_64-linux](https://hydra.nixos.org/build/68403097)
  • [ ] [altermime.x86_64-linux](https://hydra.nixos.org/build/68399648)
  • [ ] [ao.x86_64-linux](https://hydra.nixos.org/build/68424337)
  • [ ] [apvlv.x86_64-linux](https://hydra.nixos.org/build/68418585)
  • [ ] [arangodb.x86_64-linux](https://hydra.nixos.org/build/68422203)
  • [ ] [archiveopteryx.x86_64-linux](https://hydra.nixos.org/build/68413338)
  • [ ] [avrbinutils.x86_64-linux](https://hydra.nixos.org/build/68423322)
  • [ ] [avxsynth.x86_64-linux](https://hydra.nixos.org/build/68416156)
  • [ ] [aws-sdk-cpp.x86_64-linux](https://hydra.nixos.org/build/68394995)
  • [ ] [bazel_0_4.x86_64-linux](https://hydra.nixos.org/build/68419514)
  • [ ] [belle-sip.x86_64-linux](https://hydra.nixos.org/build/68424348)
  • [ ] [bip.x86_64-linux](https://hydra.nixos.org/build/68417881)
  • [ ] [blackmagic.x86_64-linux](https://hydra.nixos.org/build/68408938)
  • [ ] [bossa.x86_64-linux](https://hydra.nixos.org/build/68394455)
  • [ ] [bwm_ng.x86_64-linux](https://hydra.nixos.org/build/68420943)
  • [ ] [cbfstool.x86_64-linux](https://hydra.nixos.org/build/68391763)
  • [ ] [ccache.x86_64-linux](https://hydra.nixos.org/build/68397626)
  • [ ] [ckan.x86_64-linux](https://hydra.nixos.org/build/68416190)
  • [ ] [codeblocksFull.x86_64-linux](https://hydra.nixos.org/build/68423856)
  • [ ] [codeblocks.x86_64-linux](https://hydra.nixos.org/build/68412458)
  • [ ] [commandergenius.x86_64-linux](https://hydra.nixos.org/build/68393409)
  • [ ] [cpp_ethereum.x86_64-linux](https://hydra.nixos.org/build/68405763)
  • [ ] [darling-dmg.x86_64-linux](https://hydra.nixos.org/build/68401437)
  • [ ] [dbus_cplusplus.x86_64-linux](https://hydra.nixos.org/build/68391606)
  • [ ] [desmume.x86_64-linux](https://hydra.nixos.org/build/68386825)
  • [ ] [dislocker.x86_64-linux](https://hydra.nixos.org/build/68422032)
  • [ ] [efivar.x86_64-linux](https://hydra.nixos.org/build/68424658)
  • [ ] [fcgiwrap.x86_64-linux](https://hydra.nixos.org/build/68405623)
  • [ ] [flatbuffers.x86_64-linux](https://hydra.nixos.org/build/68409265)
  • [ ] [glm.x86_64-linux](https://hydra.nixos.org/build/68410655)
  • [ ] [glslviewer.x86_64-linux](https://hydra.nixos.org/build/68392931)
  • [ ] [gnokii.x86_64-linux](https://hydra.nixos.org/build/68411987)
  • [ ] [go_1_7.x86_64-linux](https://hydra.nixos.org/build/68421493)
  • [ ] [gosmore.x86_64-linux](https://hydra.nixos.org/build/68418837)
  • [ ] [haskellPackages.clock-extras.x86_64-linux](https://hydra.nixos.org/build/68411995)
  • [ ] [haskellPackages.cpython.x86_64-linux](https://hydra.nixos.org/build/68399931)
  • [ ] [haskellPackages.fsnotify-conduit.x86_64-linux](https://hydra.nixos.org/build/68414143)
  • [ ] [haskellPackages.hw-rankselect-base.x86_64-linux](https://hydra.nixos.org/build/68396166)
  • [ ] [haskellPackages.inline-r.x86_64-linux](https://hydra.nixos.org/build/68391321)
  • [ ] [haskellPackages.kazura-queue.x86_64-linux](https://hydra.nixos.org/build/68405170)
  • [ ] [haskellPackages.powerqueue-distributed.x86_64-linux](https://hydra.nixos.org/build/68402663)
  • [ ] [hexcurse.x86_64-linux](https://hydra.nixos.org/build/68394123)
  • [ ] [ht.x86_64-linux](https://hydra.nixos.org/build/68422306)
  • [ ] [ispc.x86_64-linux](https://hydra.nixos.org/build/68398318)
  • [ ] [itk.x86_64-linux](https://hydra.nixos.org/build/68408954)
  • [ ] [jdk7.x86_64-linux](https://hydra.nixos.org/build/68393977)
  • [ ] [jre7.x86_64-linux](https://hydra.nixos.org/build/68397946)
  • [ ] [k3d.x86_64-linux](https://hydra.nixos.org/build/68418063)
  • [ ] [kmsxx.x86_64-linux](https://hydra.nixos.org/build/68418659)
  • [ ] [kore.x86_64-linux](https://hydra.nixos.org/build/68408112)
  • [ ] [libcdio082.x86_64-linux](https://hydra.nixos.org/build/68420938)
  • [ ] [libdynd.x86_64-linux](https://hydra.nixos.org/build/68415737)
  • [ ] [libffado.x86_64-linux](https://hydra.nixos.org/build/68387563)
  • [ ] [libgcrypt_1_5.x86_64-linux](https://hydra.nixos.org/build/68416864)
  • [ ] [libgroove.x86_64-linux](https://hydra.nixos.org/build/68424973)
  • [ ] [libjack2.x86_64-linux](https://hydra.nixos.org/build/68412001)
  • [ ] [libmemcached.x86_64-linux](https://hydra.nixos.org/build/68395049)
  • [ ] [libmwaw.x86_64-linux](https://hydra.nixos.org/build/68409947)
  • [ ] [libreswan.x86_64-linux](https://hydra.nixos.org/build/68422236)
  • [ ] [libs3.x86_64-linux](https://hydra.nixos.org/build/68415049)
  • [ ] [libsemanage.x86_64-linux](https://hydra.nixos.org/build/68410673)
  • [ ] [libunique.x86_64-linux](https://hydra.nixos.org/build/68413158)
  • [ ] [libwhereami.x86_64-linux](https://hydra.nixos.org/build/68419966)
  • [ ] [libwps.x86_64-linux](https://hydra.nixos.org/build/68419112)
  • [ ] [lightstep-tracer-cpp.x86_64-linux](https://hydra.nixos.org/build/68414721)
  • [ ] [linuxPackages_4_14.evdi.x86_64-linux](https://hydra.nixos.org/build/68406507)
  • [ ] [linuxPackages_4_4.usbip.x86_64-linux](https://hydra.nixos.org/build/68389583)
  • [ ] [linuxPackages_4_9.evdi.x86_64-linux](https://hydra.nixos.org/build/68390400)
  • [ ] [linuxPackages_4_9.usbip.x86_64-linux](https://hydra.nixos.org/build/68391222)
  • [ ] [linuxPackages.evdi.x86_64-linux](https://hydra.nixos.org/build/68386909)
  • [ ] [linuxPackages_hardened.evdi.x86_64-linux](https://hydra.nixos.org/build/68420801)
  • [ ] [linuxPackages_latest.evdi.x86_64-linux](https://hydra.nixos.org/build/68414739)
  • [ ] [linuxPackages_latest_xen_dom0.evdi.x86_64-linux](https://hydra.nixos.org/build/68424475)
  • [ ] [linuxPackages_samus_4_12.evdi.x86_64-linux](https://hydra.nixos.org/build/68406509)
  • [ ] [linuxPackages_samus_latest.evdi.x86_64-linux](https://hydra.nixos.org/build/68402638)
  • [ ] [linuxPackages_testing_bcachefs.evdi.x86_64-linux](https://hydra.nixos.org/build/68421334)
  • [ ] [linuxPackages_testing_bcachefs.usbip.x86_64-linux](https://hydra.nixos.org/build/68398103)
  • [ ] [linuxPackages.usbip.x86_64-linux](https://hydra.nixos.org/build/68423877)
  • [ ] [lldb_4.x86_64-linux](https://hydra.nixos.org/build/68405439)
  • [ ] [lldb.x86_64-linux](https://hydra.nixos.org/build/68401163)
  • [ ] [llvmPackages.lldb.x86_64-linux](https://hydra.nixos.org/build/68390133)
  • [ ] [mediastreamer.x86_64-linux](https://hydra.nixos.org/build/68411620)
  • [ ] [meshlab.x86_64-linux](https://hydra.nixos.org/build/68418941)
  • [ ] [mi2ly.x86_64-linux](https://hydra.nixos.org/build/68417665)
  • [ ] [mp4v2.x86_64-linux](https://hydra.nixos.org/build/68395018)
  • [ ] [mps.x86_64-linux](https://hydra.nixos.org/build/68419593)
  • [ ] [mstflint.x86_64-linux](https://hydra.nixos.org/build/68396511)
  • [ ] [multimc.x86_64-linux](https://hydra.nixos.org/build/68408788)
  • [ ] [mysql55.x86_64-linux](https://hydra.nixos.org/build/68392635)
  • [ ] [mysql57.x86_64-linux](https://hydra.nixos.org/build/68390858)
  • [ ] [netsurf.libcss.x86_64-linux](https://hydra.nixos.org/build/68404444)
  • [ ] [ntopng.x86_64-linux](https://hydra.nixos.org/build/68391236)
  • [ ] [oathToolkit.x86_64-linux](https://hydra.nixos.org/build/68414812)
  • [ ] [opal.x86_64-linux](https://hydra.nixos.org/build/68389209)
  • [ ] [openimageio.x86_64-linux](https://hydra.nixos.org/build/68406841)
  • [ ] [openjdk7.x86_64-linux](https://hydra.nixos.org/build/68415932)
  • [ ] [openmvg.x86_64-linux](https://hydra.nixos.org/build/68387364)
  • [ ] [openmvs.x86_64-linux](https://hydra.nixos.org/build/68402781)
  • [ ] [openocd.x86_64-linux](https://hydra.nixos.org/build/68415087)
  • [ ] [openpts.x86_64-linux](https://hydra.nixos.org/build/68388399)
  • [ ] [partio.x86_64-linux](https://hydra.nixos.org/build/68422597)
  • [ ] [percona-server56.x86_64-linux](https://hydra.nixos.org/build/68391359)
  • [ ] [percona-server.x86_64-linux](https://hydra.nixos.org/build/68403796)
  • [ ] [python27Packages.kmsxx.x86_64-linux](https://hydra.nixos.org/build/68391915)
  • [ ] [python27Packages.pypeg2.x86_64-linux](https://hydra.nixos.org/build/68407185)
  • [ ] [python27Packages.pytorch.x86_64-linux](https://hydra.nixos.org/build/68405169)
  • [ ] [python27Packages.scrapy.x86_64-linux](https://hydra.nixos.org/build/68393992)
  • [ ] [python36Packages.joblib.x86_64-linux](https://hydra.nixos.org/build/68387168)
  • [ ] [python36Packages.kmsxx.x86_64-linux](https://hydra.nixos.org/build/68394020)
  • [ ] [python36Packages.pytorch.x86_64-linux](https://hydra.nixos.org/build/68394590)
  • [ ] [qpid-cpp.x86_64-linux](https://hydra.nixos.org/build/68395161)
  • [ ] [qsyncthingtray.x86_64-linux](https://hydra.nixos.org/build/68405006)
  • [ ] [rapidjson.x86_64-linux](https://hydra.nixos.org/build/68406250)
  • [ ] [ripmime.x86_64-linux](https://hydra.nixos.org/build/68405283)
  • [ ] [rogue.x86_64-linux](https://hydra.nixos.org/build/68416407)
  • [ ] [rush.x86_64-linux](https://hydra.nixos.org/build/68407859)
  • [ ] [securefs.x86_64-linux](https://hydra.nixos.org/build/68423368)
  • [ ] [snabb.x86_64-linux](https://hydra.nixos.org/build/68423052)
  • [ ] [squishyball.x86_64-linux](https://hydra.nixos.org/build/68414957)
  • [ ] [torque.x86_64-linux](https://hydra.nixos.org/build/68396836)
  • [ ] [ufraw.x86_64-linux](https://hydra.nixos.org/build/68420322)
  • [ ] [usbredir.x86_64-linux](https://hydra.nixos.org/build/68412007)
  • [ ] [v8_static.x86_64-linux](https://hydra.nixos.org/build/68420248)
  • [ ] [v8.x86_64-linux](https://hydra.nixos.org/build/68415583)
  • [ ] [vxl.x86_64-linux](https://hydra.nixos.org/build/68410234)
  • [ ] [wxhexeditor.x86_64-linux](https://hydra.nixos.org/build/68391005)
  • [ ] [wyrd.x86_64-linux](https://hydra.nixos.org/build/68392908)
  • [ ] [xgboost.x86_64-linux](https://hydra.nixos.org/build/68417313)
  • [ ] [yap.x86_64-linux](https://hydra.nixos.org/build/68402877)
sprintable

Most helpful comment

Yeah, PR of that is the right thing. I think the typical spelling is of the flag is -Wno-error=implicit-fallthrough though.

For extra points, you can report it upstream.

All 27 comments

Semi off-topic: what does gcc-7 bring? As in features, benefits for us.

Removed gcj support ;-) Seriously, I don't know of anything particularly interesting to nixpkgs, but there are lots of "smaller" improvements: https://gcc.gnu.org/gcc-7/changes.html

I think the new cross stuff means we can get rid of avrbintools.

/cc @Ericson2314

Well to be fair, the cross stuff for is currently not working until more is merged, but I suppose there's little point fixing that and additionally the one-off AVR stuff once GCC 7 is the default.

apt-cacher-ng has been resolved in #31924. Someone please tick the checkbox :-)

tvheadend was fixed with 9e44d34be28a270fd68161e96e335f4d6e2ba6fc

PR #32038 fixes nginx, nginxShibboleth &nginxStable

gcc-7.3 got released upstream, fixing many bugs, but probably (almost) none of those build failures...

@dezgeg Could you re-run your tests against a branch based off current master?

I would be interested in what is still open and would potentially try to fix the remaining packages before 18.03.

I merged master and pushed to gcc-7 with several conflicts. Let's hope I didn't mess up.

Will diff https://hydra.nixos.org/eval/1429098 vs https://hydra.nixos.org/eval/1429091 once it has built.

@dezgeg: FYI I can't see the 7.3 gcc version bump in the gcc-7 branch. Maybe you want to pull https://github.com/NixOS/nixpkgs/commit/2f83f52ab86fd5d7ac2c63da9969107bb5ece883 ?

I merged the current master with gcc 7.3.0 into the gcc-7 branch and triggered another evaluation.

@dezgeg Do you know why the nixos:gcc-7 job on Hydra is configured to evaluate pkgs/top-level/release.nix instead of nixos/release.nix. I'd like to change that to see if how the nixos tests are doing.

Updated the list.

I didn't create the jobset, someone else did. But I personally wouldn't mind if you change it to the nixos one.

It was probably me. IIRC I wanted to have at least one evaluation with other platforms (e.g. Darwin), but recently I removed Darwin from there (temporarily?) due to being overloaded on Hydra.

We might be close to a mergeable state now: https://hydra.nixos.org/eval/1434126?filter=x86_64-linux&compare=1433915&full= (still waiting for a few thousand builds from aarch64 and darwin)

A large fraction is caused by a lisp wrapper failing, and I've seen the error appear and disappear on master already.

Ah right, I used stdenv.shell until not using arrays became too annoying, and forgot to switch to bash. Pushed a fix to master for now.

~Oh, I see, it seems the build slave called "hydra" still has bad /bin/sh, as the build happened just two days ago. @edolstra: is it easy to fix?~

Hmm, this case probably wasn't related to the /bin/sh impurities.

Actually, the second script that sources did have #!/bin/sh shebang. And probably stdenv.shell was fine and I just overreacted.

Some more fixes have landed, and last parts of the tested job are finishing now. Hydra regression is notable IMHO, but on the whole: last call before merging to master!

Hydra shows under two hundred build-time regressions for x86_64-linux, roughly the same set for aarch64-linux and almost none for x86_64-darwin. That seems reasonable to me; the rest should be possible to handle directly on master, for packages with enough interest.

Tested jobs succeeded :tada: except for ipv6 test which is broken on master.

Bisecting lead me to ca8aa5dc877 (Use GCC 7 by default) and this issue.
gcc7 broke fcgiwrap by defaulting to -Werror=implicit-fallthrough, which trips on a false-positive during error handling.
It builds again after NIX_CFLAGS_COMPILE = "-Werror=implicit-fallthrough=0";. Should I PR this, or is there a better fix?

Yeah, PR of that is the right thing. I think the typical spelling is of the flag is -Wno-error=implicit-fallthrough though.

For extra points, you can report it upstream.

Ah, -W...=0 disabled the warning entirely, -Wno-error=... just makes it not fail the build while still displaying it. I'll send a PR later. Thank you! :)

Upstream seems dead-ish (2015).

Let's close this ticket. Almost all is solved now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

retrry picture retrry  路  3Comments

rzetterberg picture rzetterberg  路  3Comments

tomberek picture tomberek  路  3Comments

domenkozar picture domenkozar  路  3Comments

langston-barrett picture langston-barrett  路  3Comments