You are not logged in.
I have a set of programs I use for work that were written in fortran. Since I updated my laptop with the new gcc they won't compile anymore. Here's an example output from make:
gfortran -i686 -o ~/bin/enzymix blkdta.o bond_p.o bond_w.o born_prep.o charge_clear.o chi_p.o enzblkdta.o enz_fun.o enz_main.o enz_randm.o expand.o find_center.o genfield.o gateway.o genfield_ww.o genf_lgvn.o genf_poly.o gen_grid.o genwat.o get_parm.o get_xm.o induce.o induce_poly.o long.o lgvn.o masscntr.o nblist.o nbplist.o newf_lgvn3.o nonb_pp.o nonb_pw.o nonb_ww.o nonbpoly_p.o nonbpoly_w.o phi_p.o poly_ene.o poly_prep.o rest_in.o rotate.o sci.o set_exclude.o taylor.o theta_p.o theta_w.o timer.o topoin.o torsion.o trajeca.o vborn.o vborn_poly.o watcons.o write_ene.o chk_stop.o
enz_main.o: In function `MAIN__':
enz_main.f:(.text+0x1e): undefined reference to `_gfortran_set_std'
genf_lgvn.o: In function `genf_lgvn_':
genf_lgvn.f:(.text+0x327): undefined reference to `_gfortran_pow_r8_i4'
genf_lgvn.f:(.text+0x881): undefined reference to `_gfortran_pow_r8_i4'
collect2: ld returned 1 exit status
make: *** [enzymix] Error 1
For all the programs it has the undefined reference to '_gfortran_set_std' error compiling the "main" program, though it sometimes gives different errors following that.
The make file
ENZ_OBJ =\
blkdta.o bond_p.o bond_w.o \
born_prep.o charge_clear.o chi_p.o \
enzblkdta.o enz_fun.o enz_main.o \
enz_randm.o expand.o find_center.o genfield.o \
gateway.o genfield_ww.o genf_lgvn.o \
genf_poly.o gen_grid.o genwat.o get_parm.o \
get_xm.o induce.o induce_poly.o \
long.o lgvn.o masscntr.o nblist.o \
nbplist.o newf_lgvn3.o nonb_pp.o nonb_pw.o \
nonb_ww.o nonbpoly_p.o nonbpoly_w.o \
phi_p.o poly_ene.o poly_prep.o \
rest_in.o rotate.o sci.o \
set_exclude.o taylor.o theta_p.o theta_w.o \
timer.o topoin.o torsion.o trajeca.o \
vborn.o vborn_poly.o watcons.o \
write_ene.o chk_stop.o
NOT_HERE = bond.o econst.o \
procons.o save_poly.o average.o
## The subroutines in ${NOT_HERE} are deactivated. To reactivate them
# put the object names in ${ENZ_OBJ} and un-comment the pertinent statements
# in trajeca.f, get_parm.f, & elsewhere.
FLAG = -i686
enzymix: ${ENZ_OBJ}
gfortran ${FLAG} -o ~/bin/enzymix ${ENZ_OBJ}
.f.o:
gfortran ${FLAG} -c $<
and the actual contents of that "main" program:
c-------------------------------------------------------------------------
program enzymix
implicit none
include 'Enz_mol.h'
include 'Enz_sph.h'
c include 'Enz_wat.h'
c.......................................................................
nd_lgvn=0
call enzblkdta !get misc. parameters
call get_parm !get dynamics parameters
call topoin !get protein information
if(irest.eq.1) call rest_in !get old position, velocity, accel. vectors
call gateway !get ready
call trajeca !start dynamics
c.......................................................................
end
I'll admit my efforts at troubleshooting have been somewhat limited due to my limited programming knowledge (I'm really just more of user for these programs). I did see posts about problems compiling the kernel with the new gcc, but my impression was that was a kernel issue not gcc issue, but haven't seen much else posted anywhere about issues with the gcc 4.3. Lookng at gcc changelog has this entry which seems like it might be related, but I'm not certain what exactly it means:
"GNU Fortran now defines __GFORTRAN__ when it runs the C preprocessor (CPP)."
Googling the error itself didn't come up with much, but this posting on the gfortran mailing list at first looked like it might be helpful, though adding both CC=gcc and FC=gfortran didn't change anything for me.
Anybody else have suggestions of what to try to get this working again?
Offline
One thing you could do is install gcc34 (it's in [extra]) and use that instead. There's nothing wrong with having 2 versions of a compiler. It's not a good long-term solution, but if you need to compile today...
Offline
Try adding:
-L/usr/lib -lgfortran
at the end of the compile line.
Offline