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

gcc 10.1.0 #54364

Closed
wants to merge 52 commits into from
Closed

gcc 10.1.0 #54364

wants to merge 52 commits into from

Conversation

fxcoudert
Copy link
Member

@bayandin
Copy link
Member

bayandin commented May 7, 2020

On Mojave (10.14):

libtool: compile:  /private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/./gcc/xgcc -shared-libgcc -B/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/./gcc -nostdinc++ -L/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/src -L/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/src/.libs -L/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/libsupc++/.libs -B/usr/local/Cellar/gcc/10.1.0/x86_64-apple-darwin18/bin/ -B/usr/local/Cellar/gcc/10.1.0/x86_64-apple-darwin18/lib/ -isystem /usr/local/Cellar/gcc/10.1.0/x86_64-apple-darwin18/include -isystem /usr/local/Cellar/gcc/10.1.0/x86_64-apple-darwin18/sys-include -fno-checking -I/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/libstdc++-v3/../libgcc -I/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/include/x86_64-apple-darwin18 -I/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/include -I/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/libstdc++-v3/libsupc++ -std=gnu++17 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=cow-fs_ops.lo -fimplicit-templates -g -O2 -c ../../../../../libstdc++-v3/src/c++17/cow-fs_ops.cc  -fno-common -DPIC -D_GLIBCXX_SHARED -o cow-fs_ops.o
In file included from ../../../../../libstdc++-v3/src/c++17/fs_dir.cc:30:
/private/tmp/gcc-20200507-28842-210ql0/gcc-10.1.0/build/x86_64-apple-darwin18/libstdc++-v3/include/filesystem:44:10: fatal error: bits/fs_fwd.h: No such file or directory
   44 | #include <bits/fs_fwd.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

And also

==> brew audit --skip-style gcc --online
==> FAILED
Error: 2 problems in 1 formula detected
gcc:
  * Formula has other versions so create a versioned alias:
      cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases
      ln -s ../Formula/gcc.rb [email protected]
  * Formula has invalid versioned aliases:
      gcc@9

@bayandin
Copy link
Member

bayandin commented May 8, 2020

And fails on Catalina (most of them requires a revision bump):

brew audit --skip-style gcc --online
brew linkage --test abyss
brew linkage --test adios2
brew linkage --test arpack
brew linkage --test augustus
brew linkage --test cgns
brew linkage --test cp2k
brew linkage --test dungeon
brew linkage --test dynare
brew linkage --test eccodes
brew linkage --test fastme
brew linkage --test fftw
brew linkage --test gromacs
brew linkage --test hdf5
brew linkage --test [email protected]
brew linkage --test [email protected]
brew linkage --test ipopt
brew linkage --test json-fortran
brew linkage --test kahip
brew linkage --test kim-api
brew linkage --test lapack
brew linkage --test libxc
brew linkage --test mpich
brew linkage --test netcdf
brew linkage --test nwchem
brew linkage --test octave
brew linkage --test open-mpi
brew linkage --test openblas
brew linkage --test openfast
brew linkage --test openkim-models
brew linkage --test packmol
brew linkage --test petsc
brew linkage --test petsc-complex
brew linkage --test pgplot
brew linkage --test plplot
brew linkage --test pnetcdf
brew linkage --test qrupdate
brew linkage --test r
brew linkage --test reprepro
brew linkage --test root
brew linkage --test scalapack
brew linkage --test scipy
brew test --verbose abyss
brew test --verbose adios2
brew test --verbose arcade-learning-environment
brew test --verbose armadillo
brew test --verbose arpack
brew test --verbose astrometry-net
brew test --verbose aubio
brew test --verbose augustus
brew test --verbose biosig
brew test --verbose caffe
brew test --verbose ceres-solver
brew test --verbose cgns
brew test --verbose clp
brew test --verbose coinutils
brew test --verbose cp2k
brew test --verbose csound
brew test --verbose dungeon
brew test --verbose dynare
brew test --verbose fastme
brew test --verbose fftw
brew test --verbose gmt
brew test --verbose gmt@5
brew test --verbose gnuradio
brew test --verbose graph-tool
brew test --verbose gromacs
brew test --verbose imake
brew test --verbose ipopt
brew test --verbose json-fortran
brew test --verbose kahip
brew test --verbose lammps
brew test --verbose lapack
brew test --verbose libbi
brew test --verbose mlpack
brew test --verbose mpich
brew test --verbose netcdf
brew test --verbose numpy
brew test --verbose [email protected]
brew test --verbose nwchem
brew test --verbose octave
brew test --verbose open-mpi
brew test --verbose openblas
brew test --verbose opencoarrays
brew test --verbose opencv
brew test --verbose opencv@2
brew test --verbose opencv@3
brew test --verbose openfast
brew test --verbose packmol
brew test --verbose petsc
brew test --verbose petsc-complex
brew test --verbose pgplot
brew test --verbose pnetcdf
brew test --verbose proteinortho
brew test --verbose qrupdate
brew test --verbose r
brew test --verbose rawtoaces
brew test --verbose reprepro
brew test --verbose scipy
brew test --verbose shogun
brew test --verbose siril
brew test --verbose superlu
brew test --verbose urh

@oscarbg
Copy link

oscarbg commented May 8, 2020

hope can be fixed soon.. waiting for new static analyzer..

@fxcoudert
Copy link
Member Author

The Mojave failure is a semi-random parallel-build issue (sadly). Hopefully it won't trigger on the next build.

@alebcay
Copy link
Member

alebcay commented May 9, 2020

imake still needs revision bump:

==> brew test --verbose imake
==> FAILED
Testing imake
/usr/bin/sandbox-exec -f /private/tmp/homebrew20200509-29646-kcbvmt.sb ruby -W0 -I $LOAD_PATH -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/imake.rb --verbose
==> /usr/local/Cellar/imake/1.0.8_1/bin/imake -v -s/dev/null -f/dev/null -T/dev/null 2>&1
Error: imake: failed
An exception occurred within a child process:
  Test::Unit::AssertionFailedError: </\/usr\/local\/opt\/gcc\/bin\/cpp\-1/> was expected to be =~
<"/usr/local/opt/gcc/bin/cpp-9 -I. -D__amd64__ -D__amd64__ -traditional -D__APPLE__ -D__DARWIN__ Imakefile.c \n" +
"/usr/local/Cellar/imake/1.0.8_1/bin/imake: No such file or directory\n" +
"/usr/local/Cellar/imake/1.0.8_1/bin/imake: Cannot exec /usr/local/opt/gcc/bin/cpp-9.\n" +
"  Stop.\n" +
"/usr/local/Cellar/imake/1.0.8_1/bin/imake: Exit code 1.\n" +
"  Stop.\n">.

Homebrew internals also might need some adjustment for gcc 10:

==> Running Formulae#formula!(openblas)
Error: undefined method `gcc-1_build_version' for DevelopmentTools:Class
/usr/local/Homebrew/Library/Homebrew/compilers.rb:142:in `compiler_version'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:121:in `block (2 levels) in find_compiler'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:119:in `reverse_each'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:119:in `block in find_compiler'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:116:in `each'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:116:in `find_compiler'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:101:in `compiler'
/usr/local/Homebrew/Library/Homebrew/compilers.rb:84:in `select_for'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:242:in `install_gcc_if_needed'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:600:in `formula!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:20:in `block in run!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:19:in `each'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/tests/formulae.rb:19:in `run!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:94:in `run_tests'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:35:in `block in run!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:25:in `each'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_runner.rb:25:in `run!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/lib/test_bot.rb:95:in `run!'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/test-bot.rb:74:in `test_bot'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'

@Bo98
Copy link
Member

Bo98 commented May 9, 2020

brew received preliminary support for GCC 10, but not all cases were tested because GCC 10 wasn't released yet (support was needed as Fedora 32 shipped with GCC 10 despite it not being released). The above error is specific to using GCC 10 from a formula.

I've fixed the error here: Homebrew/brew#7528

version_suffix needs to also be modified in the GCC formula similarly to slice \d+ rather than \d.

(Also: should we add gcc@9 versioned formula here?)

@SMillerDev
Copy link
Member

Also: should we add gcc@9 versioned formula here?

Only if it's needed for homebrew formula.

@Bo98
Copy link
Member

Bo98 commented May 9, 2020

Or someone inevitably asks for it.

@fxcoudert
Copy link
Member Author

should we add gcc@9 versioned formula here?

I am not sure what the current criteria are, and whether they changed from before. But GCC 9 is supported, and historically older versions of GCC have large numbers of downloads. I would argue it makes sense to carry it, because it is very useful to users (especially given the high time and disk requirements of building one's own compiler from source).

@Bo98
Copy link
Member

Bo98 commented May 9, 2020

The requirements are the same as far as I know. The only thing new is that we have a deprecation system now, but that can't be applied here since there isn't a specific EOL date yet.

@fxcoudert
Copy link
Member Author

fxcoudert commented May 9, 2020

⚠️ This should be not be merged until a new brew is shipped with Homebrew/brew#7528 in

@fxcoudert
Copy link
Member Author

It builds and tests gcc fine, then gets into an infinite loop of brew install gcc once it moves to testing openblas:

==> Running Formulae#formula!(openblas)
==> brew install gcc
==> brew install gcc
==> brew install gcc

@Bo98
Copy link
Member

Bo98 commented May 10, 2020

Ah, I see GFortran has been making some breaking changes...


Build failure:

  • adios2 - GFortran 10 incompatibility (type mismatch)
  • arpack - GFortran 10 incompatibility (rank mismatch) - patch at https://github.com/opencollab/arpack-ng/commit/9418632214acf6d387896ab29a8f5bdff2d4e38a.patch?full_index=1
  • augustus - this line needs to use version_suffix
  • cp2k - fails because it needs scalapack which has a build failure
  • dungeon - GFortran 10 incompatibility (different than the other failures: Error: BOZ constant at (1) uses nonstandard postfix syntax [see '-fno-allow-invalid-boz'])
  • dynare - fails because it needs arpack which has a build failure
  • eccodes - fails because it needs netcdf which has a build failure
  • libbi - fails because it needs netcdf which has a build failure
  • gcc@9 - docs fail to build:
../../gcc/doc//invoke.texi:1785: Unknown command `9-20200509-55160-10y5gr9/gcc-9.3.0/build/gcc/../../gcc'.
../../gcc/doc//invoke.texi:1784: @include `/private/tmp/gcc/../libiberty/at-file.texi': No such file or directory.

Most of the GFortran 10 incompatibilities can be fixed with -fallow-argument-mismatch (useful for, say, pgplot which probably won't be updated) - however if that is used, it might be worth leaving a comment that it should be removed if/when upstream fix the problem (the flag is "strongly discouraged").


Test failure:

  • csound - known random failure
  • qrupdate - GFortran 10 incompatibility (type mismatch) - not been updated in 8 years but it is just a test failure and we can easily pass -fallow-argument-mismatch
  • r - the gss resource has gone missing (replaced by gss_2.2-0.tar.gz) Handled in pcre2 10.35 #54520 it appears.

Audit failures (can be resolved in separate PRs first if desired):

  • cgns - shim reference in include/cgnsBuild.defs
  • hdf5 - shim references in share/hdf5/libhdf5.settings and libhdf5 library (dylib & a)
  • [email protected] - same as above
  • [email protected] - same as above
  • open-mpi - shim reference in bin/ompi_info and bin/orte-info
  • plplot - shim references in share/plplot5.15.0/examples/c++/Makefile and share/plplot5.15.0/examples/c/Makefile - these files should not be installed in the first place
  • root - shim references in include/root/compiledata.h, lib/root/libProof.so and lib/root/libCore.so

@Bo98
Copy link
Member

Bo98 commented May 11, 2020

brew 2.2.16 is now released btw

@stevenweaver

This comment has been minimized.

@SMillerDev
Copy link
Member

Fixing all of the software that depends on GCC to work with GCC 10.

@SMillerDev
Copy link
Member

Most of the GFortran 10 incompatibilities can be fixed with -fallow-argument-mismatch [...] (the flag is "strongly discouraged").

How about we add this as a solution and add an audit to make sure next package updates are warned about it?

@sjackman
Copy link
Contributor

Could gcc be an alias to [email protected]?

On Homebrew on Linux, bottles are built using Ubuntu 16.04 LTS (Xenial Xerus), and the default version of GCC is 5, which is the GCC version of Ubuntu 16. On Linux, gcc could then be an alias to [email protected].

Here's a related PR on Linuxbrew-core https://github.com/Homebrew/linuxbrew-core/pull/20241

cc @iMichka

@miccal miccal mentioned this pull request Jul 2, 2020
@fxcoudert
Copy link
Member Author

Failures are:

  • muparser, needs a revision bump
  • mlpack, I don't understand it right now
  • x264, needs a revision bump (for 10.13 only)

Test failure:

  • adios2
  • ncview, only on 10.14… random fluke?

Pre-existing audit failures:


None of the failures are for high-usage formula, except x264, but it only affects 10.13 (5.94% of users). I would like to merge in the current state, because:

  • this PR bit rots super fast, due to the many revisions
  • I will quickly rebuild the needed bottle for x264
  • I will investigate the rest later today

@Homebrew/core what do you think?

@BrewTestBot
Copy link
Member

:shipit: @SMillerDev has triggered a merge.

@SMillerDev SMillerDev mentioned this pull request Jul 3, 2020
@fxcoudert fxcoudert deleted the gcc-10.1.0 branch July 3, 2020 10:12
@miccal miccal mentioned this pull request Jul 28, 2020
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.