glibc and gmp: circular dependency makes brew-upgrade impossible
================================================================
- [x] Confirmed this is a problem with `brew install`ing one, specific formula and not every time you run `brew`? If it's a general `brew` problem please file this issue at https://github.com/Linuxbrew/brew/issues/new.
- [x] If you have a macOS system and can replicate the problem on macOS with Homebrew, please report the issue to [Homebrew/core](https://github.com/Homebrew/homebrew-core) and follow their issue template from your macOS system. If you are unsure, please report the issue to Linuxbrew.
- [x] Ran `brew update` and retried your prior step?
- [x] Ran `brew doctor`, fixed all issues and retried your prior step? (https://gist.github.com/anonymous/3f8b947205117027584007d4248eee35: nothing interesting)
- [x] Ran `brew gist-logs <formula>` (where `<formula>` is the name of the formula that failed) and included the output link? (N/A)
- [x] If `brew gist-logs` didn't work: ran `brew config` and `brew doctor` and included their output with your issue?
---
OS: RHEL 7.4
brew-config: https://gist.github.com/anonymous/a502eed2c08dc97fd0bfc2c8295824be
brew-doctor: https://gist.github.com/anonymous/3f8b947205117027584007d4248eee35
For some reason I'm facing a circular dependency when trying to upgrade glibc and gmp:
```
$ brew info glibc
glibc: stable 2.23
The GNU C Library
https://www.gnu.org/software/libc/
/home/zhimingw/.linuxbrew/Cellar/glibc/2.19 (1,406 files, 42.5MB) *
Built from source on 2016-10-17 at 11:09:08
...
```
```
$ brew info gmp
gmp: stable 6.1.2 (bottled)
GNU multiple precision arithmetic library
https://gmplib.org/
/home/zhimingw/.linuxbrew/Cellar/gmp/6.1.1 (20 files, 3.5MB) *
Poured from bottle on 2017-09-11 at 12:04:35
...
```
```
$ brew deps gmp
m4
```
```
$ brew deps glibc
binutils
linux-headers
zlib
```
```
$ brew upgrade gmp
==> Upgrading 1 outdated package, with result:
gmp 6.1.2
==> Upgrading gmp
==> Installing dependencies for gmp: glibc
==> Installing gmp dependency: glibc
==> Installing dependencies for glibc: gmp, mpfr
==> Installing glibc dependency: gmp
==> Installing dependencies for gmp: glibc
==> Installing gmp dependency: glibc
==> Installing dependencies for glibc: gmp, mpfr
...
^C
```
```
$ brew upgrade glibc
brew upgrade glibc
==> Upgrading 1 outdated package, with result:
glibc 2.23
==> Upgrading glibc
==> Installing dependencies for glibc: gmp, mpfr
==> Installing glibc dependency: gmp
==> Installing dependencies for gmp: glibc
==> Installing gmp dependency: glibc
==> Installing dependencies for glibc: gmp, mpfr
==> Installing glibc dependency: gmp
==> Installing dependencies for gmp: glibc
...
^C
```
I haven't looked into what exactly is going on, but it seems that the compiler, `gcc-5`, depends on both, and maybe that's causing the trouble?
A couple additional remarks:
- `--force-bottle` doesn't help;
- If I uninstall both, I won't be able to install either afterwards (same circular dep), so this issue isn't limited to upgrade;
- A known good commit is d5d8600e0a03574cb485d406b6faf339e8ab7808, where I can install both.
> Please note that we should use the package summary: A highly delicious bookmark manager. Your mini web!
In Homebrew we prefer short and utilitarian descriptions without much flair, so I think I'll keep "command-line bookmark manager" there. After all, "highly delicious" doesn't seem to convey anything useful...