A:
You may have a system on which C and Fortran compilers are incompatible (for
example, using gcc and the vendor's Fortran compiler). If you do not
plan to use Fortran, the easiest fix is to rebuild with the -nof77
option to configure.
You should also look into making your C compiler compatible with your Fortran compiler.
The easiest but ugliest possibility is use f2c to convert Fortran to C, then use the C compiler to compile everything. If you take this route, remember that every Fortran routine has to be compiled using f2c and the C compiler.
Alternatively, you can use various options (check the man pages for your compilers) to see what libraries that add when they link. Add those libraries to the link line for the other compiler. If you find a workable set of libraries, edit the appropriate scripts (e.g., mpicc) to include the necessary libraries. Mpich attempts to find all the libaries that you need but is not always successful.
cc -g -o testtypes testtypes.o -L/usr/local/mpich/lib/solaris/ch_p4 -lmpich -lsocket -lnsl -lthread ld: warning: symbol `_defaultstkcache' has differing sizes: (file /usr/lib/libthread.so value=0x20; file /usr/lib/libaio.so value=0x8); /usr/lib/libthread.so definition taken
cc -o pgm pgm.o -L/usr/local/mpich/lib/hpux/ch_p4 -lmpich -lm /bin/ld: Unsatisfied symbols: sigrelse (code) sigset (code) sighold (code) *** Error code 1
Linking: foo.o(.data+0x0): undefined reference to `pmpi_wtime_'