[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS Build problem (what.m missing?)
From: |
Fredrik Lingvall |
Subject: |
Re: CVS Build problem (what.m missing?) |
Date: |
Wed, 31 Oct 2007 09:41:54 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070807) |
John W. Eaton wrote:
> |
> | I had some initial problems compiling the foo.f. It seems that gfortran
> | i picky regarding white space.
> | Compiling:
> |
> | 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
> |
> | gives the error,
> |
> | fllap4 octave # gfortran foo.f -L/usr/local/lib -lBLAS -lLAPACK
> | In file foo.f:1
> |
> | program foo
> | 1
> | Error: Non-numeric character in statement label at (1)
> | In file foo.f:1
> |
> | program foo
> | 1
> | Error: Unclassifiable statement at (1)
>
> That's very strange because the configure script has
>
> 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
>
> so I don't understand where the leading spaces on the "program foo"
> line went. They are definitely present in my configure.in and the
> generated configure file.
>
>
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
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.
Note: I always run ./autogen.sh before ./configure.
/Fredrik
- Re: CVS Build problem (what.m missing?), (continued)
- Re: CVS Build problem (what.m missing?), David Bateman, 2007/10/23
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/23
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/23
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/23
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/23
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/25
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/25
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/25
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/26
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/26
- Re: CVS Build problem (what.m missing?),
Fredrik Lingvall <=
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/31
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/31
- Re: CVS Build problem (what.m missing?), John Swensen, 2007/10/31
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/31
- Re: CVS Build problem (what.m missing?), Fredrik Lingvall, 2007/10/31
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/31
- Re: CVS Build problem (what.m missing?), John Swensen, 2007/10/31
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/31
- Re: CVS Build problem (what.m missing?), John Swensen, 2007/10/31
- Re: CVS Build problem (what.m missing?), John W. Eaton, 2007/10/31