Bug#195509: Proceeding on this bug.
On Sat, 2008-02-02 at 09:20 +0530, Kumar Appaiah wrote: On 02/02/2008, Adam C Powell IV wrote: On Thu, 2008-01-31 at 07:40 -0500, Adam C Powell IV wrote: On Thu, 2008-01-31 at 11:36 +0530, Kumar Appaiah wrote: Further diagnosis showed that these are the error causing lines, along with the fixes: diff -u mpich-1.2.7/src/fortran/configure mpich-1.2.7/src/fortran/configure --- mpich-1.2.7/src/fortran/configure +++ mpich-1.2.7/src/fortran/configure @@ -15820,11 +15820,11 @@ # turn off f90 F90= else - F90_MODINCFLAG=`$MAKE -f ../../f90modules/Makefile f90modflag` - F90MODINCSPEC=`$MAKE -f ../../f90modules/Makefile f90modspec` + F90_MODINCFLAG=`$MAKE -s -f ../../f90modules/Makefile f90modflag` + F90MODINCSPEC=`$MAKE -s -f ../../f90modules/Makefile f90modspec` if test -z $USER_SET_F90INC -a -z $F90INC ; then # This should use a test or try to get it from the f90module. - F90INC=`$MAKE -f ../../f90modules/Makefile f90incflag` + F90INC=`$MAKE -s -f ../../f90modules/Makefile f90incflag` fi fi fi For some reason, make was printing make[1]: entering directory... (and confusing the build). And this resulted in a bad config.status, with sed errors (and commands like sed s,make[1] ...), which produced an empty mpe_fortdefs.h, which didn't result in defines for the relevant MPI_* stuff. I'm not getting something here. In my build, and I see in yours as well, there's this: make --no-print-directory mpi-addons Making a shared library of libmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libmpich.a Making a shared library of libpmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libpmpich.a Making a shared library of libfmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libfmpich.a Making a shared library of libpmpich++.a Successfully linked libpmpich++.a Testing that MPI applications can be linked with shared libs... This is due to the following patch I introduced: @@ -170,7 +170,10 @@ libbase=`basename $libname .a` # The -h name sets the name of the object; this is necessary to # ensure that the dynamic linker can find the proper shared library. -if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then +export F77_GETARGDECL=intrinsic GETARG + if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then + echo Successfully linked $libname + elif gfortran -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then echo Successfully linked $libname else echo Linking $libname shared lib failed Note that $CLINKER will fail to resolve the getarg calls. However, the elif case retries with gfortran, and thus, ends up linking fine. The ideal solution would be for you to use $CLINKER for those stuff which don't need GETARG, and gfortran for linking the stuff which uses GETARG. Ah yes, forgot about that. Thanks for the clarification. I'll go ahead and upload. It would be nice if it didn't print the error messages... Maybe for -7 I'll have it print a success message if gfortran works. [snip] I've neatened up the patches, and am putting everything at http://lyre.mit.edu/~powell/mpich/ with a bunch of new mpif90 support stuff. If you're sure it's right, I'll upload it. But it will have to get through the new queue because of the ldbl-gf name change. I guess things should be fine, though you might want others with rdepends to check. To allay fears of breakage, experimental might be OK? Because mpicc and friends seem to work, I think I'll try unstable and if it causes problems I'll deal with those later. [BTW, are you on debian-beowulf and/or debian-science? If so, I won't CC you in my announcement to those lists of the mpich transition.] No, I am not (yet). Please do CC me, though I'll be a mere observer. Okay, will do. Thanks again, -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools
Bug#195509: Proceeding on this bug.
On Thu, 2008-01-31 at 07:40 -0500, Adam C Powell IV wrote: On Thu, 2008-01-31 at 11:36 +0530, Kumar Appaiah wrote: Further diagnosis showed that these are the error causing lines, along with the fixes: diff -u mpich-1.2.7/src/fortran/configure mpich-1.2.7/src/fortran/configure --- mpich-1.2.7/src/fortran/configure +++ mpich-1.2.7/src/fortran/configure @@ -15820,11 +15820,11 @@ # turn off f90 F90= else - F90_MODINCFLAG=`$MAKE -f ../../f90modules/Makefile f90modflag` - F90MODINCSPEC=`$MAKE -f ../../f90modules/Makefile f90modspec` + F90_MODINCFLAG=`$MAKE -s -f ../../f90modules/Makefile f90modflag` + F90MODINCSPEC=`$MAKE -s -f ../../f90modules/Makefile f90modspec` if test -z $USER_SET_F90INC -a -z $F90INC ; then # This should use a test or try to get it from the f90module. - F90INC=`$MAKE -f ../../f90modules/Makefile f90incflag` + F90INC=`$MAKE -s -f ../../f90modules/Makefile f90incflag` fi fi fi For some reason, make was printing make[1]: entering directory... (and confusing the build). And this resulted in a bad config.status, with sed errors (and commands like sed s,make[1] ...), which produced an empty mpe_fortdefs.h, which didn't result in defines for the relevant MPI_* stuff. I'm not getting something here. In my build, and I see in yours as well, there's this: make --no-print-directory mpi-addons Making a shared library of libmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libmpich.a Making a shared library of libpmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libpmpich.a Making a shared library of libfmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libfmpich.a Making a shared library of libpmpich++.a Successfully linked libpmpich++.a Testing that MPI applications can be linked with shared libs... Funny thing is, the libraries are there, and mpicc seems to be able to use them. So it seems to work, but I'm not sure I understand how or why... Any ideas? I've neatened up the patches, and am putting everything at http://lyre.mit.edu/~powell/mpich/ with a bunch of new mpif90 support stuff. If you're sure it's right, I'll upload it. But it will have to get through the new queue because of the ldbl-gf name change. I don't have anything real to test it now, because I've migrated all of my code to OpenMPI. That's why I filed the RFA bug #447678... Thanks again, this is a real milestone for the mpich package! [BTW, are you on debian-beowulf and/or debian-science? If so, I won't CC you in my announcement to those lists of the mpich transition.] -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#195509: Proceeding on this bug.
On 02/02/2008, Adam C Powell IV wrote: On Thu, 2008-01-31 at 07:40 -0500, Adam C Powell IV wrote: On Thu, 2008-01-31 at 11:36 +0530, Kumar Appaiah wrote: Further diagnosis showed that these are the error causing lines, along with the fixes: diff -u mpich-1.2.7/src/fortran/configure mpich-1.2.7/src/fortran/configure --- mpich-1.2.7/src/fortran/configure +++ mpich-1.2.7/src/fortran/configure @@ -15820,11 +15820,11 @@ # turn off f90 F90= else - F90_MODINCFLAG=`$MAKE -f ../../f90modules/Makefile f90modflag` - F90MODINCSPEC=`$MAKE -f ../../f90modules/Makefile f90modspec` + F90_MODINCFLAG=`$MAKE -s -f ../../f90modules/Makefile f90modflag` + F90MODINCSPEC=`$MAKE -s -f ../../f90modules/Makefile f90modspec` if test -z $USER_SET_F90INC -a -z $F90INC ; then # This should use a test or try to get it from the f90module. - F90INC=`$MAKE -f ../../f90modules/Makefile f90incflag` + F90INC=`$MAKE -s -f ../../f90modules/Makefile f90incflag` fi fi fi For some reason, make was printing make[1]: entering directory... (and confusing the build). And this resulted in a bad config.status, with sed errors (and commands like sed s,make[1] ...), which produced an empty mpe_fortdefs.h, which didn't result in defines for the relevant MPI_* stuff. I'm not getting something here. In my build, and I see in yours as well, there's this: make --no-print-directory mpi-addons Making a shared library of libmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libmpich.a Making a shared library of libpmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libpmpich.a Making a shared library of libfmpich.a farg.o: In function `mpir_iargc_': farg.f:(.text+0x9): undefined reference to `_gfortran_iargc' farg.o: In function `mpir_getarg_': farg.f:(.text+0x39): undefined reference to `_gfortran_getarg_i4' collect2: ld returned 1 exit status Successfully linked libfmpich.a Making a shared library of libpmpich++.a Successfully linked libpmpich++.a Testing that MPI applications can be linked with shared libs... This is due to the following patch I introduced: @@ -170,7 +170,10 @@ libbase=`basename $libname .a` # The -h name sets the name of the object; this is necessary to # ensure that the dynamic linker can find the proper shared library. -if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then +export F77_GETARGDECL=intrinsic GETARG + if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then + echo Successfully linked $libname + elif gfortran -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then echo Successfully linked $libname else echo Linking $libname shared lib failed Note that $CLINKER will fail to resolve the getarg calls. However, the elif case retries with gfortran, and thus, ends up linking fine. The ideal solution would be for you to use $CLINKER for those stuff which don't need GETARG, and gfortran for linking the stuff which uses GETARG. Funny thing is, the libraries are there, and mpicc seems to be able to use them. So it seems to work, but I'm not sure I understand how or why... Any ideas? So, I'd suggest you list out the libraries which need getarg, and link them using gfortran, and others using $CLINKER. Sounds OK? I've neatened up the patches, and am putting everything at http://lyre.mit.edu/~powell/mpich/ with a bunch of new mpif90 support stuff. If you're sure it's right, I'll upload it. But it will have to get through the new queue because of the ldbl-gf name change. I guess things should be fine, though you might want others with rdepends to check. To allay fears of breakage, experimental might be OK? Thanks again, this is a real milestone for the mpich package! I am glad to have been of help! [BTW, are you on debian-beowulf and/or debian-science? If so, I won't CC you in my announcement to those lists of the mpich transition.] No, I am not (yet). Please do CC me, though I'll be a mere observer. Many thanks. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600036 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#195509: Proceeding on this bug.
On Thu, 2008-01-31 at 11:36 +0530, Kumar Appaiah wrote: # Bcc'ing control severity 195509 important tags 195509 + patch thanks On Thu, Jan 31, 2008 at 09:25:30AM +0530, Kumar Appaiah wrote: @@ -170,7 +170,10 @@ libbase=`basename $libname .a` # The -h name sets the name of the object; this is necessary to # ensure that the dynamic linker can find the proper shared library. -if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then +export F77_GETARGDECL=intrinsic GETARG + if $CLINKER -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then + echo Successfully linked $libname + elif gfortran-4.3 -shared -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs ; then echo Successfully linked $libname else echo Linking $libname shared lib failed This is certainly not good, but seems to work. Maybe you can refine it. This is also the reason why you see the getarg errors interspersed in the build logs. Now, the failure is this: [snip] I have no idea on how to handle this. My observation is that the lines in question are related to some f2c and c2f. For example, the lines in question in mpi.h are: [snip more] Further diagnosis showed that these are the error causing lines, along with the fixes: diff -u mpich-1.2.7/src/fortran/configure mpich-1.2.7/src/fortran/configure --- mpich-1.2.7/src/fortran/configure +++ mpich-1.2.7/src/fortran/configure @@ -15820,11 +15820,11 @@ # turn off f90 F90= else - F90_MODINCFLAG=`$MAKE -f ../../f90modules/Makefile f90modflag` - F90MODINCSPEC=`$MAKE -f ../../f90modules/Makefile f90modspec` + F90_MODINCFLAG=`$MAKE -s -f ../../f90modules/Makefile f90modflag` + F90MODINCSPEC=`$MAKE -s -f ../../f90modules/Makefile f90modspec` if test -z $USER_SET_F90INC -a -z $F90INC ; then # This should use a test or try to get it from the f90module. - F90INC=`$MAKE -f ../../f90modules/Makefile f90incflag` + F90INC=`$MAKE -s -f ../../f90modules/Makefile f90incflag` fi fi fi For some reason, make was printing make[1]: entering directory... (and confusing the build). And this resulted in a bad config.status, with sed errors (and commands like sed s,make[1] ...), which produced an empty mpe_fortdefs.h, which didn't result in defines for the relevant MPI_* stuff. I have attached a patch and a successful build log. I hope this is useful to you to base your changes on. Please note that my fixes are far from elegant, but I didn't have (or try spending) the time to make them neat... Terrific! Thanks for the hard work! I'll neaten them up myself, that's the easy part. And, I have raised the severity of the bug to important since this is part of the gfortran transition. (But if you thought it's just because I want more brownie points for producing a patch for an important bug, well I won't deny it! :-) Actually, given how many years this bug has been open, and that it's holding up a major transition, and several people have bugged me about it, I'd say important is a fair characterization. :-) -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#195509: Proceeding on this bug.
Kumar Appaiah wrote: Er, apologies for the previous post... it failed due to getarg, in all likelihood. I missed reading the logs properly. ARM Ltd are sponsoring work by CodeSourcery (the gFortran compiler writers) to fix the GETARG problem, but it will be a few weeks before we see anything I think. Colin -- Colin Tuckley | +44(0)1903 236872 | PGP/GnuPG Key Id Debian Developer | +44(0)7799 143369 | 0x1B3045CE There are 10 types of people in the world. Those that know binary, and those that don't. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#195509: Proceeding on this bug.
On Wed, 2008-01-30 at 01:09 +0530, Kumar Appaiah wrote: 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). Excellent, thanks very much for the patch and for your help! However, the build fails at a later stage. Attached is my patch, and the build log. The relevant parts are here: You missed a very relevant part: log checking whether C compiler accepts option -fPIC... yes checking whether routines compiled with -fPIC can be linked with ones compiled without -fPIC... yes checking whether Fortran compiler accepts option -PIC... no checking whether Fortran compiler accepts option -fPIC... yes checking whether routines compiled with -fPIC can be linked with ones compiled without -fPIC... yes checking for argument used to indicate shared lib search dir... -Wl,-rpath -Wl, checking whether shared libraries can be built... no Running device-specific setup program [snip] ranlib libpmpi++.a Making all in balky make[5]: Nothing to be done for `all'. make[5]: Nothing to be done for `all-am'. make --no-print-directory mpi-lib-test make --no-print-directory profileliblink Testing that MPI applications can be linked... make --no-print-directory linktest make overtake /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -c /tmp/buildd/mpich-1.2.7/examples/test/pt2pt/overtake.c /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -c /tmp/buildd/mpich-1.2.7/examples/test/pt2pt/test.c /tmp/buildd/mpich-1.2.7/image_mpich/bin/mpicc -o overtake overtake.o test.o make clean make --no-print-directory mpi-addons make --no-print-directory mpelib Making MPE Profiling Libraries /log Compare with the -5 i386 build log: log checking whether C compiler accepts option -fPIC... yes checking whether routines compiled with -fPIC can be linked with ones compiled without -fPIC... yes checking whether Fortran compiler accepts option -PIC... no checking whether Fortran compiler accepts option -fPIC... yes checking whether routines compiled with -fPIC can be linked with ones compiled without -fPIC... yes checking for argument used to indicate shared lib search dir... -Wl,-rpath -Wl, checking whether shared libraries can be built... yes checking whether programs remember where the shared lib is... yes Running device-specific setup program [snip] ranlib libpmpi++.a Making all in balky make[5]: Nothing to be done for `all'. make[5]: Nothing to be done for `all-am'. make --no-print-directory mpi-lib-test make --no-print-directory profileliblink Testing that MPI applications can be linked... make --no-print-directory linktest make overtake /build/buildd/mpich-1.2.7/image_mpich/bin/mpicc -fPIC -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -c /build/buildd/mpich-1.2.7/examples/test/pt2pt/overtake.c /build/buildd/mpich-1.2.7/image_mpich/bin/mpicc -fPIC -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -c /build/buildd/mpich-1.2.7/examples/test/pt2pt/test.c /build/buildd/mpich-1.2.7/image_mpich/bin/mpicc -o overtake overtake.o test.o make clean make --no-print-directory mpi-addons Making a shared library of libmpich.a Successfully linked libmpich.a Making a shared library of libpmpich.a Successfully linked libpmpich.a Making a shared library of libfmpich.a Successfully linked libfmpich.a Making a shared library of libpmpich++.a Successfully linked libpmpich++.a Testing that MPI applications can be linked with shared libs... make overtake /build/buildd/mpich-1.2.7/image_mpich/bin/mpicc -fPIC -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -c /build/buildd/mpich-1.2.7/examples/test/pt2pt/overtake.c /build/buildd/mpich-1.2.7/image_mpich/bin/mpicc -fPIC -DUSE_SOCKLEN_T
Bug#195509: Proceeding on this bug.
On Thu, Jan 31, 2008 at 07:24:05AM +0530, Kumar Appaiah wrote: Dear Adam, On Wed, Jan 30, 2008 at 01:45:40PM -0500, Adam C Powell IV wrote: However, the build fails at a later stage. Attached is my patch, and the build log. The relevant parts are here: You missed a very relevant part: Er, apologies for the previous post... it failed due to getarg, in all likelihood. I missed reading the logs properly. I shall give it one more try when I have time. Sorry. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036 signature.asc Description: Digital signature
Bug#195509: Proceeding on this bug.
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