[ghemical-devel] On MOPAC, g2c.h and header files
Jean Bréfort
jean.brefort at ac-dijon.fr
Tue Oct 11 05:50:53 EDT 2005
Le mardi 11 octobre 2005 à 11:44 +0300, Tommi Hassinen a écrit :
> On Mon, 10 Oct 2005, Jean Bréfort wrote:
>
> > The libtool problem is still there. If I run make, aclocal is called:
> > /home/jean/sources/installs/mopac7-1.10rc1/missing --run aclocal-1.8
> > This breaks things.
> > This occurs, because configure.ac is more recent than aclocal.m4.
> > Makefile.in should also be more recent than configure.ac otherwise
> > automake is also called. To make things work, I had to type:
> > touch aclocal.m4
> > touch Makefile.in
> > touch configure
>
> Ok, I try to fix this next time. CVS is not that good for maintaining
> modification times so I hope it works better in future. It would be nice
> if the tool programs would themselves leave the proper modification times.
> I just use
>
> aclocal
> autoconf
> automake
> autoheader
> libtoolize --copy --force
>
> for updating the scripts ; is this a correct set of commands?
Yes it is correct, but you should run all each time (at least just
before packaging).
> > About the compiler problem, even if things work with gcc-3.2, I am not
> > certain that they are reliable.
> > Take ME08B in diag.f. It is defined as:
> >
> > SUBROUTINE ME08B (A,Q,B,N,IA)
> > REAL A(IA,*),Q(2,*),B(IA,*)
> >
> > and is called from ME08B:
> > 50 CALL ME08B (A(K,K),Q(K),A(I,K),N-K+1,IA*2)
> > where A and Q are complex, not real. I have forgotten fortran and I do
> > not know how things can work, but the code generated by f2c will most
> > likely fail because in _me08a, the c compiler uses the extern
> > declaration where the variables are complex* and the real code use real*
> > arrays. There are no solutions to that other than rewriting the code :-(
>
> Thanks for your detailed analysis of the problem. I think I have found a
> way around this problem. I just moved the code blocks for subroutines
> EC08C and ME08B to the top of the cdiag.f fortran source code file. The
> subroutines are not called from outside their own source file, and
> apparently defining the subroutine code before any calls to the subroutine
> will help define the parameter types and complex tables are no longer put
> in place of real tables. According to my testing so far it compiles with
> gcc-4 nicely and also works the same way as it used to work earlier.
Seems reasonable.
> I have made the RC2 for download here:
>
> http://www.uku.fi/~thassine/tmp/mopac7-1.10rc2.tgz
It compiles fine with gcc-3.4.4 at least :-)
Cheers,
Jean
More information about the ghemical-devel
mailing list