[ncl-install] failed to compile ncl
Mary Haley
haley at ucar.edu
Wed Jan 16 12:24:03 MST 2008
Thanks Alex. We've added this to our trouble shooting section, and
you can also get a new "wrapit.c" file there:
http://www.ncl.ucar.edu/Download/
build_from_src.shtml#Troubleshooting
--Mary
On Jan 16, 2008, at 8:29 AM, Alexander Petkov wrote:
> About the second problem--if it is happening while compiling wrapit,
> see the description and solution below:
>
> =============================
> The error can be reproduced by extracting the source tarball again,
> configuring, and running make. Here is the relevant output from make:
>
> /ncl_ncarg-5.0.0/ni/src/mkwrap> make
> yacc -d wrapit.y
> gcc -ansi -fPIC -O -I../../.././include -I/usr/X11R6/include
> -I/opt/hdf4/include -I/opt/netcdf-3.6.2/gnu/include -DLinux
> -DMAJOR=2 -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
> -DNeedFuncProto -c -o y.tab.o y.tab.c
> flex wrapit.l
> gcc -ansi -fPIC -O -I../../.././include -I/usr/X11R6/include
> -I/opt/hdf4/include -I/opt/netcdf-3.6.2/gnu/include -DLinux
> -DMAJOR=2 -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
> -DNeedFuncProto -c -o lex.yy.o lex.yy.c
> gcc -ansi -fPIC -O -I../../.././include -I/usr/X11R6/include
> -I/opt/hdf4/include -I/opt/netcdf-3.6.2/gnu/include -DLinux
> -DMAJOR=2 -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
> -DNeedFuncProto -c -o Symbol.o Symbol.c
> yacc wrapit.y
> mv -f y.tab.c wrapit.c
> gcc -ansi -fPIC -O -I../../.././include -I/usr/X11R6/include
> -I/opt/hdf4/include -I/opt/netcdf-3.6.2/gnu/include -DLinux
> -DMAJOR=2 -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
> -DNeedFuncProto -c -o wrapit.o wrapit.c
> gcc -ansi -fPIC -O -o wrapit77 y.tab.o lex.yy.o Symbol.o wrapit.o
> -L/home/apetkov/ncl/lib -L/usr/X11R6/lib64 -L/opt/netcdf-3.6.2/gnu/lib
> -L/opt/hdf4/lib -lfl
>
>
> Here wrapit.c gets overwritten. This is because it has the same name
> as wrapit.y, and a timestamp older than wrapit.y:
>
> ncl_ncarg-5.0.0/ni/src/mkwrap> ls -alh
> total 92K
> drwxr-xr-x 2 apetkov users 304 2007-10-30 14:40 .
> drwxr-xr-x 9 apetkov users 304 2008-01-04 15:19 ..
> -rw-r--r-- 1 apetkov users 258 2007-10-05 08:08 Copyright
> -rw-r--r-- 1 apetkov users 896 1998-03-27 16:37 fstrings.h
> -rw-r--r-- 1 apetkov users 1.1K 1999-06-17 14:06 Keywords.h
> -rw-r--r-- 1 apetkov users 3.5K 1998-03-27 16:37 Symbol.c
> -rw-r--r-- 1 apetkov users 10K 1999-02-18 10:26 wrapit.c
> -rw-r--r-- 1 apetkov users 3.9K 1998-04-20 16:53 wrapit.l
> -rw-r--r-- 1 apetkov users 48K 1999-06-18 11:24 wrapit.y
> -rw-r--r-- 1 apetkov users 6.0K 1998-03-27 16:37 WSymbol.h
> -rw-r--r-- 1 apetkov users 1.5K 2005-10-11 02:20 yMakefile
>
> An implicit rule of the make command (I used version 3.80) overwrites
> the .c file due to name collusion and the fact that wrapit.c is older
> than wrapit.y. This is the relevant output from running 'make -p':
>
>
> # Not a target:
> wrapit.c: wrapit.y
> # Implicit rule search has been done.
> # Implicit/static pattern stem: `wrapit'
> # Last modified 2008-01-04 15:31:51.450224256
> # File has been updated.
> # Successfully updated.
> # automatic
> # @ := wrapit.c
> # automatic
> # % :=
> # automatic
> # * := wrapit
> # automatic
> # + := wrapit.y
> # automatic
> # | :=
> # automatic
> # < := wrapit.y
> # automatic
> # ^ := wrapit.y
> # automatic
> # ? := wrapit.y
> # variable set hash-table stats:
> # Load=8/32=25%, Rehash=0, Collisions=2/17=12%
> # commands to execute (built-in):
> $(YACC.y) $<
> mv -f y.tab.c $@
>
>
> So, the solution is to execute "touch wrapit.c " prior to running
> make, so the timestamp of this file gets updated.
>
> Alex
>
> On Jan 16, 2008 7:50 AM, ELAD SHILO <shilo.1 at osu.edu> wrote:
>> Hello,
>>
>> I am trying to install NCL on linux red hat enterprise 4.
>>
>> While doing so, ncl does not compile due to the following errors:
>>
>> pgcc -c -DLINUX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O -
>> I../../.././include -I/usr/X11R6/include -DLinux -DMAJOR=2 -
>> DBuildHDFEOS -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -
>> DByteSwapped -DNeedFuncProto NclHDF.c
>> NOTE: your evaluation license will expire in 14 days, 20.7 hours.
>> For a permanent license, please read the order acknowledgement
>> that you received. Connect to https://www.pgroup.com/License with
>> the username and password in the order acknowledgement.
>>
>> Name: jhf
>> User: sqsd
>> Email: nsx2 at xs
>> Hostid: PGI=000FB0E0C8AFCC0F08B150
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 66)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 311)
>> PGC-S-0039-Use of undeclared variable MAX_NC_NAME (NclHDF.c: 313)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 66)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 311)
>> PGC-S-0039-Use of undeclared variable MAX_NC_NAME (NclHDF.c: 313)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 463)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 465)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 650)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 651)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 1250)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 1470)
>> PGC-S-0091-Integer constant expression required (NclHDF.c: 1953)
>> PGC/x86 Linux/x86 6.0-5: compilation completed with severe errors
>> make[4]: *** [NclHDF.o] Error 2
>>
>> and it is look like this is the causitive also to:
>>
>> : undefined reference to `DoTotal'
>> wrapit.o(.text+0x4f70): In function `yyparse':
>> : undefined reference to `DoTotal'
>> wrapit.o(.text+0x4f70): In function `yyparse':
>> : undefined reference to `DoDimsizes'
>> wrapit.o(.text+0x4fce): In function `yyparse':
>> : undefined reference to `DoDimsizes'
>> wrapit.o(.text+0x51ca): In function `yyparse':
>> : undefined reference to `current'
>> wrapit.o(.text+0x527f): In function `yyparse':
>> : undefined reference to `current'
>> wrapit.o(.text+0x547b): In function `yyparse':
>> : undefined reference to `current'
>> make[4]: *** [wrapit77] Error 2
>> make[4]: Leaving directory `/usr/local/ncl_ncarg-5.0.0/ni/src/mkwrap'
>> Making install in ./ni/src/db
>> make[4]: Entering directory
>> ....Ncar graphics compiled without any problem.
>>
>> Is it some compiler flags problem?
>> I am currently using test version of pgf90.
>> Similar errors appeared when using gcc.
>>
>> Any help will be great.
>>
>> Thank's
>>
>> Elad shilo
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-install mailing list
>> ncl-install at ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>
> _______________________________________________
> ncl-install mailing list
> ncl-install at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
More information about the ncl-install
mailing list