Problems compiling G95 with GCC

Although every effort is made to ensure a gcc-g95 and the tree-ssa branch of GCC is buildable, some problems have occurred. Some of the simple kludges to work around these problems are enumerated.



During the bootstrap phase, the build may abort because the GMP library, -lgmp, cannot be linked to 'g95'. The problem appears to be that the top-level configure script does not pass the LDFLAGS variable to gcc/Makefile. One work around for this problem is to manually add -L/usr/local/lib to the F95_LIBS variable in gcc/Makefile, and then restart the bootstrap.



During the build of libgfor, the bootstrap may abort with an error similar to

echo timestamp > intrinsics/reshape packed.lo
source='../../../gcc/libgfor/intrinsics/ abs r4.f90' object='intrinsics/ abs r4.lo' libtool=no \ depfile='.deps/intrinsics/ abs r4.Plo' tmpdepfile='.deps/intrinsics/ abs r4.TPlo' \ depmode=f95 /bin/sh ../../../gcc/libgfor/depcomp : `test -f '../../../gcc/libgfor/intrinsics/ abs r4.f90' || echo '../../../gcc/libgfor/'`../../../gcc/libgfor/intrinsics/ abs r4.f90 test: 1: unexpected operator
test: 1: unexpected operator
../../../gcc/libgfor/depcomp: cannot create .deps/intrinsics/ abs r4.TPlo: No such file or directory sed: .deps/intrinsics/ abs r4.TPlo: No such file or directory
../../../gcc/libgfor/depcomp: cannot create .deps/intrinsics/ abs r4.Plo: No such file or directory
gmake[3]: *** [intrinsics/ abs r4.lo]
Error 2
gmake[3]: Leaving directory `/usr/home/kargl/gcc-ssa/objdir/i386-unknown-freebsd5.0/libgfor'
gmake[2]: *** [all]
Error 2
gmake[2]: Leaving directory `/usr/home/kargl/gcc-ssa/objdir/i386-unknown-freebsd5.0/libgfor'
gmake[1]: *** [all-target-libgfor]
Error 2
gmake[1]: Leaving directory `/usr/home/kargl/gcc-ssa/objdir'

The problem is believed to be related to an incompatibility between the versions of autoconf used by gcc and gcc-g95. The suggested work around, until the problem is fixed, is to manually create the missing directory via

mkdir i386-unknown-freebsd5.0/libgfor/.deps/intrinsics
The mkdir command should be run in the top-level directory and you will need to specify the correct target (i.e., replace i386-unknown-freebsd5.0 in the above with whatever is appropriate).