I have tried installing GCC48 using following command:
brew install gcc48
I get the following error:
==> make
Last 15 lines from /soe/rojinsafavi/.cache/Homebrew/Logs/gmp@4/02.make:
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-415.o scanf/.libs/scanf.o .libs/libgmp.la-414.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-416.o scanf/.libs/sscanf.o .libs/libgmp.la-415.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-417.o scanf/.libs/sscanffuns.o .libs/libgmp.la-416.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-418.o scanf/.libs/vfscanf.o .libs/libgmp.la-417.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-419.o scanf/.libs/vscanf.o .libs/libgmp.la-418.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -Os -w -pipe -march=native -m64 -nostdlib -Wl,-r -o .libs/libgmp.la-420.o scanf/.libs/vsscanf.o .libs/libgmp.la-419.o
/soe/rojinsafavi/.linuxbrew/bin/gcc-5 -shared .libs/libgmp.la-420.o -L/soe/rojinsafavi/.linuxbrew/lib -march=native -m64 -Wl,--dynamic-linker=/soe/rojinsafavi/.linuxbrew/lib/ld.so -Wl,-rpath -Wl,/soe/rojinsafavi/.linuxbrew/lib -Wl,-soname -Wl,libgmp.3.dylib -o .libs/libgmp.3.5.2.dylib
/soe/rojinsafavi/.linuxbrew/bin/ld: .libs/libgmp.la-420.o: relocation R_X86_64_32 against symbol `__gmp_sscanf_funs' can not be used when making a shared object; recompile with -fPIC
/soe/rojinsafavi/.linuxbrew/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [libgmp.la] Error 1
make[2]: Leaving directory `/tmp/gmp@4-20170214-20603-1indugh/gmp-4.3.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gmp@4-20170214-20603-1indugh/gmp-4.3.2'
make: *** [all] Error 2
Also, Is it possible to uninstall the current gcc ? right now linuxbrew contains gcc 5, but I would like to change it to a lower version. I was not sure how to do that.
Thanks!
Currently only your host GCC compiler and gcc-5 are supported on Linuxbrew. We hope to add support for the GCC 4.x and GCC 6 in the future.
gcc 4.8 is pretty old. imho it would be better to leave it behind and focus on newer versions. gcc 7 is just around the corner.
@rojinsafavi You may wish to try installing gcc-4.8 using your host's compiler (/usr/bin/gcc). If for example that's GCC 4.4, try…
brew install --cc=gcc-4.4 [email protected]
If that fails, try
brew install --cc=gcc-4.4 --env=std [email protected]
Most helpful comment
gcc 4.8 is pretty old. imho it would be better to leave it behind and focus on newer versions. gcc 7 is just around the corner.