Linuxbrew/brew

configure: error: C compiler cannot create executables

RobertKoval opened this issue · 2 comments

Can't configure packages.

==> ../configure --prefix=/home/thethird/.linuxbrew/Cellar/gcc@4.9/4.9.4_1 --libdir=/home/thethird/.linuxbrew/Cellar/gcc@4.9/4.9.4_1/lib/gcc/4.9 --enable-languages=c,c++,fortran,objc,obj-c++ --program-suffix=-4.9 --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --enable-plugin --with-build-config=bootstrap-
Last 15 lines from /home/thethird/logs/gcc@4.9/01.configure:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc-4.4
checking for C compiler default output file name... 
configure: error: in `/home/thethird/tmp/gcc@4.9-20181112-2356387-iou7sl/gcc-4.9.4/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.

p.s. config.log removed after error, because it's in /tmp, so I can't open it.

I think it's related to old gcc:
gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
But I can't update gcc, because I get this error. Same error on other packages.

Gist for gcc: https://gist.github.com/RobertKoval/6045ef641a8bb13faa170c487beb8035

brew gist-logs is supposed to include config.log, but it doesn't in this case because it's in a subdirectory. =/ You can brew install -dv gcc@4.9 and then once it fails select shell, which will give you access to config.log. Or try…

brew install -s hello
brew gist-logs hello

I just reinstall linuxbrew with my previous fix: #881 and it's work.