[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
971111: configure scripts thinks it's cross_compiling
- Subject: 971111: configure scripts thinks it's cross_compiling
- Date: Tue, 11 Nov 97 10:28:30 -0700
Ladean,
>Date: Mon, 10 Nov 97 19:27:15 -0700
>From: "Ladean R. McKittrick" <ladeanm@cyclops>
>Organization: .
>To: address@hidden
>Subject: cross_compiling
>Keywords: 199711110230.TAA05658
In the above message, you wrote:
> I am trying to compile a program that we received from Sandia NL.
> This program uses netCDF and when the configure script is executed, it
> returns the following error:
>
> > configure: error: can not run test program while cross compiling
This indicates a severe problem with the development environment: the
configure script was unable to compile-and-link a trivial program.
> and the following config.log:
>
> > This file contains any messages produced by compilers while
> > running configure, to aid debugging if configure makes a mistake.
> >
> > configure:1156: c89 -E -D_ALL_SOURCE conftest.c >/dev/null 2>conftest.out
> > configure:1197: c89 -E -D_ALL_SOURCE conftest.c >/dev/null 2>conftest.out
> > configure:1663: c89 -o conftest -O -D_ALL_SOURCE conftest.c 1>&5
The above looks OK. Was that *all* of "config.log"?
>
> I am trying to compile this code on an IBM RS6000 with AIX 4.2.
>
> As I understand it, the cross_compiling message indicates that the configure
> script was unable to compile a simple Hello World type c program.
That's correct.
> However, if
> I edit the configure script and put a simple printf statement in the short
> program, e.g.
>
> > cat > conftest.$ac_ext <<EOF
> > #line 1659 "configure"
> > #include "confdefs.h"
> > main(){printf("Hello World\n"); return(0);}
> > EOF
> and comment out the remove
> > #rm -fr conftest*
>
> I end up with a conftest program that prints hello world after the configure
> script has "aborted"; however, I notice this same program does not execute in
>
> the logical test:
> > if test -s conftest && (./conftest; exit) 2>/dev/null; then
>
> I know enough about programming to be dangerous but beyond that I lack the
> insight that I need to solve this problem by myself.
>
> Is there any chance you can help me out?
>
> Thanks
>
> Ladean McKittrick
The reason that the configure script thought it was cross-compiling
should be in the file "config.log". The one you sent was suspiciously
small. Is there more?
--------
Steve Emmerson <http://www.unidata.ucar.edu>