Linuxbrew-core: brew install glibc fails looking for gcc 5.5.0_1 specs file

Created on 24 Jan 2018  路  15Comments  路  Source: Homebrew/linuxbrew-core

I'm following the doc for installing linuxbrew on CentOS6. I installed gcc, then attempted to build glibc. The glibc build fails with (elided private part of path):

Error: The original GCC specs file is missing: [...]/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0_1/specs.orig

From what I can see, this may be a problem with the gcc build not creating this file, or the glibc using the linuxbrew version instead of the real gcc version installed. I solved this locally by just copying the 5.5.0 dir to 5.5.0_1, but I'm not confident as to what the correct fix is, so I'm not issuing a pull request yet. :-)

I resolved this on my own, but filing this so people are aware of this issue and can fix it for everyone else.

outdated

Most helpful comment

I've overcome this issue with, (with gcc 5.5.0 installed by linuxbrew)
~
$ mkdir ~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0_1/
$ cp ~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/specs.orig \
~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0_1/specs.orig
~

ln -s may also work.

All 15 comments

It may be because brew install gcc currently fails with the following warning:

Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/home/mgi.polymtl.ca/doorba/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gcc.rb:289:in `post_install'
Please report this to the homebrew/core tap!

This has started causing failures for me on TravisCI today. No failure on CircleCI, presumably because I'm using the Docker image.

There aren't too many affected formulae in this tap:

$ grep -c 'EOS.undent' *.rb | egrep -v ':0$'
alsa-lib.rb:1
android-ndk.rb:2
android-sdk.rb:6
crystax-ndk.rb:2
[email protected]:1
gcc.rb:1
glibc.rb:3
[email protected]:1
[email protected]:2
jdk.rb:2
libfuse.rb:1
libiomp.rb:1
libunwind.rb:1
util-linux.rb:1

The EOS error may be unrelated. The fix is to replace it with <<~EOS. Pull requests are welcome. One per formula, with the following commit text: "formula: Update EOS syntax for Linuxbrew".
If you have no time for that, I can do it too, but a little bit later today. Thanks.

All the <<-EOS.undent errors should be gone now.

I've overcome this issue with, (with gcc 5.5.0 installed by linuxbrew)
~
$ mkdir ~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0_1/
$ cp ~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/specs.orig \
~/.linuxbrew/Cellar/gcc/5.5.0_1/lib/gcc/x86_64-unknown-linux-gnu/5.5.0_1/specs.orig
~

ln -s may also work.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

I'm trying to install gcc on RHEL Server 7.4, and it fails when installing the glibc dependency.

$ brew config
HOMEBREW_VERSION: >=1.4.0 (shallow or no git repository)
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: 0da98e625677eeff4b772be3508d9528e56ca686
Last commit: 24 hours ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: d2790820020986c23724a41e2a48e59e56517b22
Core tap last commit: 12 hours ago
HOMEBREW_PREFIX: /home/ugrads/j/jasikpark/.linuxbrew
HOMEBREW_REPOSITORY: /home/ugrads/j/jasikpark/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /home/ugrads/j/jasikpark/.linuxbrew/Cellar
HOMEBREW_CACHE: /home/ugrads/j/jasikpark/.cache/Homebrew
HOMEBREW_CELLAR: /home/ugrads/j/jasikpark/.linuxbrew/Cellar
HOMEBREW_PREFIX: /home/ugrads/j/jasikpark/.linuxbrew
HOMEBREW_REPOSITORY: /home/ugrads/j/jasikpark/.linuxbrew/Homebrew
HOMEBREW_RUBY_WARNINGS: -W0
CPU: 32-core 64-bit sandybridge
Homebrew Ruby: 2.3.3 => /home/ugrads/j/jasikpark/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: N/A
Git: 1.8.3.1 => /bin/git
Curl: 7.29.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python => /usr/bin/python2.7
Ruby: /usr/bin/ruby
Java: N/A
Kernel: Linux 3.10.0-693.17.1.el7.x86_64 x86_64 GNU/Linux
OS: Red Hat Enterprise Linux Server release 7.4 (Maipo)
Host glibc: 2.17
/usr/bin/gcc: 4.8.5
glibc: N/A
gcc: N/A
xorg: N/A
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: An outdated version (1.8.3.1) of Git was detected in your PATH.
Git 1.8.5 or newer is required to perform checkouts over HTTPS from GitHub and
to support the 'git -C <path>' option.
Please upgrade:
  brew install git

Since git depends on pkg-config, which also fails, I can't get rid of that error either.

Seems somewhere 5.5.0 was changed to 5.5.0_1, but it wasn't changed consistently. @whiter462 a symlink ('5.5.0_1' -> '5.5.0') seems to work.

I was affected by this. thanks all for the quick fix. Commenting here so this doesn't close automatically.

I'm unable to install glibc with brew install glibc on Ubuntu 14.04 without root or gcc and my userdir is not named linuxbrew. "glibc cannot be installed as a binary package and must be built from source". Is there a solution to this mentioned in this thread?

@ziggurism you might try this:

https://github.com/Linuxbrew/brew/wiki/CentOS6#install-linuxbrew-on-centos-6-without-sudo

I would be surprised if your toolchain was so old this was necessary, unless you've got an old Ubuntu release (you didn't say, and it's important information)

If this works, make sure you follow that bit about localedef at the end of the wiki article, as well.

Ooops sorry, it's Ubuntu 14.04. But well I got a significant amount of help from sjackman in this thread and was able to finally install gcc and git. The main tip is to use HOMEBREW_NO_ENV_FILTERING=1 brew install --force-bottle <bottle> for any package that balks.

There seem to be a workaround. We also updated some things since then. I will close this issue. If there a still problems please open a new issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings