Re: [ncarg-talk] NCL build errors

From: Rick Grubin <grubin_at_nyahnyahspammersnyahnyah>
Date: Sun, 9 Mar 2008 19:06:34 -0600

Hi Prabhakar,

First, as you're building NCL, your questions are best addressed to
the 'ncl-talk' mail list. More info may be found at:
     http://mailman.ucar.edu/mailman/listinfo/ncl-talk

> I have a problem in building NCL. The error is as shown:
>
>
> make[5]: Entering directory `/tmp/prabhakar/ncl_ncarg-5.0.0/
> ncarview/src/bin/ictrans'
> gcc -ansi -fPIC -O -I../../../.././include -I/research/projects/
> ITI-Emad/netcdf/netcdf-3.6.2/LINUX.X86_64.gnu-4.1.2.release/include
> -I/research/projects/ITI-Emad/hdf/LINUX.X86_64.gnu-4.1.2.release/
> include/hdf -I/usr/include -I/usr/include/X11 -DSYSV -
> D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped -DNeedFuncProto -c -
> o main.o main.c
> main.c: In function ‘main’:
> main.c:42: warning: incompatible implicit declaration of built-in
> function ‘exit’
> main.c:45: warning: incompatible implicit declaration of built-in
> function ‘exit’
> gcc -ansi -fPIC -O -o ictrans main.o ../../../.././ncarview/src/
> lib/libictrans/libictrans.o ../../../.././ncarview/src/lib/
> libctrans/libctrans.o -L../../../.././ncarview/src/lib/libcgm -lcgm
> -L../../../.././ncarview/src/lib/libncarg_ras -
> lncarg_ras -L../../../.././common/src/libncarg_c
> -lncarg_c -L/research/projects/ITI-Emad/ncargraphics/
> LINUX.X86_64.gnu-4.1.2.release/lib -L/research/projects/ITI-Emad/
> netcdf/netcdf-3.6.2/LINUX.X86_64.gnu-4.1.2.release/lib -L/research/
> projects/ITI-Emad/hdf/LINUX.X86_64.gnu-4.1.2.release/lib -L/usr/
> lib64 -L/lib64 -L/usr/lib -L/usr/lib64/X11 -L/research/projects/ITI-
> Emad/lib -lX11 -lXext -lmfhdf -ldf -ljpeg -lz -lg2c -lgcc -lm
> ../../../.././ncarview/src/lib/libcgm/libcgm.a(meta_edit.o): In
> function `CGM_initMetaEdit':
> meta_edit.c:(.text+0x127a): warning: the use of `mktemp' is
> dangerous, better use `mkstemp'
> ../../../.././ncarview/src/lib/libictrans/libictrans.o: In function
> `giargs_':
> (.text+0x68b4): undefined reference to `_gfortran_copy_string'
> collect2: ld returned 1 exit status
> make[5]: *** [ictrans] Error 1

This error indicates that you've built portions of NCAR Graphics and
NCL with the gfortran compiler, but have not instructed the
build process to use gfortran's library when linking. In the $NCARG/
config/LINUX configuration file (it appears you are building on
a Linux host), you'll need to specify '-lgfortran' as part of the
defined macro 'CtoFLibraries', as in (for example):

#define CtoFLibraries -lgcc -lg2c -lgfortran -lm

> make[4]: Entering directory `/tmp/prabhakar/ncl_ncarg-5.0.0/ni/src/
> ncl'
> gcc -ansi -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O -
> I../../.././include -I/research/projects/ITI-Emad/netcdf/
> netcdf-3.6.2/LINUX.X86_64.gnu-4.1.2.release/include -I/research/
> projects/ITI-Emad/hdf/LINUX.X86_64.gnu-4.1.2.release/include/hdf -I/
> usr/include -I/usr/include/X11 -DLinux -DMAJOR=2 -DSYSV -
> D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped -DNeedFuncProto -c -
> o scanner.o scanner.c
> lex.yy.c: In function ‘yy_get_next_buffer’:
> lex.yy.c:2099: error: ‘yy_current_buffer’ undeclared (first use in
> this function)
> lex.yy.c:2099: error: (Each undeclared identifier is reported only
> once
> lex.yy.c:2099: error: for each function it appears in.)
> make[4]: *** [scanner.o] Error 1

This problem generally results from the source file 'wrapit.c'
being somehow clobbered, usually due to a timing race condition
during the build process on faster hosts. Please see the second
bullet point at this web link:

     http://www.ncl.ucar.edu/Download/
build_from_src.shtml#Troubleshooting

and, even though the error message shown there is not what you see,
follow the directions to download a new version of 'wrapit.c'
and rebuild.

Please let me/us know if this does not address your problems.

----
Rick Grubin NCAR/TDD/CISL/VETS
Visualization + Enabling Technologies
grubin_at_ucar.edu 303.497.1832

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Mar 09 2008 - 19:06:34 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 13 2008 - 17:22:55 MDT