Installing g77 in Ubuntu/Kubuntu Intrepid 8.10

One of the biggest annoyance in updgrading to Kubuntu Intrepid is that g77 is no longer in repository. So I need to install g77 from source. To do that:
wget http://gcc.releasenotes.org/releases/gcc-3.4.6/gcc-3.4.6.tar.gz
tar xvzf gcc-3.4.6.tar.gz

then cd to that directory, and run configure with this options:
./configure --enable-languages=c,f77 --disable-checking --prefix=$HOME/local
make CC=/usr/bin/gcc
make install

more info in this post.

UPDATE: I am having some compilation eror, so I still don’t have g77 yet.

24 Responses

  1. There is a simpler way to install g77 on intrepid using hardy’s repositoires. Check te following forum post:
    http://ubuntuforums.org/showpost.php?p=6160836&postcount=14

  2. Hello,

    Have you tried gfortran already? Seems that gfortran replaced g77 from Intrepid 8.10 onwards.

  3. gfortran does not fully replace g77. fortran77 was the language of science back when standards were a dirty word. There are 100 ‘s of millions of lines of legacy code kicking about that cannot compile with gfortran.

    fortunately g77 is still part of the gcc-3.4 source package so with a couple of tweaks you can rebuild the new pkg so that g77 is compiled against the latest libc etc. A bit of munging required but here she goes

    Step 1 – get the packages
    =====================
    # sudo apt-get build-dep gcc-3.4
    # sudo apt-get install fakeroot
    # apt-get source gcc-3.4

    now cd into the newly extracted source/build tree

    # cd gcc-3.4-*/debian

    Step2 – Mung with the build rules
    =========================
    there are 2 files that need to be edited

    a) rules.conf
    —————
    search for the line:
    “addons = cdev libs libg2c lib64g2c lib32g2c # hppa64 c++dev fdev libs \”

    note that fdev is commented out , so change it to this

    addons = cdev libs libg2c lib64g2c lib32g2c fdev # hppa64 c++dev libs \

    b) rules.def – not sure if second is necessary but it doesn’t hurt
    ————–
    – search for the line
    “with_fdev := disabled for the gcc-3.4 build”

    – under this enter the following lines
    with_fortran := yes
    with_fdev := yes

    Step 3 – build
    ======
    # cd ..
    # dpkg-buildpackage -rfakeroot -nc -b

    go grab a coffee, this will take 20+ minutes

    Step 4
    ======
    cd .. and admire your pretty new debian/ubuntu packages
    install the lot using

    # dpkg -i –force-overwrite gcc-3.4*.deb libg2c*.deb cpp-3.4*.deb

    Step 5
    ======
    Painlessly recompile the code written 34 years ago by some now senile math professor

    • pendat
      Step 4
      ======
      cd .. and admire your pretty new debian/ubuntu packages
      install the lot using

      Il affiche
      Les options marquées d’un [*] affichent beaucoup d’informations – tubez-les à travers « less » ou « more ».

      Merci

  4. Step 6 – oops forgot this bit
    =====
    # cd /usr/bin
    #sudo ln -s g77-3.4 g77

  5. It’s way more simple, do a
    sudo apt-get install fort77
    and you can use your f77

  6. ¡OLD POST ARISE!

    Everything looked good until it was proved wrong. After downloading all the files (except fakeroot wich I didn’t) I try to install g77 in my ubuntu 8.10 machine and get these errors, this is the log(hope it’s not too big):

    root@teclavoladora:~/gcc-3.4-3.4.6# dpkg-buildpackage -us -uc
    dpkg-buildpackage: establecer CFLAGS como valor predeterminado: -g -O2
    dpkg-buildpackage: establecer CPPFLAGS como valor predeterminado:
    dpkg-buildpackage: establecer LDFLAGS como valor predeterminado: -Wl,-Bsymbolic-functions
    dpkg-buildpackage: establecer FFLAGS como valor predeterminado: -g -O2
    dpkg-buildpackage: establecer CXXFLAGS como valor predeterminado: -g -O2
    dpkg-buildpackage: Paquete fuente gcc-3.4
    dpkg-buildpackage: Versión fuente 3.4.6-8ubuntu2
    dpkg-buildpackage: Fuente cambiadas por Matthias Klose
    dpkg-buildpackage: arquitectura de anfitrión i386
    debian/rules clean
    rm -rf stamps
    rm -rf gcc-3.4.6 gpc-20060215 p
    /usr/bin/make -f debian/rules2 clean
    make[1]: se ingresa al directorio `/home/arlex/gcc-3.4-3.4.6′
    dh_testdir
    rm -f pxxx status
    rm -f *-summary *-protocol testsuite-comparision summary-diff
    if [ -f /home/arlex/gcc-3.4-3.4.6/src/gcc/p/config-lang.in.debian ]; then \
    mv -f /home/arlex/gcc-3.4-3.4.6/src/gcc/p/config-lang.in.debian /home/arlex/gcc-3.4-3.4.6/src/gcc/p/config-lang.in; \
    else true; fi
    rm -f /home/arlex/gcc-3.4-3.4.6/src/gcc/po/*.gmo
    rm -f debian/lib{ffi,g2c,gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
    for f in debian/*-BV*; do \
    f2=$(echo $f | sed ‘s/BV/3.4/;s/PV/2.1/’); \
    rm -f $f2; \
    done
    rm -f debian/shlibs.local debian/substvars.local
    rm -f debian/*.debhelper
    [ -d debian/bugs ] && /usr/bin/make -C debian/bugs clean
    make[1]: [clean] Error 1 (no tiene efecto)
    rm -f debian/README.libstdc++-baseline
    rm -rf bin locales
    rm -rf check-inst
    rm -rf protector*
    dh_clean
    make[1]: se sale del directorio `/home/arlex/gcc-3.4-3.4.6′
    rm -rf /home/arlex/gcc-3.4-3.4.6/src /home/arlex/gcc-3.4-3.4.6/build* debian/tmp* html
    rm -f bootstrap-* first-move-stamp
    rm -f debian/*.tmp
    find debian -name ‘.#*’ | xargs rm -f
    chmod 644 debian/patches/*
    dh_clean
    dpkg-source -b gcc-3.4-3.4.6
    dpkg-source: aviso: Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address
    dpkg-source: aviso: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field
    dpkg-source: información: usando formato fuente `1.0′
    dpkg-source: información: building gcc-3.4 using existing gcc-3.4_3.4.6.orig.tar.gz
    dpkg-source: información: construyendo gcc-3.4 en gcc-3.4_3.4.6-8ubuntu2.diff.gz
    dpkg-source: información: construyendo gcc-3.4 en gcc-3.4_3.4.6-8ubuntu2.dsc
    debian/rules build
    : # unpack gcc tarball
    mkdir stamps
    if [ -d /home/arlex/gcc-3.4-3.4.6/src ]; then \
    echo >&2 “Source directory /home/arlex/gcc-3.4-3.4.6/src exists. Delete by hand”; \
    false; \
    fi
    rm -rf gcc-3.4.6
    case gcc-3.4.6.tar.bz2 in \
    *.bz2) tar -x –bzip2 -f gcc-3.4.6.tar.bz2;; \
    *.gz) tar -x –gzip -f gcc-3.4.6.tar.bz2;; \
    *) false; \
    esac
    mv gcc-3.4.6 /home/arlex/gcc-3.4-3.4.6/src
    echo “gcc-3.4.6.tar.bz2 unpacked.” > stamps/01-unpack-stamp-gcc-3.4.6.tar.bz2
    echo -e “\nBuilt from Debian source package gcc-3.4-3.4.6-8ubuntu2” \
    > pxxx
    echo -e “Integrated upstream packages in this version:\n” >> pxxx
    for i in gcc-3.4.6.tar.bz2 ; do echo ” $i” >> pxxx; done
    mv -f pxxx stamps/01-unpack-stamp
    if [ -x debian/patches/gcc-textdomain.dpatch ]; then true; else chmod +x debian/patches/gcc-textdomain.dpatch; fi
    if [ -f stamps/02-patch-stamp-gcc-textdomain ]; then \
    echo “gcc-textdomain patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/gcc-textdomain.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/Makefile.in
    Hunk #1 succeeded at 2337 (offset 26 lines).
    patching file gcc/intl.c
    echo “gcc-textdomain patches applied.” > stamps/02-patch-stamp-gcc-textdomain
    if [ -x debian/patches/rename-info-files.dpatch ]; then true; else chmod +x debian/patches/rename-info-files.dpatch; fi
    if [ -f stamps/02-patch-stamp-rename-info-files ]; then \
    echo “rename-info-files patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/rename-info-files.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/Makefile.in
    Hunk #1 succeeded at 2644 (offset 29 lines).
    Hunk #2 succeeded at 2690 (offset 29 lines).
    Hunk #3 succeeded at 3000 (offset 30 lines).
    Hunk #4 succeeded at 3175 (offset 33 lines).
    patching file gcc/doc/cpp.texi
    patching file gcc/doc/cppinternals.texi
    patching file gcc/doc/extend.texi
    Hunk #1 succeeded at 8463 (offset 792 lines).
    patching file gcc/doc/gcc.texi
    Hunk #1 succeeded at 64 (offset -15 lines).
    Hunk #2 succeeded at 128 (offset -3 lines).
    patching file gcc/doc/gccint.texi
    Hunk #1 succeeded at 48 (offset -17 lines).
    Hunk #2 succeeded at 83 (offset -31 lines).
    patching file gcc/doc/invoke.texi
    Hunk #1 succeeded at 768 (offset 5 lines).
    Hunk #2 succeeded at 5052 (offset 7 lines).
    Hunk #3 succeeded at 5060 (offset 7 lines).
    Hunk #4 succeeded at 11291 (offset 80 lines).
    Hunk #5 succeeded at 11450 (offset 87 lines).
    patching file gcc/doc/libgcc.texi
    patching file gcc/doc/makefile.texi
    patching file gcc/doc/passes.texi
    patching file gcc/doc/standards.texi
    patching file gcc/doc/trouble.texi
    patching file gcc/f/Make-lang.in
    Hunk #1 succeeded at 151 (offset -2 lines).
    Hunk #2 succeeded at 165 (offset -2 lines).
    Hunk #3 succeeded at 263 (offset -2 lines).
    Hunk #4 succeeded at 279 (offset -2 lines).
    patching file gcc/java/Make-lang.in
    Hunk #1 succeeded at 159 (offset 1 line).
    Hunk #2 succeeded at 236 (offset 1 line).
    patching file gcc/java/gcj.texi
    patching file gcc/treelang/Make-lang.in
    patching file gcc/treelang/treelang.texi
    patching file gcc/f/g77.texi
    echo “rename-info-files patches applied.” > stamps/02-patch-stamp-rename-info-files
    if [ -x debian/patches/libstdc++-pic.dpatch ]; then true; else chmod +x debian/patches/libstdc++-pic.dpatch; fi
    if [ -f stamps/02-patch-stamp-libstdc++-pic ]; then \
    echo “libstdc++-pic patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libstdc++-pic.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libstdc++-v3/src/Makefile.am
    Hunk #1 succeeded at 210 with fuzz 2 (offset -14 lines).
    patching file libstdc++-v3/src/Makefile.in
    Hunk #1 succeeded at 592 (offset 7 lines).
    Hunk #2 succeeded at 625 (offset 7 lines).
    Hunk #3 succeeded at 710 (offset 2 lines).
    echo “libstdc++-pic patches applied.” > stamps/02-patch-stamp-libstdc++-pic
    if [ -x debian/patches/libstdc++-doclink.dpatch ]; then true; else chmod +x debian/patches/libstdc++-doclink.dpatch; fi
    if [ -f stamps/02-patch-stamp-libstdc++-doclink ]; then \
    echo “libstdc++-doclink patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libstdc++-doclink.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libstdc++-v3/docs/doxygen/mainpage.html
    Hunk #2 succeeded at 75 (offset -3 lines).
    echo “libstdc++-doclink patches applied.” > stamps/02-patch-stamp-libstdc++-doclink
    if [ -x debian/patches/libstdc++-doxygen-syntax.dpatch ]; then true; else chmod +x debian/patches/libstdc++-doxygen-syntax.dpatch; fi
    if [ -f stamps/02-patch-stamp-libstdc++-doxygen-syntax ]; then \
    echo “libstdc++-doxygen-syntax patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libstdc++-doxygen-syntax.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libstdc++-v3/include/bits/basic_string.h
    echo “libstdc++-doxygen-syntax patches applied.” > stamps/02-patch-stamp-libstdc++-doxygen-syntax
    if [ -x debian/patches/amd64-specs.dpatch ]; then true; else chmod +x debian/patches/amd64-specs.dpatch; fi
    if [ -f stamps/02-patch-stamp-amd64-specs ]; then \
    echo “amd64-specs patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/amd64-specs.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/i386/x86-64.h
    Hunk #1 succeeded at 49 with fuzz 2.
    echo “amd64-specs patches applied.” > stamps/02-patch-stamp-amd64-specs
    if [ -x debian/patches/gccbug.dpatch ]; then true; else chmod +x debian/patches/gccbug.dpatch; fi
    if [ -f stamps/02-patch-stamp-gccbug ]; then \
    echo “gccbug patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/gccbug.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/gccbug.in
    echo “gccbug patches applied.” > stamps/02-patch-stamp-gccbug
    if [ -x debian/patches/gccbug-posix.dpatch ]; then true; else chmod +x debian/patches/gccbug-posix.dpatch; fi
    if [ -f stamps/02-patch-stamp-gccbug-posix ]; then \
    echo “gccbug-posix patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/gccbug-posix.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/gccbug.in
    echo “gccbug-posix patches applied.” > stamps/02-patch-stamp-gccbug-posix
    if [ -x debian/patches/hppa-toplevel.dpatch ]; then true; else chmod +x debian/patches/hppa-toplevel.dpatch; fi
    if [ -f stamps/02-patch-stamp-hppa-toplevel ]; then \
    echo “hppa-toplevel patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/hppa-toplevel.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file configure.in
    Hunk #1 succeeded at 489 (offset 7 lines).
    patching file configure
    Hunk #1 succeeded at 1250 (offset 7 lines).
    echo “hppa-toplevel patches applied.” > stamps/02-patch-stamp-hppa-toplevel
    if [ -x debian/patches/hppa-libffi.dpatch ]; then true; else chmod +x debian/patches/hppa-libffi.dpatch; fi
    if [ -f stamps/02-patch-stamp-hppa-libffi ]; then \
    echo “hppa-libffi patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/hppa-libffi.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libffi/Makefile.am
    patching file libffi/Makefile.in
    patching file libffi/configure.in
    Hunk #1 succeeded at 87 (offset 2 lines).
    Hunk #2 succeeded at 112 (offset 2 lines).
    patching file libffi/src/pa/ffi.c
    patching file libffi/src/pa/ffitarget.h
    patching file libffi/src/pa/linux.S
    patching file libffi/src/prep_cif.c
    echo “hppa-libffi patches applied.” > stamps/02-patch-stamp-hppa-libffi
    if [ -x debian/patches/fastjar-update.dpatch ]; then true; else chmod +x debian/patches/fastjar-update.dpatch; fi
    if [ -f stamps/02-patch-stamp-fastjar-update ]; then \
    echo “fastjar-update patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/fastjar-update.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file fastjar/Makefile.am
    patching file fastjar/Makefile.in
    patching file fastjar/compress.c
    patching file fastjar/compress.h
    patching file fastjar/fastjar.texi
    patching file fastjar/jartool.c
    patching file fastjar/jartool.h
    patching file fastjar/shift.c
    patching file fastjar/shift.h
    patching file fastjar/zipfile.h
    echo “fastjar-update patches applied.” > stamps/02-patch-stamp-fastjar-update
    if [ -x debian/patches/fastjar-version.dpatch ]; then true; else chmod +x debian/patches/fastjar-version.dpatch; fi
    if [ -f stamps/02-patch-stamp-fastjar-version ]; then \
    echo “fastjar-version patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/fastjar-version.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file fastjar/configure.ac
    patching file fastjar/configure
    echo “fastjar-version patches applied.” > stamps/02-patch-stamp-fastjar-version
    if [ -x debian/patches/boehm-gc-nocheck.dpatch ]; then true; else chmod +x debian/patches/boehm-gc-nocheck.dpatch; fi
    if [ -f stamps/02-patch-stamp-boehm-gc-nocheck ]; then \
    echo “boehm-gc-nocheck patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/boehm-gc-nocheck.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file boehm-gc/Makefile.in
    Hunk #1 succeeded at 547 with fuzz 2 (offset -115 lines).
    echo “boehm-gc-nocheck patches applied.” > stamps/02-patch-stamp-boehm-gc-nocheck
    if [ -x debian/patches/libltdl.dpatch ]; then true; else chmod +x debian/patches/libltdl.dpatch; fi
    if [ -f stamps/02-patch-stamp-libltdl ]; then \
    echo “libltdl patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libltdl.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libjava/libltdl/acinclude.m4
    patching file libjava/libltdl/config-h.in
    patching file libjava/libltdl/configure
    Hunk #1 succeeded at 19024 (offset -599 lines).
    patching file libjava/libltdl/ltdl.c
    echo “libltdl patches applied.” > stamps/02-patch-stamp-libltdl
    if [ -x debian/patches/m68k-update.dpatch ]; then true; else chmod +x debian/patches/m68k-update.dpatch; fi
    if [ -f stamps/02-patch-stamp-m68k-update ]; then \
    echo “m68k-update patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/m68k-update.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/m68k/m68k.md
    echo “m68k-update patches applied.” > stamps/02-patch-stamp-m68k-update
    if [ -x debian/patches/libf2c-mxunit.dpatch ]; then true; else chmod +x debian/patches/libf2c-mxunit.dpatch; fi
    if [ -f stamps/02-patch-stamp-libf2c-mxunit ]; then \
    echo “libf2c-mxunit patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libf2c-mxunit.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libf2c/libI77/fio.h
    echo “libf2c-mxunit patches applied.” > stamps/02-patch-stamp-libf2c-mxunit
    if [ -x debian/patches/arm-bigendian.dpatch ]; then true; else chmod +x debian/patches/arm-bigendian.dpatch; fi
    if [ -f stamps/02-patch-stamp-arm-bigendian ]; then \
    echo “arm-bigendian patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/arm-bigendian.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/arm/linux-elf.h
    patching file gcc/config.gcc
    Hunk #1 succeeded at 678 (offset 12 lines).
    echo “arm-bigendian patches applied.” > stamps/02-patch-stamp-arm-bigendian
    if [ -x debian/patches/tool-version-checks.dpatch ]; then true; else chmod +x debian/patches/tool-version-checks.dpatch; fi
    if [ -f stamps/02-patch-stamp-tool-version-checks ]; then \
    echo “tool-version-checks patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/tool-version-checks.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/configure.ac
    patching file Makefile.tpl
    patching file Makefile.in
    echo “tool-version-checks patches applied.” > stamps/02-patch-stamp-tool-version-checks
    if [ -x debian/patches/cpu-default-i486.dpatch ]; then true; else chmod +x debian/patches/cpu-default-i486.dpatch; fi
    if [ -f stamps/02-patch-stamp-cpu-default-i486 ]; then \
    echo “cpu-default-i486 patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/cpu-default-i486.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/i386/i386.c
    Hunk #1 succeeded at 1176 with fuzz 2 (offset -56 lines).
    patching file gcc/config/i386/i386.h
    echo “cpu-default-i486 patches applied.” > stamps/02-patch-stamp-cpu-default-i486
    if [ -x debian/patches/libffi-soversion.dpatch ]; then true; else chmod +x debian/patches/libffi-soversion.dpatch; fi
    if [ -f stamps/02-patch-stamp-libffi-soversion ]; then \
    echo “libffi-soversion patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libffi-soversion.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libffi/Makefile.am
    Hunk #1 succeeded at 181 (offset 6 lines).
    patching file libffi/Makefile.in
    Hunk #1 succeeded at 230 (offset 4 lines).
    patching file libffi/libtool-version
    echo “libffi-soversion patches applied.” > stamps/02-patch-stamp-libffi-soversion
    if [ -x debian/patches/libffi-mips.dpatch ]; then true; else chmod +x debian/patches/libffi-mips.dpatch; fi
    if [ -f stamps/02-patch-stamp-libffi-mips ]; then \
    echo “libffi-mips patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libffi-mips.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libffi/src/mips/ffi.c
    patching file libffi/src/mips/ffitarget.h
    echo “libffi-mips patches applied.” > stamps/02-patch-stamp-libffi-mips
    if [ -x debian/patches/libjava-mips.dpatch ]; then true; else chmod +x debian/patches/libjava-mips.dpatch; fi
    if [ -f stamps/02-patch-stamp-libjava-mips ]; then \
    echo “libjava-mips patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libjava-mips.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libjava/include/mips-signal.h
    echo “libjava-mips patches applied.” > stamps/02-patch-stamp-libjava-mips
    if [ -x debian/patches/libstdc++-mips-atomic.dpatch ]; then true; else chmod +x debian/patches/libstdc++-mips-atomic.dpatch; fi
    if [ -f stamps/02-patch-stamp-libstdc++-mips-atomic ]; then \
    echo “libstdc++-mips-atomic patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libstdc++-mips-atomic.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libstdc++-v3/config/cpu/mips/atomicity.h
    echo “libstdc++-mips-atomic patches applied.” > stamps/02-patch-stamp-libstdc++-mips-atomic
    if [ -x debian/patches/biarch-include.dpatch ]; then true; else chmod +x debian/patches/biarch-include.dpatch; fi
    if [ -f stamps/02-patch-stamp-biarch-include ]; then \
    echo “biarch-include patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/biarch-include.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/cppdefault.h
    patching file gcc/c-incpath.c
    patching file gcc/cppdefault.c
    patching file gcc/Makefile.in
    patching file libstdc++-v3/include/Makefile.am
    patching file libstdc++-v3/include/Makefile.in
    echo “biarch-include patches applied.” > stamps/02-patch-stamp-biarch-include
    if [ -x debian/patches/config-ml.dpatch ]; then true; else chmod +x debian/patches/config-ml.dpatch; fi
    if [ -f stamps/02-patch-stamp-config-ml ]; then \
    echo “config-ml patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/config-ml.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file config-ml.in
    Hunk #5 succeeded at 998 (offset -29 lines).
    echo “config-ml patches applied.” > stamps/02-patch-stamp-config-ml
    if [ -x debian/patches/i386-biarch.dpatch ]; then true; else chmod +x debian/patches/i386-biarch.dpatch; fi
    if [ -f stamps/02-patch-stamp-i386-biarch ]; then \
    echo “i386-biarch patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/i386-biarch.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/i386/biarch.h
    patching file gcc/config/i386/linux.h
    patching file gcc/config/i386/linux64.h
    patching file gcc/config/i386/x86-64.h
    patching file gcc/config.gcc
    Hunk #1 succeeded at 1012 (offset 21 lines).
    patching file libffi/Makefile.am
    patching file libffi/Makefile.in
    patching file libffi/src/x86/ffitarget.h
    patching file libjava/configure.in
    patching file libjava/include/i386-signal.h
    patching file libjava/sysdep/i386/locks.h
    patching file libtool.m4
    configure.in:683: warning: Cannot check for file existence when cross compiling
    echo “i386-biarch patches applied.” > stamps/02-patch-stamp-i386-biarch
    if [ -x debian/patches/libstdc++-disable-run-check.dpatch ]; then true; else chmod +x debian/patches/libstdc++-disable-run-check.dpatch; fi
    if [ -f stamps/02-patch-stamp-libstdc++-disable-run-check ]; then \
    echo “libstdc++-disable-run-check patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/libstdc++-disable-run-check.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file libstdc++-v3/configure
    patching file libiberty/configure
    echo “libstdc++-disable-run-check patches applied.” > stamps/02-patch-stamp-libstdc++-disable-run-check
    if [ -x debian/patches/link-libs.dpatch ]; then true; else chmod +x debian/patches/link-libs.dpatch; fi
    if [ -f stamps/02-patch-stamp-link-libs ]; then \
    echo “link-libs patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/link-libs.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/config/t-slibgcc-elf-ver
    patching file libf2c/Makefile.in
    patching file libffi/Makefile.am
    Hunk #1 succeeded at 181 with fuzz 2 (offset 2 lines).
    patching file libffi/Makefile.in
    Hunk #1 succeeded at 230 with fuzz 2 (offset 7 lines).
    patching file libjava/Makefile.in
    Hunk #1 succeeded at 203 (offset 41 lines).
    patching file libjava/Makefile.am
    Hunk #1 succeeded at 91 (offset 24 lines).
    patching file libobjc/Makefile.in
    Hunk #1 succeeded at 257 (offset -7 lines).
    patching file libstdc++-v3/src/Makefile.am
    patching file libstdc++-v3/src/Makefile.in
    echo “link-libs patches applied.” > stamps/02-patch-stamp-link-libs
    if [ -x debian/patches/reporting.dpatch ]; then true; else chmod +x debian/patches/reporting.dpatch; fi
    if [ -f stamps/02-patch-stamp-reporting ]; then \
    echo “reporting patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/reporting.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file gcc/gccbug.in
    Hunk #1 succeeded at 25 (offset 1 line).
    patching file gcc/java/gjavah.c
    Hunk #1 succeeded at 2291 (offset -29 lines).
    patching file gcc/java/jcf-dump.c
    Hunk #1 succeeded at 889 (offset -4 lines).
    patching file gcc/java/jv-scan.c
    Hunk #1 succeeded at 115 (offset -1 lines).
    patching file gcc/gcov.c
    Hunk #1 succeeded at 411 with fuzz 1 (offset 61 lines).
    patching file gcc/version.h
    patching file gcc/diagnostic.c
    patching file gcc/gcc.c
    Hunk #1 succeeded at 2839 (offset 10 lines).
    Hunk #2 succeeded at 6262 (offset 10 lines).
    Hunk #3 succeeded at 6467 (offset 10 lines).
    echo “reporting patches applied.” > stamps/02-patch-stamp-reporting
    if [ -x debian/patches/gcc-version.dpatch ]; then true; else chmod +x debian/patches/gcc-version.dpatch; fi
    if [ -f stamps/02-patch-stamp-gcc-version ]; then \
    echo “gcc-version patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/gcc-version.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    echo “gcc-version patches applied.” > stamps/02-patch-stamp-gcc-version
    if [ -x debian/patches/configure-deplibs_check_method.dpatch ]; then true; else chmod +x debian/patches/configure-deplibs_check_method.dpatch; fi
    if [ -f stamps/02-patch-stamp-configure-deplibs_check_method ]; then \
    echo “configure-deplibs_check_method patches already applied.”; exit 1; \
    fi
    DEB_VERSION=’3.4.6-8ubuntu2′; export DEB_VERSION; \
    debian/patches/configure-deplibs_check_method.dpatch -patch -d /home/arlex/gcc-3.4-3.4.6/src
    patching file boehm-gc/configure
    patching file libf2c/configure
    patching file libffi/configure
    patching file libjava/libltdl/configure
    patching file libjava/configure
    patching file libobjc/configure
    patching file zlib/configure
    echo “configure-deplibs_check_method patches applied.” > stamps/02-patch-stamp-configure-deplibs_check_method
    echo -e “\nPatches that Ubuntu applied in this version:” > pxxx
    for i in gcc-textdomain rename-info-files libstdc++-pic libstdc++-doclink libstdc++-doxygen-syntax amd64-specs gccbug gccbug-posix hppa-toplevel hppa-libffi fastjar-update fastjar-version boehm-gc-nocheck libltdl m68k-update libf2c-mxunit arm-bigendian tool-version-checks cpu-default-i486 libffi-soversion libffi-mips libjava-mips libstdc++-mips-atomic biarch-include config-ml i386-biarch libstdc++-disable-run-check link-libs reporting gcc-version configure-deplibs_check_method ; do \
    echo -e “\n$i:” >> pxxx; \
    sed -n ‘s/^# *DP: */ /p’ debian/patches/$i.dpatch >> pxxx; \
    done
    mv -f pxxx stamps/02-patch-stamp
    mkdir -p stamps
    /usr/bin/make -f debian/rules.conf control
    sed: no se puede leer /home/arlex/gcc-3.4-3.4.6/src/gcc/p/version.h: No existe el fichero ó directorio
    make[1]: se ingresa al directorio `/home/arlex/gcc-3.4-3.4.6′
    echo “addons: cdev libs libg2c lib64g2c lib32g2c gfdldoc”; \
    m4 -DBINUTILSV=2.16.1-3 -DSRCNAME=gcc-3.4 -D__i486__ -DARCH=i386 -DDIST=Ubuntu -DG2C_CEV=1:3.3.4-4 -DLIBC_DEV_DEP=”libc6-dev (>= 2.3.5-10)” -DLIBC_BIARCH_BUILD_DEP=”libc6-dev-amd64 [i386], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], lib32gcc1 [amd64 ppc64], lib64gcc1 [powerpc i386 sparc s390],” -DBINUTILS_BUILD_DEP=”binutils (>= 2.16.1-3) | binutils-multiarch (>= 2.16.1-3)” -DLIBC_BUILD_DEP=”libc6.1-dev (>= 2.3.5-10) [alpha ia64] | libc0.3-dev (>= 2.3.5-10) [hurd-i386] | libc0.1-dev (>= 2.3.5-10) [kfreebsd-i386] | libc6-dev (>= 2.3.5-10)” -DGNAT_BUILD_DEP=”” -DJAVA_BUILD_DEP=”” -DPASCAL_BUILD_DEP=”” -DTP= -DTS= -DLS= -DPRI=optional \
    -DPV=-3.4 \
    -DGPC_PV=-2.1-3.4 \
    -DCXX_SO=6 \
    -DGCC_SO=1 \
    -DOBJC_SO=1 \
    -DG2C_SO=0 \
    -DGCJ_SO=5 \
    -DGNAT_SO=3.4 \
    -DGNAT_V=3.4 \
    -DFFI_SO=3 \
    -Denabled_languages=”c f77 cdev libs libg2c lib64g2c lib32g2c gfdldoc” \
    -Dada_no_archs=”!arm !armeb !m32r !m68k !ppc64 !hurd-i386″ \
    -Djava_no_archs=”!mips !mipsel !m32r !hurd-i386 !kfreebsd-gnu” \
    -Dpascal_no_archs=”” \
    -Dlibgc_no_archs=”!avr” \
    -Dcheck_no_archs=”!hppa !hurd-i386″ \
    -Dlocale_no_archs=”!m68k” \
    -Dbiarch32_archs=”amd64 ppc64″ \
    -Dbiarch64_archs=”i386 powerpc sparc s390″ \
    debian/control.m4 > debian/control.tmp2
    addons: cdev libs libg2c lib64g2c lib32g2c gfdldoc
    uniq debian/control.tmp2 > debian/control.tmp
    rm -f debian/control.tmp2
    [ -e debian/control ] \
    && cmp -s debian/control debian/control.tmp \
    && rm -f debian/control.tmp && exit 0; \
    mv debian/control.tmp debian/control; touch stamps/03-control-stamp
    rm -f debian/rules.parameters.tmp
    ( \
    echo ‘# configuration parameters taken from upstream source files’; \
    echo ‘VER := 3.4.6’; \
    echo ‘BASE_VERSION := 3.4’; \
    echo ‘SOURCE_VERSION := 3.4.6-8ubuntu2’; \
    echo ‘DEB_VERSION := 3.4.6-8ubuntu2’; \
    echo ‘DEB_VERSION_NOREL := 3.4.6’; \
    echo ‘DEB_EVERSION := 1:3.4.6-8ubuntu2’; \
    echo ‘GPC_BASE_VERSION := 2.1’; \
    echo ‘DEB_GPC_VERSION := 3.4.6-8ubuntu2’; \
    echo ‘DEB_SOVERSION := 3.4.4’; \
    echo ‘DEB_SOEVERSION := 1:3.4.4’; \
    echo ‘DEB_LIBGCC_SOVERSION := 1:3.4.4’; \
    echo ‘DEB_LIBGCC_VERSION := 1:3.4.6-8ubuntu2’; \
    echo ‘DEB_STDCXX_SOVERSION := 3.4.4’; \
    echo ‘DEB_FFI_SOVERSION := 3.4.4’; \
    echo ‘DEB_F2C_SOVERSION := 1:3.4.4-5’; \
    echo ‘GCC_SONAME := 1’; \
    echo ‘CXX_SONAME := 6’; \
    echo ‘F77_SONAME := 0’; \
    echo ‘OBJC_SONAME := 1’; \
    echo ‘GCJ_SONAME := 5’; \
    echo ‘GNAT_VERSION := 3.4’; \
    echo ‘GNAT_SONAME := 3.4’; \
    echo ‘FFI_SONAME := 3’; \
    echo ‘LIBC_DEP := ‘; \
    ) > debian/rules.parameters.tmp
    [ -e debian/rules.parameters ] \
    && cmp -s debian/rules.parameters debian/rules.parameters.tmp \
    && rm -f debian/rules.parameters.tmp && exit 0; \
    mv debian/rules.parameters.tmp debian/rules.parameters; \
    touch stamps/03-control-stamp
    rm -f debian/substvars.local.tmp
    ( \
    echo ‘gcc:Version=3.4.6-8ubuntu2’; \
    echo ‘gcc:SoftVersion=3.4.6’; \
    echo ‘gcc:EpochVersion=1:3.4.6-8ubuntu2’; \
    echo ‘gpc:Version=3.4.6-8ubuntu2’; \
    echo ‘binutils:Version=2.16.1-3’; \
    echo ‘dep:libgcc=libgcc1 (>= 1:3.4.6-8ubuntu2)’; \
    echo ‘dep:libgccbiarch=lib64gcc1 (>= 1:3.4.6-8ubuntu2)’; \
    echo ‘dep:libcdev=libc6-dev (>= 2.3.5-10)’; \
    echo ‘dep:libcbiarch=libc6-amd64 (>= 2.3.5-10)’; \
    echo ‘dep:libcbiarchdev=libc6-dev-amd64’; \
    echo ‘dep:libunwinddev=’; \
    echo ‘dep:libcxxbiarch=lib64stdc++6’; \
    echo ‘dep:libgnat=’; \
    ) > debian/substvars.local.tmp
    [ -e debian/substvars.local ] \
    && cmp -s debian/substvars.local debian/substvars.local.tmp \
    && rm -f debian/substvars.local.tmp && exit 0; \
    mv debian/substvars.local.tmp debian/substvars.local; \
    touch stamps/03-control-stamp
    for f in debian/*-BV*; do \
    f2=$(echo $f | sed ‘s/BV/3.4/;s/PV/2.1/’); \
    sed -e ‘s/@BV@/3.4/g’ \
    -e ‘s/@PV@/2.1/g’ \
    -e ‘s/@GFDL@//g’ \
    $f > $f2; \
    touch -r $f $f2; \
    done
    make[1]: se sale del directorio `/home/arlex/gcc-3.4-3.4.6′
    /usr/bin/make -f debian/rules2 stamps/04-configure-stamp
    make[1]: se ingresa al directorio `/home/arlex/gcc-3.4-3.4.6′
    dh_testdir
    : # give information about the build process
    ————————– Build process variables ————————–
    Package source: gcc-3.4
    Version: 3.4.6
    Base Debian version:
    Configured with: -v
    –enable-languages=c,f77
    –prefix=/usr
    –libexecdir=/usr/lib
    –with-gxx-include-dir=/usr/include/c++/3.4
    –enable-shared
    –with-system-zlib
    –enable-nls
    –without-included-gettext
    –program-suffix=-3.4
    –enable-__cxa_atexit
    –with-tune=pentium4
    i486-linux-gnu

    Using shell /bin/bash -e
    Architecture: i386 (GNU: i486-linux-gnu)
    CPPFLAGS:
    CFLAGS: -g -O2
    LDFLAGS:
    BOOT_CFLAGS: -O2
    DEBIAN_BUILDARCH:
    Install prefix: /usr
    Will build the biarch compilers (32/64, defaulting to 32bit)
    Will not build the C++ compiler: disabled for the gcc-3.4 build
    Will not build the ObjC compiler: disabled for the gcc-3.4 build
    Will build the Fortran77 compiler.
    Will not build the Java compiler: disabled for the gcc-3.4 build
    Will not build the Pascal compiler: disabled for the gcc-3.4 build
    Will not build the Ada compiler: disabled for the gcc-3.4 build
    Will not build the Treelang compiler: disabled for the gcc-3.4 build
    Will not build the FFI library: disabled for the gcc-3.4 build
    Will run the testsuite.
    /bin/bash: -c: line 0: error de sintaxis cerca de token no esperado `)’
    make[1]: *** [stamps/04-configure-stamp] Error 2
    make[1]: se sale del directorio `/home/arlex/gcc-3.4-3.4.6′
    make: *** [stamps/04-configure-stamp] Error 2
    dpkg-buildpackage: fallo: debian/rules build entregó error de estado de salida 2

  7. skidzo:
    fort77 is just a camouflaged invokation of f2c which translates fortran source code into c and then runs them with a c compiler. It might work with code writen by yourself but it crashes whilst trying to build the BLAS and, thus, LAPACK libraries (even when you try to exchange the g77 compiler to fort77 in the Makefiles) – which are, in my opinion, one of few reasons why people still stick with fortran. There are simply no other better math libraries available – and if you think you know of such – they are probably based on the above stated. So I don’t really understand why developers of ubuntu insisted on removing support for g77 from the newer version – I’d love to hear their reasons. Anyone got a clue?

  8. Adrian:
    In order for your guide to work you need to alter step 4 a bit. Adding
    “g77*.deb”
    at the end is required. But it works then – thanks so much for this great guide. :*
    Sakurazuka

    • I have installed UBUNTU8.10 on my laptop. To get g77, I was undergoing the steps described by uu so ncely. However, After going through your steps 1 and 2, inn step 3 When I build using
      dpkg-buildpackage -rfakeroot -nc -b

      I get following errors aftome time:

      make[1]: Entering directory `/home/mamta/gcc-3.4-3.4.6′
      dh_testdir
      : # give information about the build process
      ————————– Build process variables ————————–
      Package source: gcc-3.4
      Version: 3.4.6
      Base Debian version:
      Configured with: -v
      –enable-languages=c,f77
      –prefix=/usr
      –libexecdir=/usr/lib
      –with-gxx-include-dir=/usr/include/c++/3.4
      –enable-shared
      –with-system-zlib
      –enable-nls
      –without-included-gettext
      –program-suffix=-3.4
      –enable-__cxa_atexit
      –with-tune=pentium4
      i486-linux-gnu

      Using shell /bin/bash -e
      Architecture: i386 (GNU: i486-linux-gnu)
      CPPFLAGS:
      CFLAGS: -g -O2
      LDFLAGS:
      BOOT_CFLAGS: -O2
      DEBIAN_BUILDARCH:
      Install prefix: /usr
      Will build the biarch compilers (32/64, defaulting to 32bit)
      Will not build the C++ compiler: disabled for the gcc-3.4 build
      Will not build the ObjC compiler: disabled for the gcc-3.4 build
      Will build the Fortran77 compiler.
      Will not build the Java compiler: disabled for the gcc-3.4 build
      Will not build the Pascal compiler: disabled for the gcc-3.4 build
      Will not build the Ada compiler: disabled for the gcc-3.4 build
      Will not build the Treelang compiler: disabled for the gcc-3.4 build
      Will not build the FFI library: disabled for the gcc-3.4 build
      Will run the testsuite.
      /bin/bash: -c: line 0: syntax error near unexpected token `)’
      make[1]: *** [stamps/04-configure-stamp] Error 2
      make[1]: Leaving directory `/home/mamta/gcc-3.4-3.4.6′
      make: *** [stamps/04-configure-stamp] Error 2
      dpkg-buildpackage: failure: debian/rules build gave error exit status 2

      Please help

      • I had the same problem and found the following fix.

        https://bugs.launchpad.net/ubuntu/+source/gcc-3.4/+bug/286413

        This requires changing the rules.def file at line 685 from

        ifeq ($(biarch32),yes)
        with_32bit_check := $(shell CC=”gcc -m32″ sh debian/runcheck.sh)
        endif

        to

        ifeq ($(biarch32),yes)
        with_32bit_check := $(shell CC=”gcc -m32″ sh debian/runcheck.bash)
        endif

        I hope this fixes everything since I am posting the message while drinking some tea and waiting for the compilation to finish.

  9. Still no g77 for me, what went wrong with the compilation?

    • i had the same problem so i checked what processors i had.

      in terminal type,
      less /proc/cpuinfo

      if it says you have a 64 bit processor you need to change

      ifeq ($(biarch),yes)
      with_64bit_check := $(shell CC=”gcc -m64″ sh debian/runcheck.sh)
      endif

      to

      ifeq ($(biarch),yes)
      with_64bit_check := $(shell CC=”gcc -m64″ sh debian/runcheck.bash)
      endif

      hopefully this helps…it did for me

  10. Thanks, Adrian and Sakurazuka!
    I got g77 installed following your instructions.
    By the way, Adrian: not that senile!
    Chilo

  11. Actually it’s very simple:
    install gfortran
    then create a symbolic link named g77 pointing to gfortran

    Here the commands:

    sudo apt-get install gfortran
    ln -s /usr/bin/gfortran /usr/local/bin/g77

    • um…..i don’t think this is correct. Just telling gfortran to pretend it’s now g77 will not work.

      the problem is that the g77 standard is somewhat different to the gfortran standard (like dialects of the same language)

      so any code written to the g77 standard and then compiled (interpreted) by the gfortran compiler will ultimately have some problems…..it’s not just a naming problem

  12. […] it is written in ancient fortran, it requires g77 and gcc 3.4. In the comments to this blog entry here is a nice way how to get those to work fairly painlessly on a current ubuntu […]

  13. I found that on jaunty I could install “fort77” from the depositories, it seems it’s the same as f77.

    • IMPORTANT ADDITION

      When i gave my howto above I included creating a ‘g77’ symlink.

      This was a BAAAAAD idea.

      Configure scripts will search for the available f77 compilers and will choose g77 first. Eg. rebuilding a dpkg will result in it being compiled with g77. I guarantee this is not what debian/ubuntu developers intend. This is probably the reason g77 was dropped.

      Leave it as g77-3.4. If you need a makefile to find g77 set the variables F77=g77-3.4 and/or FC=g77-3.4

      PS

      You can speed x5 the compilation (on Ubuntu at least) by disabling test suite.
      search for a line in rules.def
      ‘# run testsuite ‘
      there will be a line below somewhere
      ‘with_check := yes’
      change it to (free banana for the first correct guess)
      ‘with_check := no’

  14. For those who say ‘install f2c, gfortran, fort77 ….’

    If this does the job for you then great.

    However it is not a solution to every problem. F77 code was written for a variety of compilers on a variety of platforms. The legacy codebase is full of hacks, compiler specific extensions and the linking of C and fortran code is horrific. g77 is great in that it is forgiving and will handle most things (because it is really a c compiler).

    E.g. http://www.globeclaritas.com/

    I know the guys who develop this software – it compiles and links code at runtime (originally written on vax!). Took then 6 months to get it running using gfortran.

  15. Thank you Adrian, Sakurazuka & Jeff. You saved my week.

  16. […] Installing g77 in Ubuntu/Kubuntu Intrepid 8.10 November 200822 comments 5 […]

Leave a reply to 2010 in review « Tech Log Book Cancel reply