Linuxbrew / legacy-linuxbrew

:skull: This repository is defunct, because it has been split into https://github.com/Linuxbrew/brew and https://github.com/Linuxbrew/homebrew-core
http://linuxbrew.sh
Other
2.23k stars 297 forks source link

gcc bad configured after fresh installation #1125

Closed jolobito closed 6 years ago

jolobito commented 6 years ago

Hi all, I had a working brew version (server with suse and I don't have user privilegies), but I had conflicts with others external software installed with a previous version of gcc, so I removed gcc. After that brew doesn't work adequately! I made a fresh installation and use brew install gcc. I obtained:

Error: glibc cannot be built with any available compilers.
Install Clang or brew install gcc

when I use brew config:

HOMEBREW_VERSION: 1.3.1
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: 09208fb2af972b19a46f89ec8321232943e4c8d4
Last commit: 3 weeks ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: a2663ae980abd2c254132ac670afb3420c9fb69e
Core tap last commit: 11 hours ago
HOMEBREW_PREFIX: /guest-storage/pfreitas/software/.linuxbrew
HOMEBREW_REPOSITORY: /guest-storage/pfreitas/software/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /guest-storage/pfreitas/software/.linuxbrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://linuxbrew.bintray.com
CPU: 128-core 64-bit sandybridge
Homebrew Ruby: 2.0.0-p648 => /guest-storage/pfreitas/software/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/bin/ruby
Clang: N/A
Git: 2.6.1 => /usr/local/bin/git
Perl: /guest-storage/pfreitas/software/perl/bin/perl
Python: /guest-storage/pfreitas/software/anaconda2/bin/python => /guest-storage/pfreitas/software/anaconda2/bin/python2.7
Ruby: /usr/bin/ruby
Java: 1.7.0
Kernel: Linux 3.0.80-0.7-default x86_64 GNU/Linux
OS: SUSE Linux Enterprise Server 11 (x86_64) (n/a)
Host glibc: 2.11
/usr/bin/gcc: 4.3.4
glibc: N/A
gcc: N/A
xorg: N/A

Any Idea?

Thanks!

sjackman commented 6 years ago

Please enclose copy-and-paste blocks in triple back ticks. See https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code

sjackman commented 6 years ago

What does brew install gcc report?

jolobito commented 6 years ago

thank for your help, here the report

brew install gcc

==> Installing dependencies for gcc: glibc, xz, m4, gmp, mpfr, libmpc, isl
==> Installing gcc dependency: glibc
Error: glibc cannot be built with any available compilers.
Install Clang or brew install gcc
sjackman commented 6 years ago

Try following these instructions for CentOS6. They should hopefully also work for SUSE Linux Enterprise Server 11. https://github.com/Linuxbrew/brew/wiki/CentOS6#install-linuxbrew-on-centos-6-without-sudo

sjackman commented 6 years ago

I notice that you don't have glibc installed. Have you been using this installation of Linuxbrew for a while without glibc installed?

jolobito commented 6 years ago

This is a fresh installation. Only, I installed and then brew install gcc

I tried reinstall following the instruction for CentOS6 without success.

HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_BUILD_FROM_SOURCE=1 brew install gcc --without-glibc
==> Installing dependencies for gcc: bzip2, zlib, xz, m4, gmp, mpfr, libmpc, isl
==> Installing gcc dependency: bzip2
==> Downloading http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
######################################################################## 100.0%
==> make install PREFIX=/home/pfreitas/.linuxbrew/Cellar/bzip2/1.0.6_1
==> make -f Makefile-libbz2_so clean
==> make -f Makefile-libbz2_so
🍺  /home/pfreitas/.linuxbrew/Cellar/bzip2/1.0.6_1: 30 files, 1.4MB, built in 14 seconds
==> Installing gcc dependency: zlib
==> Downloading https://zlib.net/zlib-1.2.11.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/home/pfreitas/.linuxbrew/Cellar/zlib/1.2.11
==> make install
🍺  /home/pfreitas/.linuxbrew/Cellar/zlib/1.2.11: 12 files, 464.9KB, built in 11 seconds
==> Installing gcc dependency: xz
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.3.tar.gz
Error: bad URI(is not URI?): https://downloads.sourceforge.net/#!/#!/project/lzmautils/xz-5.2.3.tar.gz
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/generic.rb:1203:in `rescue in merge'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/generic.rb:1200:in `merge'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/common.rb:237:in `each'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/common.rb:237:in `inject'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/common.rb:237:in `join'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/lib/ruby/2.0.0/uri/common.rb:785:in `join'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:404:in `block in actual_urls'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:403:in `map'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:403:in `actual_urls'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:378:in `_fetch'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:336:in `fetch'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:115:in `fetch'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:84:in `stage'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1884:in `stage'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1088:in `brew'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/build.rb:127:in `block in install'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/utils.rb:556:in `with_env'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/build.rb:124:in `install'
/home/pfreitas/.linuxbrew/Homebrew/Library/Homebrew/build.rb:201:in `<main>'

As I said, I had a previous working installation but I used brew uninstall gcc and then when I tried to use brew doesn't work anymore. I uninstalled linuxbrew and did this new installation. After uninstall and install again linuxbrew the brew config show me glibc and gcc as not installed!

Host glibc: 2.11
/usr/bin/gcc: 4.3.4
glibc: N/A
gcc: N/A
xorg: N/A

Thanks

sjackman commented 6 years ago
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.3.tar.gz
Error: bad URI(is not URI?): https://downloads.sourceforge.net/#!/#!/project/lzmautils/xz-5.2.3.tar.gz

That's a super weird error message. I've definitely not seen that error before. Can you please report the output of brew fetch -s xz?

jolobito commented 6 years ago

Of course!

brew fetch -s xz
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.3.tar.gz
==> Downloading from https://downloads.sourceforge.net/#!/project/lzmautils/xz-5.2.3.tar.gz
######################################################################## 100.0%
Downloaded to: /home/pfreitas/.cache/Homebrew/xz-5.2.3.tar.gz
SHA256: 7a07d3f7cca5c0b38ca811984ef8da536da32932d68c1a6cce33ec2462b930bf
Warning: Formula reports different SHA256: 71928b357d0a09a12a4b4c5fafca8c31c19b0e7d3b8ebb19622e96f26dbf28cb
sjackman commented 6 years ago

I see the same warning, so I guess you can ignore that for now. Try again

HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_BUILD_FROM_SOURCE=1 brew install gcc --without-glibc
jolobito commented 6 years ago

I obtained

==> Installing dependencies for gcc: xz, m4, gmp, mpfr, libmpc, isl
==> Installing gcc dependency: xz
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.3.tar.gz
Already downloaded: /home/pfreitas/.cache/Homebrew/xz-5.2.3.tar.gz
Error: SHA256 mismatch
Expected: 71928b357d0a09a12a4b4c5fafca8c31c19b0e7d3b8ebb19622e96f26dbf28cb
Actual: 7a07d3f7cca5c0b38ca811984ef8da536da32932d68c1a6cce33ec2462b930bf
Archive: /home/pfreitas/.cache/Homebrew/xz-5.2.3.tar.gz
To retry an incomplete download, remove the file above.

I removed the file, and try again, but back to the initial error

sjackman commented 6 years ago
We're sorry -- the Sourceforge site is currently in Disaster Recovery mode

Looks like SourceForge is down for now. You may have to wait until it's back up. In the mean time as a work around, try this…

HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_BUILD_FROM_SOURCE=1 brew install --ignore-dependencies zlib gmp mpfr libmpc isl gcc --without-glibc
jolobito commented 6 years ago

OK, I will wait for SourceForge back

here the result for

HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_BUILD_FROM_SOURCE=1 brew install --ignore-dependencies zlib gmp mpfr libmpc isl gcc --without-glibc
Warning: zlib 1.2.11 is already installed
Warning: gmp: this formula has no --without-glibc option so it will be ignored!
==> Downloading https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz
######################################################################## 100.0%
Error: No such file or directory - /home/pfreitas/.linuxbrew/opt/xz/bin/xz
sjackman commented 6 years ago

Unless you have xz installed somewhere else, you're stuck until Sourceforge comes back online.

jolobito commented 6 years ago

Yes, I have installed xz 5.2.2 installed in my anaconda distro. How can I know if the Sourceforge is come back?

sjackman commented 6 years ago

brew fetch -s xz will succeed and not give a Error: SHA256 mismatch In the mean time, you may be able to brew edit xz and delete or comment out the sourceforge line. There's a mirror that you can use.

brew edit xz
rm -f /home/pfreitas/.cache/Homebrew/xz-5.2.3.tar.gz
brew fetch -s xz