octave-maintainers
[Top][All Lists]
Advanced

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

Re: CVS Build problem (what.m missing?)


From: John W. Eaton
Subject: Re: CVS Build problem (what.m missing?)
Date: Wed, 31 Oct 2007 13:08:44 -0400

On 31-Oct-2007, Fredrik Lingvall wrote:

| It was just my wild guess that it could be the problem. I have done some
| more testing and the CVS builds fine on my x86_64 (Dell M90) machine but
| not on my x64 (Dell D810) machine (both machines are running up-to-date
| Gentoo).
| 
| Below is the part of the configure script that tests the BLAS
| compability stuff:
| 
| { echo "$as_me:$LINENO: checking BLAS library calling convention
| compatibility" >&5
| echo $ECHO_N "checking BLAS library calling convention compatibility...
| $ECHO_C" >&6; }
| cat << EOF > conftest.f
|       program foo
|       double complex zdotu, zx(10), zy(10), retval
|       integer n, incx, incy
|       n = 10
|       incx = 1
|       incy = 1
|       do 10 i = 1, n
|         zx(i) = dcmplx (i, 0)
|         zy(i) = dcmplx (0, i)
|    10 continue
|       retval = zdotu (n, zx, incx, zy, incy)
|       if (retval .eq. dcmplx (0, 385)) then
|         print *, 'succeeded'
|       else
|         print *, 'failed'
|         print *, retval
|       endif
|       end
| EOF

Earlier, you showed a .f file that started with

program foo
      double complex ...

If that is what the above shell script produces, then I don't know how
to fix this problem, as your shell is doing something completely
unexpected.  So, is the code above copied into the conftest.f file
correctly or is your shell broken?

| XLIBS="$LIBS"
| LIBS="$BLAS_LIBS $FLIBS $LIBS"
| ac_ext=f
| ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
| ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext
| $LIBS >&5'
| ac_compiler_gnu=$ac_cv_f77_compiler_gnu
| 
| (eval "$ac_compile"; eval "$ac_link") 2>&5
| ac_ext=c
| ac_cpp='$CPP $CPPFLAGS'
| ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
| ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
| conftest.$ac_ext $LIBS >&5'
| ac_compiler_gnu=$ac_cv_c_compiler_gnu
| 
| LIBS="$XLIBS"
| case "`./conftest$ac_exeext`" in
|   *succeeded*)
|   { echo "$as_me:$LINENO: result: yes" >&5
| echo "${ECHO_T}yes" >&6; }
| ;;
|   *)
|   { echo "$as_me:$LINENO: result: no" >&5
| echo "${ECHO_T}no" >&6; }
|   { echo "$as_me:$LINENO: WARNING: Your BLAS library was apparently
| compiled with a Fortran" >&5
| echo "$as_me: WARNING: Your BLAS library was apparently compiled with a
| Fortran" >&2;}
|   { echo "$as_me:$LINENO: WARNING: compiler that uses a different
| calling convention from" >&5
| echo "$as_me: WARNING: compiler that uses a different calling convention
| from" >&2;}
|   { echo "$as_me:$LINENO: WARNING: the one used by the selected
| compiler, $F77." >&5
| echo "$as_me: WARNING: the one used by the selected compiler, $F77." >&2;}
|   { { echo "$as_me:$LINENO: error: You must correct this problem before
| building Octave." >&5
| echo "$as_me: error: You must correct this problem before building
| Octave." >&2;}
|    { (exit 1); exit 1; }; }
| ;;
| esac
| 
| 
| If I have understood this correctly then the lines:
| 
| ac_ext=f
| ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
| ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext
| $LIBS >&5'
| ac_compiler_gnu=$ac_cv_f77_compiler_gnu
| 
| (eval "$ac_compile"; eval "$ac_link") 2>&5
| 
| is for compiling the Fortran test code and
| 
| LIBS="$XLIBS"
| case "`./conftest$ac_exeext`" in
|   *succeeded*)
|   { echo "$as_me:$LINENO: result: yes" >&5
| echo "${ECHO_T}yes" >&6; }
| ;;
|   *)
| 
| runs the test code. However, I don't understand what the lines:
| 
| ac_ext=c
| ac_cpp='$CPP $CPPFLAGS'
| ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
| ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
| conftest.$ac_ext $LIBS >&5'
| ac_compiler_gnu=$ac_cv_c_compiler_gnu
| 
| does. It seems to be for compiling some C-test code that I can't find.

The configure.in file has these lines:

AC_LANG_PUSH(Fortran 77)
(eval "$ac_compile"; eval "$ac_link") 2>&AS_MESSAGE_LOG_FD
AC_LANG_POP(Fortran 77)

I think the lines you quote directly above are the result of the
AC_LANG_POP macro, which is resetting the autoconf variables to use
the C compiler.  The argument to AC_LANG_POP is the *current* language,
to allow a consistency check (you should be popping the current
language).

In any case, improvements in this test are welcome.  It would
definitely help to get the transcript of the compile and link steps
into the config.log when there is an error and I don't know the proper
way to do that.

Thanks,

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]