brew update and retried your prior step?brew doctor, fixed as many issues as possible and retried your prior step?(This could be a general Linuxbrew issue. I canāt tell.)
I am installing gcc via brew install gcc on Ubuntu. ~Due to strict disk quota restrictions, I cannot have my software installation in the home directory; instead, itās sitting on a Lustre file system. I am symlinking ~~/.linuxbrew to that filesystem. Furthermore, I have set PATH etc directly to the actual path because I have noticed some problems when pointing it to $HOME/.linuxbrew/bin (for one thing, brew doctor is complaining about improperly set paths). So Iām doing this in my .bash_profile:
BREW_PREFIX="$(~/.linuxbrew/bin/brew --prefix)"
export PATH="$BREW_PREFIX/bin:$BREW_PREFIX/sbin:$PATH"
export MANPATH="$BREW_PREFIX/share/man:$MANPATH"
export INFOPATH="$BREW_PREFIX/share/info:$INFOPATH"
This sets the correct paths, and other things work properly. Not GCC though: it generates internal compiler errors for floating point constants.
Hereās a minimal working example illustrating the problem:
// test.cpp
int main() {
float f = 1.1F;
}
ā©ā©ā© g++ -v test.cpp
Reading specs from /lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/gcc/5.3.0 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/home/linuxbrew/.linuxbrew/opt/gmp --with-mpfr=/home/linuxbrew/.linuxbrew/opt/mpfr --with-mpc=/home/linuxbrew/.linuxbrew/opt/libmpc --with-isl=/home/linuxbrew/.linuxbrew/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --disable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc 5.3.0)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -iprefix /lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/ -D_GNU_SOURCE test.cpp -isystem /lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/include -quiet -dumpbase test.cpp -mtune=generic -march=x86-64 -auxbase test -version -o /nfs/users/nfs_k/kr15/.tmp/ccBcxdIV.s
GNU C++ (Homebrew gcc 5.3.0) version 5.3.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3-p2, MPC version 1.0.3
warning: GMP header version 6.1.0 differs from library version 6.1.1.
warning: MPFR header version 3.1.3-p2 differs from library version 3.1.5.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0"
ignoring duplicate directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/x86_64-unknown-linux-gnu"
ignoring duplicate directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/backward"
ignoring duplicate directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring duplicate directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed"
ignoring nonexistent directory "/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/include
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/x86_64-unknown-linux-gnu
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/backward
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed
/usr/local/include
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/../../include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++ (Homebrew gcc 5.3.0) version 5.3.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3-p2, MPC version 1.0.3
warning: GMP header version 6.1.0 differs from library version 6.1.1.
warning: MPFR header version 3.1.3-p2 differs from library version 3.1.5.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a268dbf4b6ec0038d80274a1ad89cc61
test.cpp:3:5: internal compiler error: Illegal instruction
float f = 1.1F;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
The GCC output contains various references to /home/linuxbrew. This path does not exist.
Likewise,
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/include
is a messed up reference to a nonexistent path. The correct (and existing) path is
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
Hereās the output of brew gist-logs gcc for completeness: https://gist.github.com/klmr/7f3a8e0356fe60310751ef8834975125
Iāve amended the issue to reflect the fact that the installation also fails if ~/.linuxbrew isnāt a symlink.
In fact, here are all the steps Iāve taken to reproduce the error:
brew install gcctry standalone linuxbrew
@maxim-belkin Do you mean this or similar scripts?
Unfortunately I cannot go this route as I donāt have super user rights. I could unset all paths but I cannot bootstrap a clean system even so:Ā the library paths of the system GCC are hardcoded.
not that one for sure :)
Here is my script to install standalone Linuxbrew
Thanks, this looks promising. Unfortunately itās not working either. First off, brew doctor fails with the following warnings:
Warning: An outdated version of Git was detected in your PATH.
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew install git
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/drmaa.h
Iām however assuming that this is harmless, at least for the moment. On the other hand, brew install on anything fails:
ā©ā©ā© brew install patchelf
Error: undefined method `rebuild' for #<BottleSpecification:0x7f0822448230>
Please report this bug:
https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb:10:in `load_formula'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/software_spec.rb:91:in `instance_eval'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/software_spec.rb:91:in `bottle'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula.rb:1729:in `bottle'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb:8:in `load_formula'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formulary.rb:34:in `load_formula_from_path'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formulary.rb:83:in `load_file'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formulary.rb:74:in `klass'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formulary.rb:70:in `get_formula'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formulary.rb:207:in `factory'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/dependency.rb:32:in `to_formula'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/dependency.rb:93:in `expand'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/dependencies.rb:9:in `each'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/dependencies.rb:9:in `each'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/dependency.rb:80:in `expand'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula_installer.rb:359:in `bottle_dependencies'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula_installer.rb:393:in `expand_dependencies'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula_installer.rb:265:in `compute_dependencies'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula_installer.rb:130:in `verify_deps_exist'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/formula_installer.rb:123:in `prelude'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/cmd/install.rb:231:in `install_formula'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/cmd/install.rb:93:in `install'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/cmd/install.rb:93:in `each'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/Homebrew/cmd/install.rb:93:in `install'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/brew.rb:84:in `send'
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Library/brew.rb:84
⦠etc. For brew info.
Oh, and Iāve had to link to the following shared libraries, as the paths given inside your script donāt exist on my system:
/lib/x86_64-linux-gnu/libgcc_s.so.1/usr/lib/x86_64-linux-gnu/libstdc++.so.6I've updated the script -- try now.
Thanks a lot for the update, I see this was quite extensive work. I actually think this script is very useful in its own right and should probably be published more prominently.
Unfortunately, though, it doesnāt help my specific issue: the script is running fine until the point at which the installed GCC 5.3 is first invoked ā namely, in the line ./brew install git.
Once again, the error (from compiling the openssl dependency) is an āillegal instructionā due to the use of floating point values:
b_print.c: In function 'roundv':
b_print.c:607:5: internal compiler error: Illegal instruction
if (value >= 0.5)
^
ā¦Ā and invoking the GCC with the -v option shows that, once again, there are some invalid hard-coded paths in its configuration, e.g. --with-mpfr=/home/linuxbrew/.linuxbrew/opt/mpfr (and the same for GMP, MPC and ISL āĀ exactly the same as in my initial report). In my naĆÆve understanding and after some googling this indicates the use of a floating point instruction set for the wrong architecture.
At this point I would normally escalate this issue either to my sysadmin. But
/home/linuxbrew/.linuxbrew/opt, and that points to the problem being related to Linuxbrew: It looks as if the opt_prefix in the formulae for mpfr, mpc, gmp and isl are wrongly computed : surely they should refer to $LINUXHOME/opt/*, rather than the above, non-existent path.Oh, I just noticed:
./brew install gcc pours GCC from bottle! So the wrong paths are presumably coming from the precompiled binary.
Attempting ./brew install --build-from-source gcc yields the following error:
Error: The requested Homebrew GCC was not installed. You must:
brew install gcc
And ./brew install -s gcc --cc=gcc-4.6 a compilation error during bootstrapping: https://gist.github.com/klmr/e9e6ccce0f8efb6fd87a52e2938d66d9
Yes, we detected this issue already and it seems to be an upstream (Homebrew) bug caused by the recent changes they've made. @sjackman submitted a PR (Homebrew/brew#1948) to address this.
I'm not sure why gcc was poured from bottle in the first place. Brew should have initiated a normal build. @sjackman, ideas/suggestions ?
try adding unset CFLAGS somewhere in the beginning :)
gcc should be poured from bottle. It's relocatable.
b_print.c:607:5: internal compiler error: Illegal instruction
Illegal instruction is odd.
CPU: octa-core 64-bit penryn
https://gist.github.com/klmr/e9e6ccce0f8efb6fd87a52e2938d66d9
Bottles are compiled for -march=core2, which I thought was compatible withpenryn. Do any other bottles give this Illegal instruction error? Try brew install -s gcc
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/bin/gcc-4.6 -c -DHAVE_CONFIG_H -Os -w -pipe -march=core2 -msse4.1 -isystem/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/include -I. -I../../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../libiberty/fibheap.c -o fibheap.o
checking for strsignal... ../../../libiberty/fibheap.c: In function āfibheap_replace_key_dataā:
../../../libiberty/fibheap.c:220:30: error: āLONG_MINā undeclared (first use in this function)
../../../libiberty/fibheap.c:220:30: note: each undeclared identifier is reported only once for each function it appears in
../../../libiberty/fibheap.c: In function āfibheap_delete_nodeā:
../../../libiberty/fibheap.c:261:36: error: āLONG_MINā undeclared (first use in this function)
https://gist.github.com/klmr/e9e6ccce0f8efb6fd87a52e2938d66d9#file-02-make-L1267
I'm not sure what's causing this error. Sorry I couldn't be of more help. =/
@sjackman Other bottles donāt give this error āĀ at least none of the ones Iāve checked. As for brew install -s gcc, the error Iām getting can actually be found in the GCCās Bugzilla. But the report is from 2003, concerns version 3.4 and should have long since been resolved. :-(
@maxim-belkin None of the compilation/ld flags are set.
internal compiler error: Illegal instruction
To troubleshoot this error, run
ulimit -c unlimited
g++ test.cpp
gdb g++ core.*
x/i $pc
will report the instruction that's giving the Illegal instruction error.
If you have access to a newer architecture machine, using that machine should avoid this Illegal instruction error.
Alternatively, I'd suggest compiling a newer version of GCC outside of Linuxbrew, and using that compiler to compile Linuxbrew's GCC rather than your host's native GCC 4.6. I'd suggest trying GCC 4.8, which ships with Ubuntu 14 (trusty), and is used by Linuxbrew to build bottles.
@sjackman Unfortunately I donāt get a core dump file ā neither in the current location nor where g++ is installed. ulimit permissions might be restricted (how can I tell?) but the return code of ulimit -c unlimited is 0 and subsequent ulimit -c prints unlimited.
That's unfortunate. Do you have access to a newer machine with access to the same NFS mount? I thought penryn should work, but evidence seems otherwise. Anything Core 2 or later should work (roughly 2006). Can you please report the output of head /proc/cpuinfo?
Do you have access to a newer machine with access to the same NFS mount?
I do, via a job scheduler (Platform LSF). In fact I just tried it, and running the Linuxbrew bottled g++ on such a machine works.
Unfortunately this doesnāt help me running software on the head node. Furthermore, the scheduler is configured to not allow modifying the core size limit; I get the message
CORELIMIT: Cannot exceed queue's hard limit(s). Job not submitted.
Can you please report the output of
head /proc/cpuinfo?
Since the output tells me nothing Iāve included a bit more (including the flags):
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU E5440 @ 2.83GHz
stepping : 10
microcode : 0xa0b
cpu MHz : 2832.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi
flexpriority
bogomips : 5666.63
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:
The other 7 cores look identical.
Iāve tried something else: Iāve found that thereās a GCC 6.2 installed in another location on the cluster. I have now tried bootstrapping @maxim-belkinās standalone linuxbrew using that compiler. Unfortunately this also fails, but with a completely different error.
I executed the same script as above, just replacing these lines with:
libstdc=/software/gcc-6.2.0/lib64/libstdc++.so.6
libgccs=/software/gcc-6.2.0/lib64/libgcc_s.so.1
And these lines with:
gccversion=6
for tool in gcc g++ gfortran; do
ln -s /software/gcc-6.2.0/bin/$tool $LINUXBREW/bin/$tool-"$gccversion"
done
In file included from ../../gcc/cp/except.c:1023:0:
cfns.gperf: In function āconst char* libc_name_p(const char*, unsigned int)ā:
cfns.gperf:101:1: error: āconst char* libc_name_p(const char*, unsigned int)ā redeclared inline with āgnu_inlineā attribute
cfns.gperf:26:14: note: āconst char* libc_name_p(const char*, unsigned int)ā previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function āconst char* libc_name_p(const char*, unsigned int)ā used but never defined
It looks to me as though it's not possible to compile GCC 5.3 using 6.2. You could try opening a bug upstream with GCC.
I'm running out of ideas here. My best remaining suggestion is to install GCC 4.8 from source yourself and use that to compile LInuxbrew's GCC 5.3.
Thanks for your patience, Iāll keep you informed: Iām now installing GCC 4.9.4 from source, letās see what that gives. For what itās worth, I also tried the installation with yet another GCC that was already installed on the system (4.9.2) in the meantime. It also failed, but with yet another compiler error. And thereās a third (and final) GCC version already installed (GCC-4.8.1). I will also try that one tomorrow.
/tmp/gcc-20170208-17551-1x88lmr/gcc-5.3.0/build/./gcc/xgcc -B/tmp/gcc-20170208-17551-1x88lmr/gcc-5.3.0/build/./gcc/ -B/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/x86_64-unknown-linux-gnu/bin/ -B/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/x86_64-unknown-linux-gnu/lib/ -isystem /lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/x86_64-unknown-linux-gnu/include -isystem /lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/Cellar/gcc/5.3.0/x86_64-unknown-linux-gnu/sys-include -g -O2 -Os -w -pipe -march=core2 -msse4.1 -O2 -g -O2 -Os -w -pipe -march=core2 -msse4.1 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _fixunssfsi.o -MT _fixunssfsi.o -MD -MP -MF _fixunssfsi.dep -DL_fixunssfsi -c ../../../libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
../../../libgcc/libgcc2.c: In function '__divxc3':
../../../libgcc/libgcc2.c:1912:26: internal compiler error: Illegal instruction
This error is caused by -march=core2 -msse4.1, which is evidently too new for your Xeon E5440, although I don't understand why, because your CPU flags contains sse4_1. Set
export HOMEBREW_ARCH=native
Oddly, HOMEBREW_ARCH=native is the default. Do you have HOMEBREW_ARCH set to something else?
If your cluster hardware is newer hardware than your head node hardware (E5440 was released in 2008), then compiling software on your head node is going to cause you grief. I would suggest opening a ticket with your systems group to see if you can get access to a computer of a similar age as your cluster hardware for the purpose of compiling software.
Here's some useful resource for troubleshooting these instruction set issues:
I was wrong previously. The bottle architecture on Linuxbrew is not -march=core2 -msse4.1 but in fact -march=core2 (without -msse4.1).
I however found this line in the code: https://github.com/Linuxbrew/brew/blob/master/Library/Homebrew/hardware.rb#L12
So on a penryn system when compiling from source, instead of using -march=native it uses -march=core2 -msse4.1. Perhaps that's causing this bug.
@nir-krakauer Please report
head /proc/cpuinfo
grep -m1 flags /proc/cpuinfo
head /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T9550 @ 2.66GHz
stepping : 10
cpu MHz : 800.000
cache size : 6144 KB
physical id : 0
siblings : 2
grep -m1 flags /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc ida pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
If you compile this test file with gcc, do you get the Illegal instruction error?
int main() { float f = 1.1F; }
If so, please report the output of
ulimit -c unlimited
g++ test.cpp
gdb g++ core.*
x/i $pc
I'm hoping that PR https://github.com/Linuxbrew/brew/pull/257. I'm not convinced that it will, but it eliminates one possible source of the error.
I've merged https://github.com/Linuxbrew/brew/pull/257. You may want to try installing Linuxbrew from scratch. Make sure that you're on the master branch of Linuxbrew/brew and not last stable release 1.1.8. You can confirm that you have this change by running brew install -s hello and check that you see -march=native rather than -march=core2 -msse4.1.
An alternative work around is to set
export HOMEBREW_ARCH=native
echo "int main() { float f = 1.1F; }" > test.cpp
gcc test.cpp
test.cpp:1:1: internal compiler error: Illegal instruction
int main() { float f = 1.1F; }
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
ulimit -c unlimited
g++ test.cpp
test.cpp:1:1: internal compiler error: Illegal instruction
int main() { float f = 1.1F; }
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
gdb g++ core.*
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-37.el5_7.1)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/nir/.linuxbrew/bin/g++...done.
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /home/nir/.linuxbrew/bin/g++]
/home/nir/core.*: No such file or directory.
(gdb) x/i $pc
No registers.
(gdb) quit
/home/nir/core.*: No such file or directory.
Any idea why you're not getting a core dump? Can you verify that core dumps are enabled with ulimit -c? I wonder if gcc is doing something funny to somehow disable core dumpsā¦
Try
gdb g++
run test.cpp
x/i $pc
ulimit -c
unlimited
gdb g++
GNU gdb (GDB) CentOS (7.0.1-45.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/nir/.linuxbrew/bin/g++...done.
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /home/nir/.linuxbrew/bin/g++]
(gdb) run test.cpp
Starting program: /home/nir/.linuxbrew/bin/g++ test.cpp
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaacc000
Error while mapping shared library sections:
linux-vdso.so.1: No such file or directory.
Detaching after fork from child process 8410.
test.cpp:1:1: internal compiler error: Illegal instruction
int main() { float f = 1.1F; }
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
Program exited with code 01.
(gdb) x/i $pc
No registers.
(gdb) quit
Try
gdb g++
set follow-fork-mode child
run test.cpp
x/i $pc
nir@localhost:~$ gdb g++
GNU gdb (GDB) CentOS (7.0.1-45.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/nir/.linuxbrew/bin/g++...done.
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /home/nir/.linuxbrew/bin/g++]
(gdb) set follow-fork-mode child
(gdb) run test.cpp
Starting program: /home/nir/.linuxbrew/bin/g++ test.cpp
Error while mapping shared library sections:
linux-vdso.so.1: No such file or directory.
[New process 5622]
Executing new program: /home/nir/.linuxbrew/Cellar/gcc/5.3.0/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/cc1plus
Error while mapping shared library sections:
linux-vdso.so.1: No such file or directory.
Program received signal SIGILL, Illegal instruction.
[Switching to process 5622]
0x00002aaaab4e161a in __gmpn_popcount () from /home/nir/.linuxbrew/lib/libgmp.so.10
(gdb) x/i $pc
0x2aaaab4e161a <__gmpn_popcount+26>: popcnt (%rdi,%rcx,8),%r8
Great! Thanks for getting this info. popcnt (%rdi,%rcx,8),%r8
https://en.wikipedia.org/wiki/SSE4#POPCNT_and_LZCNT
Intel implements POPCNT beginning with the Nehalem microarchitecture and LZCNT beginning with the Haswell microarchitecture.
Penryn was released in 2007 and Nehalem in 2008. The popcnt instruction was released at the same time as SSE 4.2. https://en.wikipedia.org/wiki/Nehalem_(microarchitecture)#Technology
__gmpn_popcount () from /home/nir/.linuxbrew/lib/libgmp.so.10
@nir-krakauer @klmr Did you install gmp and gcc from the bottle or from source?
Please report brew info gmp and brew info gcc.
gmp: stable 6.1.1 (bottled)
GNU multiple precision arithmetic library
https://gmplib.org/
/home/nir/.linuxbrew/Cellar/gmp/6.1.1 (20 files, 3.6M) *
Poured from bottle on 2017-02-10 at 19:56:48
From: https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/gmp.rb
==> Dependencies
Build: xz ā
==> Options
--c++11
Build using C++11 mode
On Mac, gmp has this fix for the bottle:
args << "--build=core2-apple-darwin#{`uname -r`.to_i}" if build.bottle? && OS.mac?
https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/gmp.rb#L22
I suspect that we need to do a similar thing on Linux to prevent gmp from using the popcnt instruction in the bottle.
host = OS.mac? ? "--build=core2-apple-darwin#{`uname -r`.to_i}" ? OS.linux? : "--build=core2-linux-gnu" : ""
args << host if build.bottle?
The workaround that should resolve your issue is
brew reinstall -s gmp --cc=gcc-4.x
where gcc-4.x is the compiler provided by your host system. Alternatively
brew remove gcc
brew reinstall -s gmp
brew install gcc
brew remove gcc; brew reinstall -s gmp gives an error (wrong compilation flags?). Gist
./a.out: error while loading shared libraries: /home/nir/.linuxbrew/lib/libc.so.6: ELF file OS ABI invalid
https://gist.github.com/anonymous/36876f58274a89d2f21da3675189714f#file-config-log-L99
I believe that this error message is caused by using the host's ld.so with the brewed libc.so.6. I'm not entirely sure why that would happen. You may want to try reinstalling Linuxbrew and running
brew install -s gmp
brew install gcc
It seems not to work even after reinstalling Linuxbrew. Gist
In that gist you already have the brewed glibc installed. If the first command you run is brew install -s gmp, you shouldn't yet have the brewed glibc installed. From a clean Linuxbrew install, can you copy and paste the output from the terminal of brew install -s gmp ?
glibc is a dependency of gmp
brew install -s gmp
==> Installing dependencies for gmp: patchelf, zlib, binutils, linux-headers, glibc, xz
...
Ugh. Only because of xz needed to unpack the gmp tarball. Try
brew install -s xz gmp
brew install gcc
That works! And now gcc test.cpp and brew test gcc run OK.
Thanks for the sticking with the issue. I've opened PR #1771 to hopefully fix this issue.
@nir-krakauer @klmr Could you confirm that this PR fixes your issue? In a fresh Linuxbrew installation:
brew pull https://github.com/Linuxbrew/homebrew-core/pull/1771
brew install -s xz
brew install --build-bottle gmp
brew install gcc
g++ test.cc
Unfortunately this still wonāt work, and fails to configure gmp. In fact, the first problem is that I cannot pull the PR but Iām guessing this is due to an ancient git (1.7.5), so I patched the file manually.
Once thatās done, hereās what brew install --build-bottle gmp gives me: https://gist.github.com/klmr/29908ded5c9a4215ba154f6790436e29
If I run the offending test manually, it works without error: the file a.out is created and thereās no segmentation fault:
ā©ā©ā© /usr/bin/gcc-4.6 -Os -w -pipe -march=core2 -isystem/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/include conftest.c && \
1 ā© (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest)
ā©ā©ā© echo $?
0
Iām at a loss why this test wouldnāt be working.
What's the source of conftest.c? It's segfaulting, so compile with debugging info -g and run it from within gdb and get a back trace. Also try doing all this from within a brew sh.
I copied the source from the configure file, i.e.
int main () { return 0; }
I didnāt know about brew sh, thatās neat. I had tried recreating the same environment manually but obviously missed something.
Hereās what ./a.out does when compiled/run inside brew sh:
(gdb) run
Starting program: /nfs/users/nfs_k/kr15/tmp/ctest/a.out
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7dee2f4 in _dl_close_worker (map=0x7ffff7b96fa0) at dl-close.c:112
112 dl-close.c: No such file or directory.
(gdb) x/i $pc
=> 0x7ffff7dee2f4 <_dl_close_worker+52>: mov %edx,0x310(%rdi)
(gdb) disassemble _dl_close_worker
Dump of assembler code for function _dl_close_worker:
0x00007ffff7dee2c0 <+0>: push %rbp
0x00007ffff7dee2c1 <+1>: movabs $0x3ffffffff,%rcx
0x00007ffff7dee2cb <+11>: movabs $0x200000000,%rsi
0x00007ffff7dee2d5 <+21>: mov %rcx,%rax
0x00007ffff7dee2d8 <+24>: mov %rsp,%rbp
0x00007ffff7dee2db <+27>: push %r15
0x00007ffff7dee2dd <+29>: push %r14
0x00007ffff7dee2df <+31>: push %r13
0x00007ffff7dee2e1 <+33>: push %r12
0x00007ffff7dee2e3 <+35>: push %rbx
0x00007ffff7dee2e4 <+36>: sub $0x98,%rsp
0x00007ffff7dee2eb <+43>: mov 0x310(%rdi),%edx
0x00007ffff7dee2f1 <+49>: sub $0x1,%edx
=> 0x00007ffff7dee2f4 <+52>: mov %edx,0x310(%rdi)
ā¦
⦠my assembly is too rusty to make anything of this though.
It's good that you're able to reproduce the error. It's likely some environment variable that's causing the issue. Try env >a and then brew sh <<<'env >b' then diff a b and figure out which variable is causing the issue.
It's not so much the assembly I'm interested in as the function and module that's crashing, _dl_close_worker. Get a backtrace with bt.
For bash users:
for var in $(compgen -A variable);do echo "$var = ${!var}"; done
What does that command do, Maxim?
that for loop prints environment variables in var = value format.
env dumps everything, including functions and you don't care about those
alternatively, one could use compgen -v instead of compgen -A variable
Backtrace isnāt much to look at:
(gdb) backtrace
#0 0x00007ffff7dee2f4 in _dl_close_worker (map=0x7ffff7b96fa0) at dl-close.c:112
#1 0x00007ffff7def16e in _dl_close (_map=0x7ffff7b96fa0) at dl-close.c:770
#2 0x00007ffff7b5063c in ?? ()
#3 0x00007fff00000000 in ?? ()
#4 0x0000000000000000 in ?? ()
And, yes, by comparing the environments I can now reproduce the issue outside of brew sh by setting LD_RUN_PATH=/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/lib (not surprisingly). So itās brewās ld.so which segfaults.
Similar to @klmr I coudn't pull the patch (problem with ancient curl openssl?):
brew -v pull https://github.com/Linuxbrew/homebrew-core/pull/1771
==> Fetching patch
Patch: https://github.com/Linuxbrew/homebrew-core/pull/1771.patch
/usr/bin/curl --remote-time --location --user-agent Linuxbrew/1.X.Y (Linux; x86_64 "CentOS release 5.7 (Final)") curl/7.15.5 --fail https://github.com/Linuxbrew/homebrew-core/pull/1771.patch -s -o /home/nir/.cache/Homebrew/1771.patch
Error: Failure while executing: /usr/bin/curl --remote-time --location --user-agent Linuxbrew/1.X.Y\ (Linux;\ x86_64\ "CentOS\ release\ 5.7\ (Final)")\ curl/7.15.5 --fail https://github.com/Linuxbrew/homebrew-core/pull/1771.patch -s -o /home/nir/.cache/Homebrew/1771.patch
And after modifying gmp.rb manually instead, I got the could not find a working compiler error.
On the other hand, as mentioned above, brew install -s xz gmp worked fine for me without any patch.
Try the following:
wget -P $(brew --cache) https://github.com/Linuxbrew/homebrew-core/pull/1771.patch
So itās brewās ld.so which segfaults.
Oh, okay. I have a guess what's happening. It's using the brewed libc.so.6 with the system's ld.so, which is an unhappy combination. The LD_RUN_PATH environment variable let's you set the RPATH of the executable, but there's unfortunately no similar environment variable to specify which dynamic linker ld.so to use. We add --Wl,--dynamiclinker,$HOMEBREW_PREFIX/lib/ld.so to LDFLAGS, but if the build system ignores LDFLAGS, there's not much we can do. Well, actually yes, there is. Homebrew uses a system called superenv to run a shell script gcc that adds necessary compiler flags that then calls the host gcc. Linuxbrew doesn't yet use that system (it uses the older stdenv). Using superenv would likely resolve this issue, but it requires a bit of work.
A hack workaround that might work for you is to add to the failing formula.
# Avoid using the host's ld.so with the brewed libc.so
ENV["LD_RUN_PATH"] = nil
@klmr To check if my guess above is correct, report the output of
patchelf --print-interpreter --print-rpath ./a.out
./a.out; echo $?
`brew --prefix`/lib/ld.so ./a.out; echo $?
Spot on:
ā©ā©ā© patchelf --print-interpreter --print-rpath ./a.out
/lib64/ld-linux-x86-64.so.2
/lustre/scratch115/realdata/mdt2/teams/miska/users/kr15/linuxbrew/lib
ā©ā©ā© ./a.out; echo $?
Segmentation fault
139
ā©ā©ā© $(brew --prefix)/lib/ld.so ./a.out; echo $?
0
Rather than applying your workaround, wouldnāt it be possible to patch the gmp configure script via its formula, to force it to use brewās ld.so? Or is that not generally desirable?
Anyway, it compiles and installs now, but make check fails. Yay, more log files: https://gist.github.com/klmr/726ab74804c894c034c83664c4e1ebf1
Rather than applying your workaround, wouldnāt it be possible to patch the gmp configure script via its formula, to force it to use brewās ld.so? Or is that not generally desirable?
Yes, I had thought that the autoconf checking whether the C compiler works test includes LDFLAGS:
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
so I'd be curious to know why it doesn't appear to in this case.
See tests/cxx/test-suite.log
https://gist.github.com/klmr/726ab74804c894c034c83664c4e1ebf1#file-03-make-L984
Wow. GMP is being grumpy. Gist tests/cxx/test-suite.log
I'm working on adding support for --env=super to Linuxbrew.
Hereās the log file: https://gist.github.com/klmr/13a0cf08518964c14e6e876c73c459dc
Just for reference though: how do I normally retrieve this? The tmp path (/tmp/gmp-20170212-16794-4bnjgx) is apparently deleted immediately after brew install.
I tried following the gmp formula manually in a brew sh shell. I think I got it right ā¦
Just for reference though: how do I normally retrieve this?
I run brew install -dv gmp then when the build breaks select shell.
I've opened a PR for superenv for Linuxbrew! It's definitely a work-in-progress. See https://github.com/Linuxbrew/brew/pull/263
lt-t-binary: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
https://gist.github.com/klmr/13a0cf08518964c14e6e876c73c459dc#file-test-suite-log-L18
Ah, yes. You haven't yet installed libstdc++.so.6. The hack work around is to borrow it from your host until you've built gcc.
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(brew --prefix)/lib/
brew install gcc
brew link --overwrite gcc
Right, and the same with libgcc_s.so.1. After that, gmp installed successfully. Iām now installing gcc and Iāll attempt using it to compile the floating point test file in the morning (itās midnight here in UK). Iām cautiously optimistic ā¦
Eh, no need to compile from source. Poured the bottled GCC, linked it, and used it to compile the quarrelsome test.cpp from above. It works, no segfault. š I think this means the problem is fixed.
Awesome. Thanks for your support and patience.
Wonderful. Thanks for sticking with the troubleshooting.
Hi, I stil have a gcc Illegal instruction error when compiling pkg-config :
CC libglib_2_0_la-gscanner.lo
grand.c: In function 'g_rand_int_range':
grand.c:495:6: internal compiler error: Illegal instruction
(G_RAND_DOUBLE_TRANSFORM +
My config is the following :
HOMEBREW_VERSION: >1.1.0 (no git repository)
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: 59c9ddbc1d9b9dfdeb0514768e0efd0112c63b25
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 3e2fee862e6d0fde203a21fa8be4ff0f5e3331cb
Core tap last commit: 20 minutes ago
HOMEBREW_PREFIX: /var/lib/nethserver/home/matthieu/.linuxbrew
HOMEBREW_REPOSITORY: /var/lib/nethserver/home/matthieu/.linuxbrew
HOMEBREW_CELLAR: /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://linuxbrew.bintray.com
CPU: dual-core 64-bit merom
Homebrew Ruby: 2.0.0-p648 => /usr/bin/ruby
Clang: N/A
Git: 1.8.3.1 => /usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python => /usr/bin/python2.7
Ruby: /usr/bin/ruby
Java: N/A
Kernel: Linux 3.10.0-514.10.2.el7.x86_64 x86_64 GNU/Linux
OS: CentOS Linux release 7.3.1611 (Core)
OS glibc: 2.17
OS gcc: 4.8.5
Linuxbrew glibc: 2.19
Linuxbrew gcc: 5.3.0
Linuxbrew xorg: N/A
Can anyone help ?
Thanks !
Matthieu
Hi, Matthieu. g_rand_int_range is a function provided by glib. Please report the complete unabridged output of brew install pkg-config
Hi. I installed brew again and ran into a first problem when installing gcc that might be the core reason ;
==> Installing gcc dependency: glibc
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/glibc.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/binutils.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/zlib.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/linux-headers.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/llvm.rb
Error: glibc cannot be built with any available compilers.
Install Clang or brew install gcc
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/compilers.rb:127:in `compiler'
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/compilers.rb:109:in `select_for'
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/extend/ENV/shared.rb:171:in `compiler'
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/extend/ENV/std.rb:74:in `setup_build_environment'
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb:92:in `install'
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb:201:in `<main>'
I somehow succeeded to solve this problem (at least I thought so) but I don't remember how anymore and thought it might be a good idea to report this first.
Thanks for helping !
No worries. Sorry that installation isn't going terribly smoothly. See these instructions to symlink your hosts's compiler:
https://github.com/Linuxbrew/brew/wiki/Symlink-GCC
Thanks ! It's "working" again.
Here you are :
[[email protected]@mattlabs ~]$ brew install -vd pkg-config
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/binutils.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/gcc.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/glibc.rb
==> Downloading https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
/usr/bin/curl --remote-time --location --user-agent Linuxbrew/1.X.Y (Linux; x86_64 3.10.0-514.10.2.el7.x86_64) curl/7.29.0 --fail https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -C 0 -o /var/lib/nethserver/home/matthieu/.cache/Homebrew/pkg-config-0.29.2.tar.gz.incomplete --connect-timeout 5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1969k 100 1969k 0 0 611k 0 0:00:03 0:00:03 --:--:-- 611k
==> Verifying pkg-config-0.29.2.tar.gz checksum
tar xzf /var/lib/nethserver/home/matthieu/.cache/Homebrew/pkg-config-0.29.2.tar.gz
==> ./configure --disable-debug --prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/pkg-config/0.29.2 --disable-host-tool --with-internal-glib --with-pc-path=/var/lib/nethserver/home/matthieu/.linuxbrew/lib/pkgconfig:/var/lib/nethserver/home/matthieu/.linuxbrew/share/pkgconfig/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/os/linux/pkgconfig
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc-5
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-5 accepts -g... yes
checking for gcc-5 option to accept ISO C89... none needed
checking whether gcc-5 understands -c and -o together... yes
checking dependency style of gcc-5... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc-5... /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld
checking if the linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B
checking the name lister (/var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B output from gcc-5 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc-5 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc-5 supports -fno-rtti -fno-exceptions... no
checking for gcc-5 option to produce PIC... -fPIC -DPIC
checking if gcc-5 PIC flag -fPIC -DPIC works... yes
checking if gcc-5 static flag -static works... yes
checking if gcc-5 supports -c -o file.o... yes
checking if gcc-5 supports -c -o file.o... (cached) yes
checking whether the gcc-5 linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc-5
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc-5 accepts -g... (cached) yes
checking for gcc-5 option to accept ISO C89... (cached) none needed
checking whether gcc-5 understands -c and -o together... (cached) yes
checking dependency style of gcc-5... (cached) gcc3
checking for ln... ln
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking for unistd.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for bash... /usr/bin/bash
checking for default search path for .pc files... /var/lib/nethserver/home/matthieu/.linuxbrew/lib/pkgconfig:/var/lib/nethserver/home/matthieu/.linuxbrew/share/pkgconfig/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/os/linux/pkgconfig
checking for system include path to avoid -I flags... /usr/include
checking for system library path to avoid -L flags... /usr/lib:/lib
configure: creating ./config.lt
config.lt: creating libtool
checking whether to list both direct and indirect dependencies... no
checking for Win32... no
checking if prefix should be redefined at runtime... no
checking if internal glib should be used... yes
checking if host- prefixed tool should be installed... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pkg.m4
config.status: creating check/Makefile
config.status: creating check/config.sh
config.status: creating config.h.win32
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in glib (/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/pkg-config/0.29.2' '--disable-debug' '--disable-host-tool' '--with-internal-glib' '--with-pc-path=/var/lib/nethserver/home/matthieu/.linuxbrew/lib/pkgconfig:/var/lib/nethserver/home/matthieu/.linuxbrew/share/pkgconfig/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/os/linux/pkgconfig' 'CC=gcc-5' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1992201105' is supported by ustar format... no
checking whether GID '1992200513' is supported by ustar format... no
checking how to create a ustar tar archive... none
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc-5
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-5 accepts -g... yes
checking for gcc-5 option to accept ISO C89... none needed
checking whether gcc-5 understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc-5... gcc3
checking how to run the C preprocessor... gcc-5 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the BeOS... no
checking for Win32... no
checking for the Android... no
checking for Mac OS X Carbon support... no
checking for Mac OS X Cocoa support... no
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking whether we are using the GNU C++ compiler... yes
checking whether g++-5 accepts -g... yes
checking dependency style of g++-5... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gawk... (cached) gawk
checking for perl5... no
checking for perl... perl
checking for indent... indent
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.5... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for iconv_open... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc-5... /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld
checking if the linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B
checking the name lister (/var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /var/lib/nethserver/home/matthieu/.linuxbrew/opt/binutils/bin/nm -B output from gcc-5 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc-5 supports -fno-rtti -fno-exceptions... no
checking for gcc-5 option to produce PIC... -fPIC -DPIC
checking if gcc-5 PIC flag -fPIC -DPIC works... yes
checking if gcc-5 static flag -static works... yes
checking if gcc-5 supports -c -o file.o... yes
checking if gcc-5 supports -c -o file.o... (cached) yes
checking whether the gcc-5 linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++-5 -E
checking for ld used by g++-5... /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64
checking if the linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++-5 linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64) supports shared libraries... yes
checking for g++-5 option to produce PIC... -fPIC -DPIC
checking if g++-5 PIC flag -fPIC -DPIC works... yes
checking if g++-5 static flag -static works... yes
checking if g++-5 supports -c -o file.o... yes
checking if g++-5 supports -c -o file.o... (cached) yes
checking whether the g++-5 linker (/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking for extra flags to get ANSI library prototypes... none needed
checking for extra flags for POSIX compliance... none needed
checking for vprintf... yes
checking for _doprnt... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for mmap... yes
checking for posix_memalign... yes
checking for memalign... yes
checking for valloc... yes
checking for fsync... yes
checking for pipe2... yes
checking for issetugid... no
checking for atexit... yes
checking for on_exit... yes
checking for timegm... yes
checking for gmtime_r... yes
checking for __libc_enable_secure... yes
checking size of char... 1
checking size of short... 2
checking size of long... 8
checking size of int... 4
checking size of void *... 8
checking size of long long... 8
checking size of __int64... 0
checking for sig_atomic_t... yes
checking for format to printf and scanf a guint64... %llu
checking for an ANSI C-conforming const... yes
checking for growing stack pointer... yes
checking for __inline... yes
checking for __inline__... yes
checking for inline... yes
checking if inline functions in headers work... yes
checking for working do while(0) macros... yes
checking for ISO C99 varargs macros in C... yes
checking for ISO C99 varargs macros in C++... yes
checking for GNUC varargs macros... yes
checking for GNUC visibility attribute... yes
checking whether using Sun Studio C compiler... no
checking whether byte ordering is bigendian... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/vmount.h usability... no
checking sys/vmount.h presence... no
checking for sys/vmount.h... no
checking sys/statfs.h usability... yes
checking sys/statfs.h presence... yes
checking for sys/statfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking sys/mnttab.h usability... no
checking sys/mnttab.h presence... no
checking for sys/mnttab.h... no
checking sys/vfstab.h usability... no
checking sys/vfstab.h presence... no
checking for sys/vfstab.h... no
checking sys/mntctl.h usability... no
checking sys/mntctl.h presence... no
checking for sys/mntctl.h... no
checking fstab.h usability... yes
checking fstab.h presence... yes
checking for fstab.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking linux/magic.h usability... yes
checking linux/magic.h presence... yes
checking for linux/magic.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking for sys/mount.h... yes
checking for sys/sysctl.h... yes
checking for sysctlbyname... no
checking xlocale.h usability... yes
checking xlocale.h presence... yes
checking for xlocale.h... yes
checking for struct stat.st_mtimensec... no
checking for struct stat.st_mtim.tv_nsec... yes
checking for struct stat.st_atimensec... no
checking for struct stat.st_atim.tv_nsec... yes
checking for struct stat.st_ctimensec... no
checking for struct stat.st_ctim.tv_nsec... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct statfs.f_fstypename... no
checking for struct statfs.f_bavail... yes
checking for struct statvfs.f_basetype... no
checking for struct statvfs.f_fstypename... no
checking for struct tm.tm_gmtoff... yes
checking for struct tm.__tm_gmtoff... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for struct dirent.d_type... yes
checking for nl_langinfo and CODESET... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for setlocale... yes
checking whether we are using the GNU C Library 2.1 or newer... yes
checking size of size_t... 8
checking for the appropriate definition for size_t... unsigned long
checking size of ssize_t... 8
checking for the appropriate definition for ssize_t... long
checking for lstat... yes
checking for strerror... yes
checking for strsignal... yes
checking for memmove... yes
checking for vsnprintf... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for poll... yes
checking for getcwd... yes
checking for vasprintf... yes
checking for setenv... yes
checking for unsetenv... yes
checking for getc_unlocked... yes
checking for readlink... yes
checking for symlink... yes
checking for fdwalk... no
checking for memmem... yes
checking for chown... yes
checking for lchmod... no
checking for lchown... yes
checking for fchmod... yes
checking for fchown... yes
checking for link... yes
checking for utimes... yes
checking for getgrgid... yes
checking for getpwuid... yes
checking for getresuid... yes
checking for getmntent_r... yes
checking for setmntent... yes
checking for endmntent... yes
checking for hasmntopt... yes
checking for getfsstat... no
checking for getvfsstat... no
checking for fallocate... yes
checking for splice... yes
checking for prlimit... yes
checking for statvfs... yes
checking for statfs... yes
checking whether to use statfs or statvfs... statfs
checking crt_externs.h usability... no
checking crt_externs.h presence... no
checking for crt_externs.h... no
checking for _NSGetEnviron... no
checking for newlocale... yes
checking for uselocale... yes
checking for strtod_l... yes
checking for strtoll_l... yes
checking for strtoull_l... yes
checking for C99 vsnprintf... yes
checking whether printf supports positional parameters... yes
checking value of AF_INET... 2
checking value of AF_INET6... 10
checking value of AF_UNIX... 1
checking value of MSG_PEEK... 2
checking value of MSG_OOB... 1
checking value of MSG_DONTROUTE... 4
checking for getprotobyname_r... yes
checking for endservent... yes
checking for if_nametoindex... yes
checking for if_indextoname... yes
checking if arpa/nameser_compat.h is needed... no
checking for res_query... in -lresolv
checking for socket... yes
checking for res_init... yes
checking for linux/netlink.h... yes
checking for struct ip_mreqn... yes
checking number of arguments to statfs()... 2
checking for signed... yes
checking for long long... yes
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for size_t... (cached) yes
checking for ptrdiff_t... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for snprintf... yes
checking for wcslen... yes
checking for C99 snprintf... yes
checking for fd_set... yes, found in sys/types.h
checking for nl_langinfo (CODESET)... yes
checking for nl_langinfo (PM_STR)... yes
checking for nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)... yes
checking for a compliant posix_memalign() implementation... yes
checking for OpenBSD strlcpy/strlcat... no
checking for an implementation of va_copy()... yes
checking for an implementation of __va_copy()... yes
checking whether va_lists can be copied by value... no
checking for dlopen... no
checking for NSLinkModule... no
checking for dlopen in -ldl... yes
checking for dlsym in -ldl... yes
checking for RTLD_GLOBAL brokenness... no
checking for preceeding underscore in symbols... no
checking for dlerror... yes
checking for the suffix of module shared libraries... .so
checking for gspawn implementation... gspawn.lo
checking for GIOChannel implementation... giounix.lo
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking for inotify_init1... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking for platform-dependent source...
checking whether to compile timeloop... yes
checking if building for some Win32 platform... no
checking for thread implementation... posix
checking thread related cflags... -pthread
checking thread related libraries... -pthread
checking for localtime_r... yes
checking for gmtime_r... (cached) yes
checking for posix getpwuid_r... yes
checking for posix getgrgid_r... yes
checking for pthread_attr_setstacksize... yes
checking for pthread_condattr_setclock... yes
checking for pthread_cond_timedwait_monotonic... no
checking for pthread_cond_timedwait_monotonic_np... no
checking for clock_gettime... yes
checking for lock-free atomic intrinsics... yes
checking for futex(2) system call... yes
checking for eventfd(2) system call... yes
checking value of POLLIN... 1
checking value of POLLOUT... 4
checking value of POLLPRI... 2
checking value of POLLERR... 8
checking value of POLLHUP... 16
checking value of POLLNVAL... 32
checking for broken poll... no
checking for EILSEQ... yes
checking for guint32... yes
checking alignment of guint32... 4
checking for guint64... yes
checking alignment of guint64... 8
checking for unsigned long... yes
checking alignment of unsigned long... 8
checking for -Bsymbolic-functions linker flag... yes
checking for -fvisibility=hidden compiler flag... yes
checking if gcc-5 supports flag -Wall in envvar CFLAGS... yes
checking if gcc-5 supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=declaration-after-statement in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=missing-prototypes in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=implicit-function-declaration in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=pointer-arith in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=init-self in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=format-security in envvar CFLAGS... no
checking if gcc-5 supports flag -Werror=format=2 in envvar CFLAGS... yes
checking if gcc-5 supports flag -Werror=missing-include-dirs in envvar CFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating glib/Makefile
config.status: creating glib/libcharset/Makefile
config.status: creating glib/gnulib/Makefile
config.status: creating m4macros/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing glib/glibconfig.h commands
==> make
make all-recursive
make[1]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2'
Making all in glib
make[2]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
make all-recursive
make[3]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
Making all in .
make[4]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
make[4]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
Making all in m4macros
make[4]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/m4macros'
make all-am
make[5]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/m4macros'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/m4macros'
make[4]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/m4macros'
Making all in glib
make[4]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
GEN glibconfig-stamp
config.status: executing glib/glibconfig.h commands
config.status: glib/glibconfig.h is unchanged
make all-recursive
make[5]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
Making all in libcharset
make[6]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib/libcharset'
make all-am
make[7]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib/libcharset'
CC libcharset_la-localcharset.lo
GEN ref-add.sed
GEN ref-del.sed
GEN charset.alias
CCLD libcharset.la
make[7]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib/libcharset'
make[6]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib/libcharset'
Making all in .
make[6]: Entering directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
CC libglib_2_0_la-gallocator.lo
CC libglib_2_0_la-gcache.lo
CC libglib_2_0_la-gcompletion.lo
CC libglib_2_0_la-grel.lo
CC libglib_2_0_la-gthread-deprecated.lo
CC libglib_2_0_la-garray.lo
CC libglib_2_0_la-gasyncqueue.lo
CC libglib_2_0_la-gatomic.lo
CC libglib_2_0_la-gbacktrace.lo
CC libglib_2_0_la-gbase64.lo
CC libglib_2_0_la-gbitlock.lo
CC libglib_2_0_la-gbookmarkfile.lo
CC libglib_2_0_la-gbytes.lo
CC libglib_2_0_la-gcharset.lo
CC libglib_2_0_la-gchecksum.lo
CC libglib_2_0_la-gconvert.lo
CC libglib_2_0_la-gdataset.lo
CC libglib_2_0_la-gdate.lo
CC libglib_2_0_la-gdatetime.lo
CC libglib_2_0_la-gdir.lo
CC libglib_2_0_la-genviron.lo
CC libglib_2_0_la-gerror.lo
CC libglib_2_0_la-gfileutils.lo
CC libglib_2_0_la-ggettext.lo
In file included from ggettext.c:30:0:
ggettext.c: In function 'ensure_gettext_initialized':
glibintl.h:37:42: warning: statement with no effect [-Wunused-value]
#define bindtextdomain(Domain,Directory) (Domain)
^
ggettext.c:109:7: note: in expansion of macro 'bindtextdomain'
bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
^
CC libglib_2_0_la-ghash.lo
CC libglib_2_0_la-ghmac.lo
CC libglib_2_0_la-ghook.lo
CC libglib_2_0_la-ghostutils.lo
CC libglib_2_0_la-giochannel.lo
CC libglib_2_0_la-gkeyfile.lo
giochannel.c: In function 'g_io_channel_set_encoding':
giochannel.c:1343:12: warning: variable 'did_encode' set but not used [-Wunused-but-set-variable]
gboolean did_encode;
^
giochannel.c: In function 'g_io_error_get_from_g_error':
giochannel.c:298:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
CC libglib_2_0_la-glib-init.lo
CC libglib_2_0_la-glib-private.lo
CC libglib_2_0_la-glist.lo
CC libglib_2_0_la-gmain.lo
gmain.c: In function 'g_main_context_push_thread_default':
gmain.c:720:12: warning: variable 'acquired_context' set but not used [-Wunused-but-set-variable]
gboolean acquired_context;
^
CC libglib_2_0_la-gmappedfile.lo
CC libglib_2_0_la-gmarkup.lo
CC libglib_2_0_la-gmem.lo
CC libglib_2_0_la-gmessages.lo
CC libglib_2_0_la-gnode.lo
CC libglib_2_0_la-goption.lo
CC libglib_2_0_la-gpattern.lo
CC libglib_2_0_la-gpoll.lo
CC libglib_2_0_la-gprimes.lo
CC libglib_2_0_la-gqsort.lo
CC libglib_2_0_la-gquark.lo
CC libglib_2_0_la-gqueue.lo
CC libglib_2_0_la-grand.lo
grand.c: In function 'g_rand_int_range':
**grand.c:495:6: internal compiler error: Illegal instruction
(G_RAND_DOUBLE_TRANSFORM +
^
CC libglib_2_0_la-gscanner.lo**
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
make[6]: *** [libglib_2_0_la-grand.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pkg-config-20170418-12323-1vpj9ea/pkg-config-0.29.2'
make: *** [all] Error 2
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/build.rb (Formulary::TapLoader): loading /var/lib/nethserver/home/matthieu/.linuxbrew/Library/Taps/linuxbrew/homebrew-xorg/xorg.rb
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/debrew.rb:11:in `raise'
FormulaUnavailableError: No available formula with the name "xorg"
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:
pkg-config includes an internal copy of glib. I didn't know that.
Please reportā¦
brew gist-logs pkg-config
Tryā¦
brew remove gcc gmp
brew install -s gmp
brew install gcc
brew install pkg-config
Sure. Thanks for helping !
[email protected]@mattlabs:~$ brew gist-logs pkg-config
--> https://gist.github.com/anonymous/cda2d5d55d73065ade13a0fb51f48d73
[email protected]@mattlabs:~$ brew remove gcc gmp
Error: Refusing to uninstall /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1
because it is required by mpfr, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies gcc gmp
whatever, let's remove mfr too :
[email protected]@mattlabs:~$ brew remove gcc gmp mpfr
Error: Refusing to uninstall /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1, /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/mpfr/3.1.5
because they are required by libmpc, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies gcc gmp mpfr
Ok.. Should I really let brew ignore the dependencies ?
Happy to help! Remove gcc and all of its dependencies.
brew remove gmp isl libmpc mpfr gcc
brew install -s gmp
brew install gcc
brew install pkg-config
[email protected]@mattlabs:~$ brew remove gmp isl libmpc mpfr gcc
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1... (20 files, 3.5MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/isl/0.15... (71 files, 4.5MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/libmpc/1.0.3... (12 files, 446.7KB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/mpfr/3.1.5... (26 files, 3.8MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gcc/5.3.0... (1,352 files, 253MB)
[email protected]@mattlabs:~$ brew install -s gmp
==> Downloading https://gmplib.org/download/gmp/gmp-6.1.1.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp
Last 15 lines from /var/lib/nethserver/home/matthieu/.cache/Homebrew/Logs/gmp/01.configure:
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler gcc-4.8 ... no
checking ABI=x32
checking compiler gcc-4.8 ... no
checking ABI=32
checking compiler gcc-4.8 ... no
configure: error: could not find a working compiler, see config.log for details
READ THIS: https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
[email protected]@mattlabs:~$ 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 and just ignore them. Thanks!
Warning: Broken symlinks were found. Remove them with `brew prune`:
/var/lib/nethserver/home/matthieu/.linuxbrew/bin/c++
/var/lib/nethserver/home/matthieu/.linuxbrew/bin/cc
1 [email protected]@mattlabs:~$ brew prune
Pruned 2 symbolic links from /var/lib/nethserver/home/matthieu/.linuxbrew
md5-f13db748c6fe473ec3bf95bf842e1910
[email protected]@mattlabs:~$ brew install -s gmp
==> Downloading https://gmplib.org/download/gmp/gmp-6.1.1.tar.xz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/gmp-6.1.1.tar.xz
==> ./configure --prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1 --enable-cxx
Last 15 lines from /var/lib/nethserver/home/matthieu/.cache/Homebrew/Logs/gmp/01.configure:
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking compiler gcc-4.8 ... no
configure: error: could not find a working compiler, see config.log for details
READ THIS: https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
[email protected]@mattlabs:~$ brew install -s gcc
==> Installing dependencies for gcc: gmp, mpfr, libmpc, isl
==> Installing gcc dependency: gmp
==> Downloading https://linuxbrew.bintray.com/bottles/gmp-6.1.1.x86_64_linux.bottle.1.tar.gz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/gmp-6.1.1.x86_64_linux.bottle.1.tar.gz
==> Pouring gmp-6.1.1.x86_64_linux.bottle.1.tar.gz
šŗ /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1: 20 files, 3.5MB
==> Installing gcc dependency: mpfr
==> Downloading https://linuxbrew.bintray.com/bottles/mpfr-3.1.5.x86_64_linux.bottle.tar.gz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/mpfr-3.1.5.x86_64_linux.bottle.tar.gz
==> Pouring mpfr-3.1.5.x86_64_linux.bottle.tar.gz
šŗ /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/mpfr/3.1.5: 26 files, 3.8MB
==> Installing gcc dependency: libmpc
==> Downloading https://linuxbrew.bintray.com/bottles/libmpc-1.0.3.x86_64_linux.bottle.tar.gz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/libmpc-1.0.3.x86_64_linux.bottle.tar.gz
==> Pouring libmpc-1.0.3.x86_64_linux.bottle.tar.gz
šŗ /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/libmpc/1.0.3: 12 files, 446.7KB
==> Installing gcc dependency: isl
==> Downloading https://linuxbrew.bintray.com/bottles/isl-0.15.x86_64_linux.bottle.tar.gz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/isl-0.15.x86_64_linux.bottle.tar.gz
==> Pouring isl-0.15.x86_64_linux.bottle.tar.gz
šŗ /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/isl/0.15: 71 files, 4.5MB
==> Installing gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2
==> Downloading from http://gnu.xl-mirror.nl/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2
######################################################################## 100.0%
==> ../configure --with-native-system-header-dir=/var/lib/nethserver/home/matthieu/.linuxbrew/include --with-local-prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/local
Last 15 lines from /var/lib/nethserver/home/matthieu/.cache/Homebrew/Logs/gcc/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... /usr/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.8
checking for C compiler default output file name...
configure: error: in `/tmp/gcc-20170418-3840-1l91zmd/gcc-5.3.0/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
READ THIS: https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
These open issues may also help:
gcc install not properly updating links https://github.com/Homebrew/homebrew-core/issues/11990
gcc: Hack version_suffix to fix --HEAD builds https://github.com/Homebrew/homebrew-core/pull/7642
Waiting for instructions :-)
Please reportā¦
brew remove gmp isl libmpc mpfr gcc
brew install -s gmp
brew gist-logs gmp
[email protected]@mattlabs:~$ brew remove gmp isl libmpc mpfr gcc
Error: No such keg: /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gcc
[email protected]@mattlabs:~$ brew install -s gmp
Warning: gmp-6.1.1 already installed
md5-f13db748c6fe473ec3bf95bf842e1910
[email protected]@mattlabs:~$ brew gist-logs gmp
https://gist.github.com/f22e1ced1cc055c3a033cd72fe51975b
Things are getting messy... :-S
/var/lib/nethserver/home/matthieu/.linuxbrew/Library/Homebrew/shims/linux/super/gcc-4.8:352:in `exec': No such file or directory - gcc-4.8 (Errno::ENOENT)
https://gist.github.com/anonymous/f22e1ced1cc055c3a033cd72fe51975b#file-config-log-L72
Please reportā¦
which -a gcc-4.8
ls -l /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8
/var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 --version
$ which -a gcc-4.8
~/.linuxbrew/bin/gcc-4.8
$ ls -l /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8
lrwxrwxrwx 1 [email protected] domain [email protected] 12 Apr 18 07:56 /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 -> /usr/bin/gcc
md5-f13db748c6fe473ec3bf95bf842e1910
$ /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 --version
gcc-4.8 (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Copyright (C) 2015 Free Software Foundation, Inc.
Ah, this is a bug in --env=super. Tryā¦
brew remove gmp isl libmpc mpfr gcc
brew install -s --env=std gmp
brew install gcc
brew install pkg-config
1 [email protected]@mattlabs:~$ brew remove gmp isl libmpc mpfr gcc
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1... (20 files, 3.5MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/isl/0.15... (71 files, 4.5MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/libmpc/1.0.3... (12 files, 446.7KB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/mpfr/3.1.5... (26 files, 3.8MB)
Uninstalling /var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gcc/5.3.0... (1,352 files, 253MB)
[email protected]@mattlabs:~$ brew install -s --env=std gmp
==> Downloading https://gmplib.org/download/gmp/gmp-6.1.1.tar.xz
Already downloaded: /var/lib/nethserver/home/matthieu/.cache/Homebrew/gmp-6.1.1.tar.xz
==> ./configure --prefix=/var/lib/nethserver/home/matthieu/.linuxbrew/Cellar/gmp/6.1.1 --enable-cxx
Last 15 lines from /var/lib/nethserver/home/matthieu/.cache/Homebrew/Logs/gmp/01.configure:
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking whether /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 is gcc... yes
checking compiler /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 -Os -w -pipe -march=native -isystem/var/lib/nethserver/home/matthieu/.linuxbrew/include... no, program does not run
checking ABI=x32
checking whether /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 is gcc... yes
checking compiler /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 -Os -w -pipe -march=native -isystem/var/lib/nethserver/home/matthieu/.linuxbrew/include... no, program does not run
checking ABI=32
checking whether /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 is gcc... yes
checking compiler /var/lib/nethserver/home/matthieu/.linuxbrew/bin/gcc-4.8 -Os -w -pipe -march=native -isystem/var/lib/nethserver/home/matthieu/.linuxbrew/include... no, program does not run
configure: error: could not find a working compiler, see config.log for details
I feel like turning round :)
š brew gist-logs gmp pleaseā¦
Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like pkg-config.
From config.log
configure:5806: /var/lib/nethserver/home/sjackman/.linuxbrew/bin/gcc-4.8 -Os -w
-pipe -march=native -isystem/var/lib/nethserver/home/sjackman/.linuxbrew/include
conftest.c >&5
configure:5809: $? = 0
configure:5814: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
./configure: line 5815: 4124 Segmentation fault (core dumped) ./a.out
Tryā¦
brew remove gmp isl libmpc mpfr gcc
brew unlink glibc
rm -f ~/.linuxbrew/lib/ld.so
brew install -s --env=std gmp
brew link glibc
brew install gcc
brew install pkg-config
When I did this, the make check step of gmp failed. I'm not sure why. To circumvent it, I ran brew edit gmp and commented out the line system "make", "check"
After all that, I was able to successfully install pkg-config.
See /var/lib/nethserver/home/sjackman/.linuxbrew/Cellar/pkg-config/0.29.2/bin/pkg-config
Thanks for taking that time !
I succeeded building pkg-config following your recommandations.
However, my original goal was installing vdirsyncer (brew install vdirsyncer) and I ran again into some other problems this time related to python3 setuptools.
I don't want to spend more time anymore on this, since apparently linuxbrew is still too instable for me right now. I hope that this beautiful project will get more mature with time, I believe it deserves it.
Thanks again !
Matt
No worries, Matt. Sorry it wasn't smooth sailing for you this time around. I've opened a PR to attempt to reproduce your issue with vdirsyncer. https://github.com/Linuxbrew/homebrew-core/pull/2420
PR #2420 successfully built a binary bottle for vdirsyncer. The bottle is marked as being non-relocatable. Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like vdirsyncer.
Another possible workaround for you is brew install --force-bottle vdirsyncer, but no promises.
The fact is that I don't really understand the inners of homebrew, which is precisely why I want to use it : a slick and easy to use package manager that just do what it is made for : install packages in heterogeneous environments and forget about it.
However I'd like to give it one more try because I'm stubborn :-) But how do I install homebrew in another directory ?
Do you have sudo permissions? If so, use sudo to create a linuxbrew user, and then sudo -u linuxbrew and follow the usual installation instructions at http://linuxbrew.sh
Otherwise ask your system administrator to create a linuxbrew user whose home directory is /home/linuxbrew
Or once you have the permissions set up so that your usual user has write access to /home/linuxbrew, run
git clone https://github.com/Linuxbrew/brew /home/linuxbrew/.linuxbrew
PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
brew update
brew install -s --env=std gmp
brew install gcc
brew install vdirsyncer
Success ! I do have sudo access and I simply git cloned to the /home/linuxbrew/.linuxbrew then chowned the directory to myself.
Then brew install hello successfully, then directly vdrisyncer. Everything went like it has always been : desperately simple.
So the whole story looks related to a folder and non-relocatable packages ?
That's great! I'm glad to hear that you got it working. :tada:
Installing in /home/linuxbrew/.linuxbrew makes everything way easier, because you don't have to compile from source, particularly non-relocatable bottles.
See https://github.com/Linuxbrew/brew/wiki/FAQ#why-install-in-homelinuxbrewlinuxbrew
You ran into a bug in the gmp binary bottle which makes it fail with an illegal instruction error Intel Merom processors circa 2007, which is why you had to rebuild gmp from source. It's really that issue that caused most of your grief. A CPU from 2008 or newer should have less trouble. It is a bug though. Bottles are intended to work on older CPUs.
So why not installing brew into /usr/local/bin/ like on our good ol' mac ?
The two primary reasons areā¦
linuxbrew user than to ask for write permissions to /usr/local/usr/local/lib is in the default search path of the host, so putting files in there can break your host's executables. It's better to keep the two systems (host and Linuxbrew) separate.But I might miss some aspects of the issue. I just wanted to balance the fact that trying to be as universal and location agnostic as possible is good but not at the price of destroying the user experience.
All this said based on my own experience. Maybe it works for 99% of the people, i don't know.
sudo access, for users of shared computer resources at universities and companies./usr/local and links all of its libraries in /usr/local/lib, which can break host executables.⦠but not at the price of destroying the user experience.
I agree with this :100:. The installation instructions and default installer need to heavily recommend installing in /home/linuxbrew/.linuxbrew if possible and ~/.linuxbrew only if ~linuxbrew is not possible.