[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
951220: netcdf-2.4-beta5.tar.Z
- Subject: 951220: netcdf-2.4-beta5.tar.Z
- Date: Wed, 20 Dec 95 09:22:41 -0700
David,
>Date: Wed, 20 Dec 1995 11:36:04 +1100 (EST)
>From: address@hidden (David Micklethwaite)
>Organization: Cray Research Australia
>Subject: Re: 951219: netcdf-2.4-beta5.tar.Z
>Keywords: 199512190336.AA09346
In the above message you wrote:
> Thnaks for the prompt reply. Here is what happened when I followed your
> step by step directions - it didn't work but maybe there is a further
> clue about what is going wrong.
>
> I guess all I need out of this build is the library and wonder hwether I
> can manually go to the libsrc directory and say "make" there?
You won't be able to go into the libsrc/ subdirectory and execute a
`make' there because the makefile will not have been built by the
configure script.
>
> > We have to determine why the configure script thinks you're
> > cross-compiling. Try the following:
> >
> > 1. Go to the top-level source directory.
...
Looks OK.
> > 2. Execute the command `make clean' (this might not work because
> > the makefiles might not exist -- don't worry about it).
...
>
> > 3. Remove the file `config.cache'
...
> > 4. Echo the the variable $cross_compiling. If it's set to `yes',
> > then that's the problem. Unset the variable.
>
> % echo $cross_compiling
> cross_compiling: Undefined variable.
I didn't think it was set. So much for the longshot.
...
> > 5. Edit the file `configure'. Find the line that contains the string
> > `checking whether cross-compiling'. Insert the command `set -x'
> > before that line and the command `set +x' before the later line that
> > contains the string `checking size of int'.
>
> # If we cannot run a trivial program, we must be cross compiling.
> set -x
> echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
> if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
>
I assume the code gap at this point is because you didn't want to include
all the code.
> set +x
> echo $ac_n "checking size of int""... $ac_c" 1>&6
> if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
>
> > 6. Execute the configure script. Trap the output and send it to
> > me.
> % configure
...
> + echo checking whether cross-compiling... \c
> + 1>& 6
> checking whether cross-compiling... + echo ${ac_cv_c_cross+set}
> + eval test "${ac_cv_c_cross+set}" = set
> + test = set
> + test = yes
> + cat
> + 1> conftest.c 0< /tmp/jtmp.011287a/sh79446.9
> + eval ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext
> $LIBS 1>&5 2>&5
> + c89 -o conftest -O conftest.c
> + 1>& 5 2>& 5
> + test -s conftest
> + ac_cv_c_cross=yes
> + rm -fr conftest.c
> + cross_compiling=yes
> + echo yes
> + 1>& 6
> yes
> checking size of int... configure: error: can not run test program while
> cross compiling
> %
It appears that the following command:
c89 -o conftest -O conftest.c
which was executed by the configure script in the above, was unable to
create the file `conftest' and that's the reason the configure script
decided that you must be cross-compiling. I infer this from the `test
-s conftest' above being immediately followed by the `ac_cv_c_cross=yes'
and from the fact that the `rm -fr conftest*' was expanded by the shell
to just `rm -fr conftest.c' (the executable wasn't listed).
If the above, simple compile doesn't work, then you haven't a prayer of
building the netCDF package. We need to discover why the compile didn't
work. I suggest the following:
1. Edit the configure script:
a. Comment-out the `rm -fr conftest*' command in the section
of code we've been dealing with.
b. Change the `set -x' to `exit'.
These changes will allow the `conftest.c' file to exist after the
script has terminated.
2. Remove config.cache and *.log
3. Execute the configure script.
4. Look at the file `config.log'. The last lines in it might
indicate why the compile failed.
5. Try manually compiling the `conftest.c' file:
c89 -o conftest -O conftest.c
Trap the output and send it to me (it should be the same as the
last lines in the `config.log' file.
6. Try using other C compilers to manually compile the `conftest.c'
file. If no C compiler will compile the file, they try simple
chages to the file.
7. If another C compiler will compile the `conftest.c' file,
then try the configure script with that compiler:
a. Back out of all changes to the configure script.
b. Remove the files config.cache and *.log
c. Set the environment variable CC to the new compiler, e.g.
% setenv CC "gcc -ansi" # just an example
d. Execute the configure script. Trap the output in case
something goes wrong.
> > I think there's something in your environment that's causing the
> > configure script to think that you're cross-compiling.
>
> Here's what my environment looks like (all the modules stuff is new to
> me and I don't understand it - it's needed by the latest version of
> cf90):
I meant `environment' in the broadest sense, not just your environment
variables (they look OK to me, however).
--------
Steve Emmerson <address@hidden>