[ATrpms-users] Re: FC4 and g77 and f2c
Axel.Thimm at atrpms.net
Sun Jun 19 21:08:13 CEST 2005
On Sun, Jun 19, 2005 at 08:50:38PM +0200, André Fettouhi wrote:
> Axel Thimm wrote:
> >On Sun, Jun 19, 2005 at 12:55:17PM +0200,
> >Andre.Fettouhi at exp2.physik.uni-giessen.de wrote:
> >>I am trying to compile a c/c++ program that has a few fortran files.
> >>These are
> >>compiled with the -lg2c option. The program compiled without a problem on
> >>and FC3 but on FC4 I get the error message
> >>[root at pczo Go4FitExample]# make
> >>g++ -O /usr/local/Go4/Go4FitExample/Example3.o
> >>/usr/local/Go4/Go4FitExample/Example3Func.o -L/usr/local/root/lib -lCore
> >>-lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix
> >>-pthread -lm -ldl -rdynamic -lMinuit -L/usr/local/Go4/Go4Library -lGo4Fit
> >>-o /usr/local/Go4/Go4FitExample/Example3
> >>/usr/bin/ld: cannot find -lg2c
> >>collect2: ld returned 1 exit status
> >>make: *** [/usr/local/Go4/Go4FitExample/Example3] Error 1
> >>For some reason it can't find libg2c but I have installed all fortran
> >>also the compat-gcc etc. to make sure I can compile g77. Strangely I
> >>can't use
> >>locate lib2gc to find them, but on FC2/FC3 I could.
> >Are you sure you wanted to ask this on the ATrpms' mailing lists?
> >Anyway libg2c is in compat-libf2c-32.
> >You could also use gfortran (and -lgfortran) and rebuild the fortran
> >object files. See also
> I know Axel this doesn't really fit into the list, the point is that I
> don't understand why it can't find libg2c when I have compat-libf2c-32
> installed. I will try to use -lgfortran and see if that works. Thanks
> for you reply :).
Checking this more carefully, I see that the *.so symlink to
libg2c.so.0 is missing. I.e. only built executables can access the
lib, not compilers.
You can try to add a symlink from libg2c.so.0 to libg2c.so and
retry. You may be lucky. If so, consider reporting to
bugzilla.redhat.com. The g77 compiler is quite useless w/o properly
But the route to use gfortran is better as a long term solution.
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.atrpms.net/pipermail/atrpms-users/attachments/20050619/4e86ea9c/attachment.bin
More information about the atrpms-users