Friday, October 9, 2015

GCC 5.2 on El Capitan

  I have problem with gfortran coming with Xcode. Apple is come with its version of gcc, using clang.

  So I uninstalled it.
Last login: Wed Oct  7 10:29:10 on ttys000
Nugrohos-MacBook-Air:~ nugroho$ gfortran-
gfortran-4.2        gfortran-uninstall  
Nugrohos-MacBook-Air:~ nugroho$ gfortran-4.2 
i686-apple-darwin8-gfortran-4.2: no input files
Nugrohos-MacBook-Air:~ nugroho$ gfortran-4.2 -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /Builds/unix/gcc/gcc-4.2/configure --prefix=/usr/local --mandir=/share/man --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --build=i686-apple-darwin8 --host=i686-apple-darwin8 --target=i686-apple-darwin8 --enable-languages=fortran
Thread model: posix
gcc version 4.2.3
Nugrohos-MacBook-Air:~ nugroho$ gfortran-uninstall 
rm: /usr/local/bin/gfortran-4.2: Permission denied
rm: /usr/local/bin/i686-apple-darwin8-gfortran-4.2: Permission denied
rm: /usr/local/bin/powerpc-apple-darwin8-gfortran-4.2: Permission denied
rm: /usr/local/info/gfortran.info: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/crt3.o: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/finclude/omp_lib.f90: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/finclude/omp_lib.h: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/finclude/omp_lib.mod: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/finclude/omp_lib_kinds.mod: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcc.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcc_eh.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcov.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgfortranbegin.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgfortranbegin.la: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/crt3.o: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgcc.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgcc_eh.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgcov.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgfortranbegin.a: Permission denied
rm: /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgfortranbegin.la: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/crt2.o: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/crt3.o: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/finclude/omp_lib.f90: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/finclude/omp_lib.h: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/finclude/omp_lib.mod: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/finclude/omp_lib_kinds.mod: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/libgcc.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/libgcc_eh.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/libgcov.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/libgfortranbegin.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/libgfortranbegin.la: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/crt3.o: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/libgcc.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/libgcc_eh.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/libgcov.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/libgfortranbegin.a: Permission denied
rm: /usr/local/lib/gcc/powerpc-apple-darwin8/4.2.3/ppc64/libgfortranbegin.la: Permission denied
rm: /usr/local/lib/libgcc_s.1.dylib: Permission denied
rm: /usr/local/lib/libgcc_s.10.4.dylib: Permission denied
rm: /usr/local/lib/libgcc_s.10.5.dylib: Permission denied
rm: /usr/local/lib/libgcc_s_ppc64.1.dylib: Permission denied
rm: /usr/local/lib/libgcc_s_x86_64.1.dylib: Permission denied
rm: /usr/local/lib/libgfortran.2.0.0.dylib: Permission denied
rm: /usr/local/lib/libgfortran.2.dylib: Permission denied
rm: /usr/local/lib/libgfortran.a: Permission denied
rm: /usr/local/lib/libgfortran.dylib: Permission denied
rm: /usr/local/lib/libgfortran.la: Permission denied
rm: /usr/local/lib/ppc64/libgfortran.2.0.0.dylib: Permission denied
rm: /usr/local/lib/ppc64/libgfortran.2.dylib: Permission denied
rm: /usr/local/lib/ppc64/libgfortran.a: Permission denied
rm: /usr/local/lib/ppc64/libgfortran.dylib: Permission denied
rm: /usr/local/lib/x86_64/libgfortran.2.0.0.dylib: Permission denied
rm: /usr/local/lib/x86_64/libgfortran.2.dylib: Permission denied
rm: /usr/local/lib/x86_64/libgfortran.a: Permission denied
rm: /usr/local/lib/x86_64/libgfortran.dylib: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/collect2: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/cc1: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/f951: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/install-tools/fixinc.sh: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/install-tools/fixincl: Permission denied
rm: /usr/local/libexec/gcc/i686-apple-darwin8/4.2.3/install-tools/mkheaders: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/collect2: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/cc1: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/f951: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/install-tools/fixinc.sh: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/install-tools/fixincl: Permission denied
rm: /usr/local/libexec/gcc/powerpc-apple-darwin8/4.2.3/install-tools/mkheaders: Permission denied
rm: /usr/local/bin/gfortran-uninstall: Permission denied
GNU Fortran was successfully uninstalled.
Nugrohos-MacBook-Air:~ nugroho$ sudo gfortran-uninstall 
Password:
GNU Fortran was successfully uninstalled.
Nugrohos-MacBook-Air:~ nugroho$     


  And install gcc from gnu.

  Some warning though, don't use isl-0.15, use 0.14 instead (or you'll get error on make process)