I have been trying to install nco-3.9.5 on my Sun workstation (solaris 2.8) for the past few days unsuccessfully. My last successfull install was version 2.9. I have had problems installing each new version of nco and have previously given up but now I really need the new operators.
I run .configure, which sort of works (at least it says "configure:24321: Good news: Simple program compiles and links to libnetcdf.a with default compiler flags), even though it also gives me a bunch of "fatal errors" related to a conftest.c (but so do the config.log examples for sparc in the nco website, so it looks like I can ignore this)
Then I tryto run make. I first tried with cc and got some syntax errors, so I installed gcc. Now the errors are different and have to do with an "incomplete type" in my system files.
I am at my wit's end. Could you please give me some indication as to how to fix this?
Thanks so much
Ileana Bladé
root 506 % !make
make all-recursive
make[1]: Entering directory `/usr/local/bin/nco-3.9.5'
Making all in data
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/data'
Making all in doc
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/doc'
Making all in src
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/src'
Making all in nco
make[3]: Entering directory `/usr/local/bin/nco-3.9.5/src/nco'
/bin/bash ../../libtool --tag=CXX --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c -o nco_att_utl.lo nco_att_utl.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c nco_att_utl.c -fPIC -DPIC -o .libs/nco_att_utl.o
In file included from nco_mmr.h:23,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
nco_att_utl.c:439: warning: implicit declaration of function `strcasecmp'
nco_att_utl.c: In function `nco_prs_aed_lst':
nco_att_utl.c:567: warning: implicit declaration of function `strdup'
nco_att_utl.c:567: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:568: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:667: warning: implicit declaration of function `strtoll'
nco_att_utl.c:674: warning: implicit declaration of function `strtoull'
make[3]: *** [nco_att_utl.lo] Error 1
make[3]: Leaving directory `/usr/local/bin/nco-3.9.5/src/nco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/nco-3.9.5'
make: *** [all] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks so much for your quick reply. Unfortunately it did not work.
(see output at the end)
here are the piece of the include file that make it break
(resource.h) . Please let me know if there is anything I can do to help you figure out how to fix this.
Thanks a ton
Ileana
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss; /* XXX: 0 */
long ru_ixrss; /* XXX: 0 */
long ru_idrss; /* XXX: sum of rm_asrss */
long ru_isrss; /* XXX: 0 */
long ru_minflt; /* any page faults not requiring I/O */
long ru_majflt; /* any page faults requiring I/O */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary " */
};
ru_
root 517 % make
make all-recursive
make[1]: Entering directory `/usr/local/bin/nco-3.9.5'
Making all in data
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/data'
Making all in doc
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/doc'
Making all in src
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/src'
Making all in nco
make[3]: Entering directory `/usr/local/bin/nco-3.9.5/src/nco'
/bin/bash ../../libtool --tag=CXX --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c -o nco_att_utl.lo nco_att_utl.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c nco_att_utl.c -fPIC -DPIC -o .libs/nco_att_utl.o
<command line>:2:15: warning: extra tokens at end of #undef directive
In file included from nco_mmr.h:23,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
nco_att_utl.c:439: warning: implicit declaration of function `strcasecmp'
nco_att_utl.c: In function `nco_prs_aed_lst':
nco_att_utl.c:567: warning: implicit declaration of function `strdup'
nco_att_utl.c:567: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:568: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:667: warning: implicit declaration of function `strtoll'
nco_att_utl.c:674: warning: implicit declaration of function `strtoull'
make[3]: *** [nco_att_utl.lo] Error 1
make[3]: Leaving directory `/usr/local/bin/nco-3.9.5/src/nco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/nco-3.9.5'
make: *** [all] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In file included from nco_mmr.h:25,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
(the warning about the "incomplete token" disappears if I don't use the option CPPFLAGS='-UHAVE_GETRUSAGE' ,
but the ru_time error doesn't).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I have been trying to install nco-3.9.5 on my Sun workstation (solaris 2.8) for the past few days unsuccessfully. My last successfull install was version 2.9. I have had problems installing each new version of nco and have previously given up but now I really need the new operators.
I run .configure, which sort of works (at least it says "configure:24321: Good news: Simple program compiles and links to libnetcdf.a with default compiler flags), even though it also gives me a bunch of "fatal errors" related to a conftest.c (but so do the config.log examples for sparc in the nco website, so it looks like I can ignore this)
Then I tryto run make. I first tried with cc and got some syntax errors, so I installed gcc. Now the errors are different and have to do with an "incomplete type" in my system files.
I am at my wit's end. Could you please give me some indication as to how to fix this?
Thanks so much
Ileana Bladé
root 506 % !make
make all-recursive
make[1]: Entering directory `/usr/local/bin/nco-3.9.5'
Making all in data
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/data'
Making all in doc
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/doc'
Making all in src
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/src'
Making all in nco
make[3]: Entering directory `/usr/local/bin/nco-3.9.5/src/nco'
/bin/bash ../../libtool --tag=CXX --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c -o nco_att_utl.lo nco_att_utl.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c nco_att_utl.c -fPIC -DPIC -o .libs/nco_att_utl.o
In file included from nco_mmr.h:23,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
nco_att_utl.c:439: warning: implicit declaration of function `strcasecmp'
nco_att_utl.c: In function `nco_prs_aed_lst':
nco_att_utl.c:567: warning: implicit declaration of function `strdup'
nco_att_utl.c:567: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:568: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:667: warning: implicit declaration of function `strtoll'
nco_att_utl.c:674: warning: implicit declaration of function `strtoull'
make[3]: *** [nco_att_utl.lo] Error 1
make[3]: Leaving directory `/usr/local/bin/nco-3.9.5/src/nco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/nco-3.9.5'
make: *** [all] Error 2
without access to a solaris system, i can't tell why it's breaking.
see if this configure method helps:
CPPFLAGS='-UHAVE_GETRUSAGE' ./configure ...
Thanks so much for your quick reply. Unfortunately it did not work.
(see output at the end)
here are the piece of the include file that make it break
(resource.h) . Please let me know if there is anything I can do to help you figure out how to fix this.
Thanks a ton
Ileana
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss; /* XXX: 0 */
long ru_ixrss; /* XXX: 0 */
long ru_idrss; /* XXX: sum of rm_asrss */
long ru_isrss; /* XXX: 0 */
long ru_minflt; /* any page faults not requiring I/O */
long ru_majflt; /* any page faults requiring I/O */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary " */
};
ru_
root 517 % make
make all-recursive
make[1]: Entering directory `/usr/local/bin/nco-3.9.5'
Making all in data
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/data'
Making all in doc
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/doc'
Making all in src
make[2]: Entering directory `/usr/local/bin/nco-3.9.5/src'
Making all in nco
make[3]: Entering directory `/usr/local/bin/nco-3.9.5/src/nco'
/bin/bash ../../libtool --tag=CXX --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c -o nco_att_utl.lo nco_att_utl.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c nco_att_utl.c -fPIC -DPIC -o .libs/nco_att_utl.o
<command line>:2:15: warning: extra tokens at end of #undef directive
In file included from nco_mmr.h:23,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
nco_att_utl.c:439: warning: implicit declaration of function `strcasecmp'
nco_att_utl.c: In function `nco_prs_aed_lst':
nco_att_utl.c:567: warning: implicit declaration of function `strdup'
nco_att_utl.c:567: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:568: warning: assignment makes pointer from integer without a cast
nco_att_utl.c:667: warning: implicit declaration of function `strtoll'
nco_att_utl.c:674: warning: implicit declaration of function `strtoull'
make[3]: *** [nco_att_utl.lo] Error 1
make[3]: Leaving directory `/usr/local/bin/nco-3.9.5/src/nco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bin/nco-3.9.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/nco-3.9.5'
make: *** [all] Error 2
try inserting the line
# include <sys/time.h> /* machine time (needed by Mac OS X for struct rusage) */
just ahead of the line
#include <sys/resource.h> /* Resource usage and limits */
in the file nco/src/nco/nco_mmr.h
then re-run your old configure command and make
Thanks for your answer.
Unfortunately I still get the same error:
Making all in nco
make[3]: Entering directory `/usr/local/bin/nco-3.9.5/src/nco'
/bin/bash ../../libtool --tag=CXX --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c -o nco_att_utl.lo nco_att_utl.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -UHAVE_GETRUSAGE= -I/usr/local/bin/udunits-1.12.9/include -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE -MT nco_att_utl.lo -MD -MP -MF .deps/nco_att_utl.Tpo -c nco_att_utl.c -fPIC -DPIC -o .libs/nco_att_utl.o
<command line>:2:15: warning: extra tokens at end of #undef directive
In file included from nco_mmr.h:25,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error
This is what nco_mmr.h looks like now:
#ifndef NCO_MMR_H
#define NCO_MMR_H
/* Standard header files */
#include <errno.h> /* system/library error diagnostics, errno */
#include <stdio.h> /* stderr, FILE, NULL, printf */
#include <stdlib.h> /* strtod, strtol, malloc, getopt, exit */
#include <string.h> /* strcmp. . . */
#ifdef MACOSX
# include <sys/time.h> /* machine time (needed by Mac OS X for struct rusage) */
#endif /* !MACOSX */
#include <sys/time.h> /* machine time (needed by Mac OS X for struct rusage) */
#include <sys/resource.h> /* Resource usage and limits */
: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
sorry I forgot the last lines of the make output
In file included from nco_mmr.h:25,
from nco_cnf_typ.h:25,
from nco_att_utl.h:30,
from nco_att_utl.c:9:
/usr/include/sys/resource.h:144: error: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:145: error: field `ru_stime' has incomplete type
nco_att_utl.c: In function `nco_hst_att_cat':
(the warning about the "incomplete token" disappears if I don't use the option CPPFLAGS='-UHAVE_GETRUSAGE' ,
but the ru_time error doesn't).