[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-octave-devel] octave2.1_2.1.71-7_i386.changes ACCEPTED



On Sun, Nov 06, 2005 at 02:20:28PM +0100, Rafael Laboissiere wrote:
> * Christian T. Steigies <cts@debian.org> [2005-11-06 12:02]:
> 
> > [...]
> > /usr/lib/gcc/m68k-linux-gnu/4.0.2/../../../libf2c.so: undefined reference to `MAIN__'
> > collect2: ld returned 1 exit status
> > 
> > Looks like a problem with f2c to me?
> 
> Does gfortran work correctly on m68k?  You might want to try the patch below:

There was a reason why we switched from gfortran (g77 in those days) to
f2c/fort77... no idea if gfortran works better now on m68k. I can compile a
simple fortran with fort77, and with gfortran, so that's not it.

I thought it would be because of the final linking with:
-lm -lf2c
instead of -lf2c -lm, as f2c says, but even if I use this as the first
libraries, it does not work. Maybe when building libcruft, the missing -lm
is a problem? Perhaps setting FLIBS=-lf2c -lm could help. Or removing
--without-f2c from the configure options? If it wouldn't take 24h for each
run, these would be the three things I would try. 

The last successful build was with g77, then that was replaced by gfortran,
which was not immediatly available on m68k, but it is now. The next builds
always failed because hdf5 was missing. 2.1.67-1 was the last build were f2c
was used successfully. I don't see a big difference, except that in 2.1.67
-lf2c was used a lot more often (and always with the wrong order of -lm
-lf2c). All the DLD functions, when compiled with g++, were linked with
-lf2c. That seems to have changed a lot in .71, so I am not sure if that is
a significant difference. It didn't help to downgrade f2c (just for the
final linking, maybe the undefined reference has been created much earlier).

So if you make a new upload soon, maybe we should switch to gfortran on
m68k. I would give it a try locally, but only if you do not upload within
one week or so. Still I'd like to know why f2c fails here...

Christian



Reply to: