============================================================
output from the emerge attempt:
============================================================
*** Fortran Compiler
checking for g77... no
checking for f77... no
checking for fort77... no
checking for f90... no
configure: WARNING: *** Could not find FORTRAN compiler. Either use
configure: WARNING: *** --with-fc to specify the FORTRAN compiler, or
configure: WARNING: *** --without-fc to specify no FORTRAN support
configure: error: Cannot continue current configuration without FORTRAN
compiler
============================================================
emerge --info
============================================================
Portage 2.0.54-r2 (default-linux/amd64/2005.1, gcc-4.1.1, glibc-2.3.6-r3,
2.6.16-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r7 x86_64 Dual Core AMD Opteron(tm) Processor 275
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python: 2.3.5-r2, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache: 2.3
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils: 2.16.1-r2
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -mtune=opteron -O3 -pipe -msse -msse2 -funit-at-a-time
-fomit-frame-pointer -frename-registers -fweb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=opteron -mtune=opteron -O3 -pipe -msse -msse2 -funit-at-a-time
-fomit-frame-pointer -frename-registers -fweb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d alsa apache2 arts audiofile avi berkdb bitmap-fonts blas
bzip2 cdr cli crypt cups curl dri dvd dvdr dvdread eds emboss encode esd exif
expat fam ffmpeg flac foomaticdb fortran gd gdbm gif gimpprint glut gmp gnome
gpm graphviz gstreamer gtk gtk2 idn imagemagick imlib ipv6 isdnlog ithreads
java jpeg junit kde lapack latex lcms ldap libwww lm_sensors lua lzw lzw-tiff
mad mng mozcalendar mozilla mozsvg mp3 mpeg mpi mysql ncurses nls nptl nsplugin
nvidia ogg opengl pam pcre pdflib plotutils png ppds pppd python qt quicktime
readline reflection ruby samba scanner sdl session slp smp spell spl ssl tcpd
tetex threads tiff toolbar truetype truetype-fonts type1-fonts udev unicode usb
v4l vorbis xanim xine xinerama xml xml2 xorg xpm xv zlib userland_GNU
kernel_linux elibc_glibc"
Unset: CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS,
PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Needs a change to line 61 of config/lam_prog_f77.m4 to add gfortran to the
list.
After that, add autotools to the inherit line at the top of the ebuild, and run
eautoreconf at the very end of src_unpack().
Or, as a workaround, you could do
# ln -s /usr/bin/gfortran /usr/bin/g77
which I did as octave missed the same command, although I had built gcc with
USE=fortran too.