[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 950717: netCDF installation error
- Subject: Re: 950717: netCDF installation error
- Date: Mon, 17 Jul 1995 14:47:19 -0600
>From: address@hidden (Wang-Ping Chen)
>Organization: Dept of Geology, U Illinois
>Keywords: 199507171929.AA01841 netCDF install Solaris
Hi,
> Novice user of netCDF seeking help--
>
> My objective: Installing on SUN SPARC20 running Solaris 2.4 in order to
> implement the Generic Mapping Tool
> My actions: Accepting default values described in the "INSTALL" document;
> './configure' resulted in no complaints;
> 'make all' and 'make test' caused the following errors:
> ****************
> making `all' in directory /home/mercury/gmt/netcdf-232pl2/ncgen
> (many line omitted)
> cc -c -DNDEBUG -Dconst= -O error.c
> "error.c", line 129: va_start: argument mismatch
> "error.c", line 198: va_start: argument mismatch
> "error.c", line 152: warning: improper pointer/integer combination: op "="
The "-Dconst=" on the cc command line is unexpected, and I can't reproduce
it here with a Solaris 2.4 system and the 3.0.1 version of the C compiler.
When I run './configure' and 'make all', the generated Makefile causes the
cc compiler to be invoked as follows:
cc -c -I../libsrc -DNDEBUG -O error.c
and there are no error messages when compiling this module.
It appears that either the cc being used is not the Sun ANSI compiler,
typically installed in /opt/SUNWspro/bin/cc, or you have an environment
variable set that the "configure" script is using when invoking the C
compiler. Can you please run "which cc" (or "whence cc" if you are using
ksh) to find out where the C compiler is coming from? Also run "cc -V" to
verify the version of the compiler. I get:
% cc -V
cc: SC3.0.1 13 Jul 1994
Also, please see if you have any of the following environment variables set
before you invoke "configure": CC, CFLAGS, CPPFLAGS. If you had the
environment variable CPPFLAGS defined as "-Dconst=", for example, that would
explain why the argument was being used for the C compilations. You can see
whether these are set and if so, what their values are by running "echo
$CC", "echo $CFLAGS", and "echo $CPPFLAGS".
Also, if you there is a CUSTOMIZE file in your netCDF top-level directory
that sets the values of CC, CFLAGS, or CPPFLAGS, please comment out those
settings and rerun "configure" without them.
Finally, if the above suggestions don't reveal the problem, please send us a
copy of your "config.status" file, after running the "configure" script.
For your reference, I've appended a copy of the "config.status" script we
get by running "configure" on a Solaris 2.4 system. Any differences you get
may reveal the problem.
> Questions:
> 1. Is there something special about SUN Solaris2.4 or C/FORTRAN compiler
> 3.0.1 or am I making some other mistakes?
No, it appears that you are doing it correctly.
> 2. Is netcdf-232pl2.tar.Z the correct version to use (as it is
> symbolically linked to netcdf.tar.Z)? In any event, I'm running into
> identical problems with netcdf-232pl4.
Yes, that version is OK. The only differences between the two versions have
to do with the C++ interface, which is not used by GMT, and the
netcdf-232pl2.tar.Z version has been tested more extensively than the pl4
version.
______________________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
--- Here's our config.status from running "configure" for netcdf-232pl2
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host buddy.unidata.ucar.edu:
#
# ./configure
for arg
do
case "$arg" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
exec /bin/sh ./configure ;;
*) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
esac
done
trap 'rm -f Makefile xdr/Makefile libsrc/Makefile
fortran/Makefile ncgen/Makefile ncdump/Makefile nctest/Makefile
doc/Makefile port/Makefile port/master.mk libsrc/netcdf.h; exit 1' 1 3 15
CPPFLAGS='-DNDEBUG'
CFLAGS='-O'
OS='sunos'
LIBOBJS=''
PORT_HEADERS=''
PORT_MANIFEST=' which'
PORT_SUBDIRS=''
CC='cc'
AR='ar'
RANLIB='@:'
OLD_FILLVALUES='0'
TRANSFORMEES='port/Makefile port/master.mk libsrc/netcdf.h'
FFLAGS=''
LEX='lex'
YACC='yacc'
XDRFILE='xdrposix'
MACHINE='sun4m'
WHICH='which'
CPP='cc -E'
FC='f77'
NEQN='neqn'
TBL='tbl'
INSTALL='/usr/ucb/install -c'
INSTALL_PROGRAM='$(INSTALL)'
INSTALL_DATA='$(INSTALL) -m 664'
MAKEINFO='makeinfo'
SWAP=''
NETLONG=''
CPP_XDR='-I/usr/include/rpc'
DEFS=' -I/usr/include/rpc'
LIBS=''
XDR_LIBOBJS='xdr.o xdrfloat.o xdrstdio.o xdrarray.o'
XDR_INSTALL_DEPS='installed_headers'
LD_XDR=''
FTPDIR='/home/ftp/pub/sdm'
VERSION='2.3.2'
MAJOR_NO='2'
MINOR_NO='3'
srcdir='.'
DEFS=' -I/usr/include/rpc'
prefix='/a/zero/home/russ/tmp'
exec_prefix='/a/zero/home/russ/tmp/bin'
prsub='s%^prefix\([ ]*\)=\([
]*\).*$%prefix\1=\2/a/zero/home/russ/tmp%
s%^exec_prefix\([ ]*\)=\([
]*\).*$%exec_prefix\1=\2/a/zero/home/russ/tmp/bin%'
top_srcdir=$srcdir
for file in .. \
Makefile \
xdr/Makefile \
libsrc/Makefile \
fortran/Makefile \
ncgen/Makefile \
ncdump/Makefile \
nctest/Makefile \
doc/Makefile \
${TRANSFORMEES-}; do if [ "x$file" != "x.." ]; then
srcdir=$top_srcdir
# Remove last slash and all that follows it. Not all systems have dirname.
dir=`echo $file|sed 's%/[^/][^/]*$%%'`
if test "$dir" != "$file"; then
test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
test ! -d $dir && mkdir $dir
fi
echo creating $file
rm -f $file
case $file in
*.c|*.h) echo "/* Generated automatically from `echo $file|sed
's|.*/||'`.in by configure. */" > $file;;
*) echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by
configure." > $file;;
esac
sed -e "
$prsub
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CFLAGS@%$CFLAGS%g
s%@OS@%$OS%g
s%@LIBOBJS@%$LIBOBJS%g
s%@PORT_HEADERS@%$PORT_HEADERS%g
s%@PORT_MANIFEST@%$PORT_MANIFEST%g
s%@PORT_SUBDIRS@%$PORT_SUBDIRS%g
s%@CC@%$CC%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@OLD_FILLVALUES@%$OLD_FILLVALUES%g
s%@TRANSFORMEES@%$TRANSFORMEES%g
s%@FFLAGS@%$FFLAGS%g
s%@LEX@%$LEX%g
s%@YACC@%$YACC%g
s%@XDRFILE@%$XDRFILE%g
s%@MACHINE@%$MACHINE%g
s%@WHICH@%$WHICH%g
s%@CPP@%$CPP%g
s%@FC@%$FC%g
s%@NEQN@%$NEQN%g
s%@TBL@%$TBL%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SWAP@%$SWAP%g
s%@NETLONG@%$NETLONG%g
s%@CPP_XDR@%$CPP_XDR%g
s%@DEFS@%$DEFS%g
s%@LIBS@%$LIBS%g
s%@XDR_LIBOBJS@%$XDR_LIBOBJS%g
s%@XDR_INSTALL_DEPS@%$XDR_INSTALL_DEPS%g
s%@LD_XDR@%$LD_XDR%g
s%@FTPDIR@%$FTPDIR%g
s%@VERSION@%$VERSION%g
s%@MAJOR_NO@%$MAJOR_NO%g
s%@MINOR_NO@%$MINOR_NO%g
s%@srcdir@%$srcdir%g
s%@DEFS@%$DEFS%
" $top_srcdir/${file}.in >> $file
fi; done
cat << EOF_CONFTEST_C > conftest.c
#include <stdio.h>
main()
{
return readsub((char*)NULL) ? 0 : 1;
}
readsub(inpath)
char *inpath;
{
char buf[2048], path[1024];
FILE *fp = inpath == NULL
? stdin
: fopen(inpath, "r");
if (fp == NULL) {
(void) perror(inpath);
return 0;
}
buf[sizeof(buf)-1] = 0;
while (fgets(buf, sizeof(buf), fp) != NULL) {
if (sscanf(buf, "include%*[] \t[]%s", path) == 1) {
if (!readsub(path))
return 0;
} else {
(void) fputs(buf, stdout);
}
}
return 1;
}
EOF_CONFTEST_C
if cc -o conftest conftest.c; then
conftest=`pwd`/conftest
set Makefile xdr/Makefile libsrc/Makefile fortran/Makefile
ncgen/Makefile ncdump/Makefile nctest/Makefile doc/Makefile
port/Makefile
for file do
echo post processing makefile \`$file\'
sd=`pwd`/`echo $file | sed 's,[^/]*$,,'`
base=`basename $file`
(cd $sd; $conftest < $base > conftest.mk && mv conftest.mk $base)
done
fi
rm conftest conftest.c
>From address@hidden Mon Jul 17 10:39:47 1995
> Many thanks for the prompt response. Your comment about the C-compiler
>is right on the money. My path was set such that /usr/ucb/cc was invoked
>before /opt/SUNWspro/bin/cc. Now that this problem is out of the way,
>making the files showed nothing but a few warning messages.
> Moving on to installing the GMT tomorrow, thanks again for the help.
>Regards,
>Wang-Ping