[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020503: udunits build: port/misc/{{stddef,stdlib,time}.h,atexit.c}



Helin,

>Date: Fri, 3 May 2002 11:19:22 -0400 (EDT)
>From: Helin Wei <address@hidden>
>Organization: Ohio State University
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20020503: udunits compilation: cfortran.h can't find environment
>Keywords: 200205022058.g42Kwwa20657

The above message contained the following:

> THis time ./configure went through smoothly, but when I tried 'make', I
> got:
> 
> making `all' in directory /home/hwei/udunits-1.11.7/src/port
> 
> make[1]: Entering directory `/home/hwei/udunits-1.11.7/src/port'
> 
> making `all' in directory /home/hwei/udunits-1.11.7/src/port/misc
> 
> make[2]: Entering directory `/home/hwei/udunits-1.11.7/src/port/misc'
> case `uname -s` in \
> sn*) \
>     cc -O0 config.c -o config; \
>     ;; \
> *) \
>     if cc config.c -o config 2> /dev/null; then \
>         : true; \
>     else \
>         cc -DNO_SC config.c -o config; \
>     fi \
>     ;; \
> esac
> ./config -f > float.h
> cc -c -O -I.  -D_REENTRANT -Df2cFortran uddummy.c
> cc -c -O -I.  -D_REENTRANT -Df2cFortran atexit.c
> In file included from ///usr/include/stdlib.h:33,
>                  from stdlib.h:9,
>                  from atexit.c:9:
> stddef.h:33: redefinition of `size_t'
> ///usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h:199: `size_t'
> previously declared here
> In file included from /usr/include/sys/types.h:126,
>                  from ///usr/include/stdlib.h:391,
>                  from stdlib.h:9,
>                  from atexit.c:9:
> time.h:36: redefinition of `time_t'
> ///usr/include/time.h:70: `time_t' previously declared here
> time.h:45: warning: `struct tm' declared inside parameter list
> time.h:45: warning: its scope is only this definition or declaration,
> which is probably not what you want.
> atexit.c: In function `atexit':
> atexit.c:16: warning: passing arg 1 of `on_exit' from incompatible pointer
> type
> make[2]: *** [atexit.o] Error 1
> make[2]: Leaving directory `/home/hwei/udunits-1.11.7/src/port/misc'
> make[1]: *** [misc/all] Error 1
> make[1]: Leaving directory `/home/hwei/udunits-1.11.7/src/port'
> make: *** [port/all] Error 1

Odd. According to the output of the configure script, your development
environment supplies everything that's needed -- so the C header files
"stddef.h", "stdlib.h", and "time.h" should not have been created in the
"port/misc" subdirectory and the file "atexit.o" should not have been
added to the LIBOBJS macro in the makefile "port/misc/Makefile". I do
not understand how this puzzling behavior could have occurred.

As a workaround, please try the following:

    1.  Go to the "port/misc" subdirectory.

    2.  Remove the files "stddef.h", "stdlib.h", and "time.h".

    3.  Edit the file Makefile: remove the name "atexit.o" from the
        macro LIBOBJS.

    4.  Go to the top-level source directory.

    5.  Execute the command "make clean".

    6.  Perform steps 6 through 9 described near the end of the INSTALL
        file.

Please let me know if this helps.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>