tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/gcc5 failing on macOS; which Fortran compiler?



Hi!

As far as I know, XCode on macOS does not come with a Fortran compiler. Joerg recommended I install gcc5 to get gfortran. However, the build breaks because there is no /usr/include:

if [ -d ../prev-gcc ]; then \
	  cd ../prev-gcc && \
	  /Applications/Xcode.app/Contents/Developer/usr/bin/gnumake real-install-headers-tar DESTDIR=`pwd`/../gcc/ \
	    libsubdir=. ; \
	else \
	  set -e; for ml in `cat fixinc_list`; do \
	    sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \
	    multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \
	    fix_dir=include-fixed${multi_dir}; \
	    if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \
	      echo The directory that should contain system headers does not exist: >&2 ; \
	      echo "  `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \
	      tooldir_sysinc=`echo "/opt/pkg/gcc5/lib/gcc/x86_64-apple-darwin16/5.4.0/../../../../x86_64-apple-darwin16/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
	      if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \
	      then sleep 1; else exit 1; fi; \
	    fi; \
	    /bin/sh ../../gcc-5.4.0/gcc/../mkinstalldirs ${fix_dir}; \
	    chmod a+rx ${fix_dir} || true; \
	    (TARGET_MACHINE='x86_64-apple-darwin16'; srcdir=`cd ../../gcc-5.4.0/gcc; ${PWDCMD-pwd}`; \
	      SHELL='/bin/sh'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \
	      gcc_dir=`${PWDCMD-pwd}` ; \
	      export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
	      cd ../build-x86_64-apple-darwin16/fixincludes && \
	      /bin/sh ./fixinc.sh "${gcc_dir}/${fix_dir}" \
	        `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`  ); \
	    rm -f ${fix_dir}/syslimits.h; \
	    if [ -f ${fix_dir}/limits.h ]; then \
	      mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \
	    else \
	      cp ../../gcc-5.4.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \
	    fi; \
	    chmod a+r ${fix_dir}/syslimits.h; \
	  done; \
	fi
The directory that should contain system headers does not exist:
  /usr/include
gnumake[3]: *** [stmp-fixinc] Error 1
rm gcc.pod
gnumake[2]: *** [all-stage1-gcc] Error 2
gnumake[1]: *** [stage1-bubble] Error 2
gnumake: *** [all] Error 2
*** Error code 2

Any suggestions? Is there a supported Fortran compiler for macOS? Jonathan, which one do you use?

—Benny.


Home | Main Index | Thread Index | Old Index