pkgsrc-Users archive

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

wip/gcc45, was: Default Fortran compiler is g95


Aleksej Saushev wrote on 26 Dec 2010:
> On the other hand, gfortran is known to be broken on NetBSD,
> both on i386 and on amd64.

lang/gcc44 and wip/gcc45 might be broken but gcc 4.5.2 and recent
snapshots of 4.6 work fine on NetBSD for --enable-languages=c,fortran
using mpfr, mpcomplex, binutils, bash etc. from pkgsrc. Did not try C++
or other languages.

> NetBSD users are invited to fix lang/gcc44.

gfortran44 is missing many important Fortran2003 features, so I
will take a look into wip/gcc45. An update from 4.5.0 to the
stable branch 4.5.2 and patching for an issue with cabs/cabsf
to make gfortran usable for lapack/blas might be enough. I have no
experience with the technical details of pkgsrc but as a scientist
I am used to learn new things everyday ;-)

I built a working gcc-4.6.0 recently by installing the packages
devel/gmake, math/mpfr, math/mpcomplex, shells/bash, textproc/gsed,
lang/gawk, converters/libiconv,  devel/bison, devel/flex,
devel/binutils and then:

$ bash
$ export LD_LIBRARY_PATH=/usr/pkg/lib:$LD_LIBRARY_PATH
$ cd /home/kue
$ tar jxf gcc-core-4.6-20110129.tar.bz2
$ tar jxf gcc-fortran-4.6-20110129.tar.bz2
$ vi gcc-4.6-20110129/gcc/lang/f95-lang.c and change cabs to
__c99_cabs and cabfs to __c99_cabsf
$ vi gcc-4.6-20110129/gcc/ginclude/stddef.h and add after line 55:
  #define _MACHINE_ANSI_H_
$ mkdir gcc46
$ cd gcc46
$ /home/kue/gcc-4.6-20110129/configure --enable-languages=c,fortran \
  --with-threads=posix --disable-nls --disable-multilib \
  --with-ld=/usr/pkg/bin/gnu-ld --with-as=/usr/pkg/bin/gnu-as \
   -with-libiconv-prefix=/usr/pkg --with-mpfr=/usr/pkg \
   --with-mpc=/usr/pkg --prefix=/usr/local/gcc46 \
   --disable-libquadmath --disable-libquadmath-support
$ gmake 2>&1|tee error.log
$ sudo mkdir -p /usr/local/gcc46
$ sudo gmake install
$ /usr/local/gcc46/bin/gfortran -v


Kai-Uwe Eckhardt

Home | Main Index | Thread Index | Old Index