Hi! Based on Tobias Burnus advice on:
http://thread.gmane.org/gmane.linux.debian.devel.toolchain/733/focus=22611 I have been able to make a patch for mpich which sort of proceeds with the build using gfortran (I have fixed it to gfortran-4.3). However, the build fails at a later stage. Attached is my patch, and the build log. The relevant parts are here: <log> Fortran subsystem: Configuring Fortran subsystem checking for cc... cc checking whether the C compiler sets its return status correctly... yes checking for an ANSI C-conforming const... no checking for Fortran 77 compiler default output file name... a.out checking whether the Fortran 77 compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU Fortran 77 compiler... yes checking whether gfortran-4.3 accepts -g... yes [snip] checking that f works as the extension for Fortran 90 program... no checking for extension for Fortran 90 programs... unknown! [snip] checking for routines to access the command line from Fortran 77... searching... checking whether gfortran-4.3 works with GETARG and IARGC... yes checking how to get verbose linking output from gfortran-4.3 ... -v checking for Fortran libraries of gfortran-4.3 ... -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0/../../.. -lgfortranbegin -lgfortran -lm -lgcc_s checking whether C can link with -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.0/../../.. -lgfortranbegin -lgfortran -lm -lgcc_s... yes checking for linker for Fortran main programs... Use Fortran to link programs checking for Fortran 77 name mangling... lower underscore checking for which Fortran libraries are needed to link C with Fortran... none checking whether Fortran accepts ! for comments... yes checking for include directory flag for Fortran... -I checking for Fortran 77 flag for library directories... -L checking whether Fortran has pointer declaration... no checking for size of Fortran type integer... 4 checking for size of Fortran type real... 4 checking for size of Fortran type double precision... 8 [snip] checking for C type matching Fortran integer*1... char checking for C type matching Fortran integer*2... short checking for C type matching Fortran integer*4... int checking for C type matching Fortran integer*8... long checking for C type matching Fortran integer*16... unavailable checking for C type matching Fortran real*4... float checking for C type matching Fortran real*8... double checking for C type matching Fortran integer... int checking whether C compiler allows unaligned doubles... yes checking for type of weak symbol support... pragma weak checking whether __attribute__ ((weak)) allowed... yes checking for values of Fortran logicals... True is 1 and False is 0 checking for Fortran 90 integer kind for 8-byte integers... unavailable checking for Fortran 90 integer kind for 8-byte integers... -1 (cached) checking for Fortran 90 integer kind for 4-byte integers... unavailable configure: WARNING: Unable to determine the size of a simple integer configure: WARNING: Using 4 for the Fortran 90 KIND of an MPI_Aint configure: WARNING: Using 4 for the Fortran 90 KIND of an MPI_Offset checking whether using gcc and g77 together... no [snip] Done configuring Fortran subsystem </log> The failure step is this: <fail> /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -DMPI_LINUX -DUSE_STDARG -DHAVE_PROTOTYPES -DMPE_GRAPHICS -I.. -I/tmp/buildd/mpich-1.2.7/mpe/include -I../slog_api -I/tmp/buildd/mpich-1.2.7/mpe/slog_api/include -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -fPIC -c /tmp/buildd/mpich-1.2.7/mpe/src/decompf.c -o decompf.lo /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -DMPI_LINUX -DUSE_STDARG -DHAVE_PROTOTYPES -DMPE_GRAPHICS -I.. -I/tmp/buildd/mpich-1.2.7/mpe/include -I../slog_api -I/tmp/buildd/mpich-1.2.7/mpe/slog_api/include -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -fPIC -c /tmp/buildd/mpich-1.2.7/mpe/src/mpe_seqf.c -o mpe_seqf.lo /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -DMPI_LINUX -DUSE_STDARG -DHAVE_PROTOTYPES -DMPE_GRAPHICS -I.. -I/tmp/buildd/mpich-1.2.7/mpe/include -I../slog_api -I/tmp/buildd/mpich-1.2.7/mpe/slog_api/include -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -fPIC -c /tmp/buildd/mpich-1.2.7/mpe/src/getgrankf.c -o getgrankf.lo if [ ! -d /tmp/buildd/mpich-1.2.7/image_mpich/mpe/lib/shared ]; then mkdir /tmp/buildd/mpich-1.2.7/image_mpich/mpe/lib/shared; fi cc -shared -Wl,-z,defs -Wl,-soname,libmpe.so.1.0 -o /tmp/buildd/mpich-1.2.7/image_mpich/mpe/lib/shared/libmpe.so.1.0 mpe_graphics.lo xcolor.lo xframe.lo xinit.lo xwmap.lo xmouse.lo xkey.lo clog_sysio.lo mpe_log.lo clog.lo clog_merge.lo clog_time.lo clog_util.lo clog2alog.lo decomp.lo mpe_seq.lo dbxerr.lo examine.lo privtags.lo getgrank.lo mpehname.lo mpe_io.lo mpe_graphicsf.lo xmousef.lo mpe_logf.lo decompf.lo mpe_seqf.lo getgrankf.lo -L /usr/X11R6/lib -lX11 -lm -L../../lib/shared -l`echo mpe | sed -e 's/^mpe/mpich/'` /usr/bin/ld: cannot find -lmpich collect2: ld returned 1 exit status make[6]: *** [/tmp/buildd/mpich-1.2.7/image_mpich/mpe/lib/shared/libmpe.so] Error 1 make[5]: *** [default] Error 2 make[4]: *** [build_libs_progs] Error 2 make[3]: *** [mpelib] Error 1 make[2]: *** [mpi-addons] Error 2 make[1]: *** [mpi] Error 2 make[1]: Leaving directory `/tmp/buildd/mpich-1.2.7/image_mpich' make: *** [build-stamp] Error 2 dpkg-buildpackage: failure: debian/rules build gave error exit status 2 </fail> Hope this helps make some progress. Thanks. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036
diff -u mpich-1.2.7/debian/rules mpich-1.2.7/debian/rules --- mpich-1.2.7/debian/rules +++ mpich-1.2.7/debian/rules @@ -15,7 +15,7 @@ INSTALL_DIR=install -m 755 -d INSTALL_FILE=install -m 644 -CONFIGURE_OPTIONS= -rsh=/usr/bin/rsh +CONFIGURE_OPTIONS= CONFIG_SG_DIRS= mpe mpe/slog2sdk mpe/slog2sdk/trace_rlog mpe/slog2sdk/trace_sample \ examples/perftest/config/confdb src/fortran/config MPI-2-C++ romio/confdb @@ -30,15 +30,16 @@ CONFIGURE_OPTIONS_P4=$(CONFIGURE_OPTIONS) --with-device=ch_p4 \ -prefix=/usr/lib/mpich --enable-sharedlib=/usr/lib/mpich/lib/shared/ \ - -mpe_opts="--with-mpelibname=mpe" # -f90=gfortran + -mpe_opts="--with-mpelibname=mpe" CONFIGURE_OPTIONS_MPD=$(CONFIGURE_OPTIONS) --with-device=ch_p4mpd \ -prefix=/usr/lib/mpich-mpd -mpilibname=mpich-p4mpd \ --enable-sharedlib=/usr/lib/mpich-mpd/lib/shared/ \ - -mpe_opts="--with-mpelibname=mpe-p4mpd" # -f90=gfortran + + -mpe_opts="--with-mpelibname=mpe-p4mpd" -f90=gfortran-4.3 CONFIGURE_OPTIONS_SHMEM=$(CONFIGURE_OPTIONS) --with-device=ch_shmem \ -prefix=/usr/lib/mpich-shmem -mpilibname=mpich-shmem \ --enable-sharedlib=/usr/lib/mpich-shmem/lib/shared/ \ - -mpe_opts="--with-mpelibname=mpe-shmem" # -f90=gfortran + -mpe_opts="--with-mpelibname=mpe-shmem" -f90=gfortran-4.3 include /usr/share/dpatch/dpatch.make @@ -50,18 +51,20 @@ cp -f /usr/share/misc/config.guess $$CFGAUXDIR ; \ done # make mpich normal - (test -d image_mpich || mkdir image_mpich; cd image_mpich && ../configure \ + (test -d image_mpich || mkdir image_mpich; cd image_mpich && F77_GETARGDECL="intrinsic GETARG" RSHCOMMAND=/usr/bin/rsh FC=gfortran-4.3 ../configure \ $(CONFIGURE_OPTIONS_P4) && \ $(MAKE) ) # make mpich MPD version (test -d image_mpich-mpd || mkdir image_mpich-mpd; \ cd image_mpich-mpd && \ + F77_GETARGDECL="intrinsic GETARG" RSHCOMMAND=/usr/bin/rsh FC=gfortran-4.3 F90=gfortran-4.3 \ ../configure \ $(CONFIGURE_OPTIONS_MPD) && \ $(MAKE) ) # make mpich SHMEM version (test -d image_mpich-shmem || mkdir image_mpich-shmem; \ cd image_mpich-shmem && \ + F77_GETARGDECL="intrinsic GETARG" RSHCOMMAND=/usr/bin/rsh FC=gfortran-4.3 F90=gfortran-4.3 \ ../configure \ $(CONFIGURE_OPTIONS_SHMEM) && \ $(MAKE) ) diff -u mpich-1.2.7/debian/changelog mpich-1.2.7/debian/changelog --- mpich-1.2.7/debian/control +++ mpich-1.2.7/debian/control @@ -3,7 +3,7 @@ Priority: extra Maintainer: Adam C. Powell, IV <[EMAIL PROTECTED]> Standards-Version: 3.7.2 -Build-Depends: g77, rsh-client, libx11-dev, libxt-dev, file, debhelper (>> 4.0.0), dpatch, tk8.4, autotools-dev +Build-Depends: gfortran-4.3, rsh-client, libx11-dev, libxt-dev, file, debhelper (>> 4.0.0), dpatch, tk8.4, autotools-dev Build-Depends-Indep: bzip2 Package: mpich-bin only in patch2: unchanged: --- mpich-1.2.7.orig/mpe/aclocal_f77.m4 +++ mpich-1.2.7/mpe/aclocal_f77.m4 @@ -396,9 +396,10 @@ if test -z "$ac_fcompilelink" ; then ac_fcompilelink="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC" fi - AC_MSG_CHECKING([if ${F77-f77} $flags $libs works with GETARG and IARGC]) + AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with GETARG and IARGC]) if AC_TRY_EVAL(ac_fcompilelink) && test -x conftest ; then - if test "$ac_cv_prog_f77_cross" = "no" ; then + # Check that cross != yes so that this works with autoconf 2.52 + if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then found_answer="yes" FXX_MODULE="$fxx_module" @@ -492,7 +493,7 @@ +U77" fi # Discard options that are not available: - save_IFS="$IFS" + #save_IFS="$IFS" IFS=" " save_trial_FLAGS="$trial_FLAGS" @@ -518,7 +519,7 @@ end EOF if test -n "$fflag" ; then flagval="with $fflag" ; else flagval="" ; fi - AC_MSG_CHECKING([that Fortran 77 routine names are case-insensitive $flagval]) + AC_MSG_CHECKING([whether Fortran 77 routine names are case-insensitive $flagval]) dnl we can use double quotes here because all is already dnl evaluated ac_fcompilelink_test="${F77-f77} -o conftest $fflag $FFLAGS conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC" @@ -594,6 +595,13 @@ continue fi ;; + 7) # gfortran won't find getarg if it is marked as external + FXX_MODULE="" + F77_GETARGDECL="intrinsic GETARG" + F77_GETARG="call GETARG(i,s)" + F77_IARGC="IARGC()" + MSG="intrinsic GETARG and IARGC" + ;; *) # exit from while loop FXX_MODULE="" F77_GETARGDECL="" @@ -631,13 +639,13 @@ if test "$libs" = " " -o "$libs" = "0" ; then libs="" ; fi for flags in $trial_FLAGS ; do if test "$flags" = " " -o "$flags" = "000"; then flags="" ; fi - AC_MSG_CHECKING([if ${F77-f77} $flags $libs works with $MSG]) + AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with $MSG]) IFS="$save_IFS" dnl We need this here because we've fiddled with IFS ac_fcompilelink_test="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $libs $LIBS 1>&AC_FD_CC" found_answer="no" if AC_TRY_EVAL(ac_fcompilelink_test) && test -x conftest ; then - if test "$ac_cv_prog_f77_cross" = "no" ; then + if test "$ac_cv_prog_f77_cross" != "yes" ; then if ./conftest >/dev/null 2>&1 ; then found_answer="yes" fi
mpich_1.2.7-5.1_amd64.build.gz
Description: Binary data
signature.asc
Description: Digital signature