NCAR / ncl

The NCAR Command Language (NCL) is a scripting language for the analysis and visualization of climate and weather data.
http://www.ncl.ucar.edu
Other
268 stars 65 forks source link

NclTypedouble.h must be created #85

Open edhartnett opened 5 years ago

edhartnett commented 5 years ago

The NCL autotools build is currently failing here:

libtool: compile:  gcc -DPACKAGE_NAME=\"ncl\" -DPACKAGE_TARNAME=\"ncl\" -DPACKAGE_VERSION=\"6.5.0-development\" "-DPACKAGE_STRING=\"ncl 6.5.0-development\"" -DPACKAGE_BUGREPORT=\"ncl-install@ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ncl\" -DVERSION=\"6.5.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBXRENDER=1 -DHAVE_LIBM=1 -DHAVE_LIBNETCDF=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBZ=1 -DHAVE_LIBCAIRO=1 -DHAVE_LIBPNG=1 -DHAVE_LIBFREETYPE=1 -DHAVE_LIBPIXMAN_1=1 -DHAVE_LIBUDUNITS2=1 -DHAVE_LIBEXPAT=1 -DHAVE_LIBDF=1 -DHAVE_LIBMFHDF=1 -DBuildHDF4=1 -DHAVE_LIBGCTP=1 -DHAVE_LIBJASPER=1 -DHAVE_LIBGRIB2C=1 -DBuildGRIB2=1 -DHAVE_LIBGDAL=1 -DBuildGDAL=1 -DHAVE_LIBHDF5=1 -DBuildHDF5=1 -DNCARGURL=\"ngurl\" -DNeedFuncProto=1 -DSYSV=1 -D_POSIX_SOURCE=1 -D_XOPEN_SOURCE=1 -DByteSwapped=1 -DLinux=1 -DIBM=1 -DNGVERSION=\"6.5.0\" -DNCLVERSION=\"6.5.0\" -DDEFAULT_GKS_BUFSIZE=0 -DNGTMPDIR=\"tmp\" -DMAJOR=4 -DBuildPNG=1 -DSPOOL_TRANS=\"ctrans\" -DBINDIR=\"bin\" -DLIBDIR=\"lib\" -DFONTCAPDIR=\"fontcaps\" -DGRAPHCAPDIR=\"graphcaps\" -DNCARGDIR=\"ncarg\" -DUSE_NETCDF4=1 -I. -I../../../../ni/src/ncl -I../../../../ncarg2d/src/libncarg_gks -I../../../../common/src/libncarg_c -I../../../../ncarg2d/src/libncarg -I../../../../ngmath/src/lib -I../../../../ni/src/lib/hlu -I../../../../ni/src/ncl/ncarg/ncl -I/usr/local/hdfeos/include -I/usr/local/hdfeos5/include -I/usr/local/freexl-1.0.5/include -I/usr/local/libgeotiff-1.4.3/include -I/usr/local/json-c-0.13.1/include -I/usr/local/geos-3.7.1/include -I/usr/local/gdal-2.2.4/include -I/usr/local/netcdf-c-4.6.2/include -I/usr/include/freetype2 -I/usr/local/hdf-4.2.13/include -I/usr/local/hdf5-1.10.4/include -g -O2 -MT areavolW.lo -MD -MP -MF .deps/areavolW.Tpo -c areavolW.c  -fPIC -DPIC -o .libs/areavolW.o
In file included from wrapper.h:10:0,
                 from areavolW.c:3:
../../../../ni/src/ncl/NclMdInc.h:1:10: fatal error: NclTypedouble.h: No such file or directory
 #include "NclTypedouble.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:654: recipe for target 'areavolW.lo' failed
make[4]: *** [areavolW.lo] Error 1
make[4]: Leaving directory '/home/ed/tmp/ncl/ni/src/lib/nfp'
Makefile:364: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/ed/tmp/ncl/ni/src/lib'
Makefile:364: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/ed/tmp/ncl/ni/src'
Makefile:364: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ed/tmp/ncl/ni'
Makefile:1499: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I can find this:

ed@mikado:~/tmp/ncl$ find . -name 'NclTypedouble*'
./ni/src/ncl/NclTypedouble.c.specific

I cannot figure out from the yMakefile how I am supposed to generate NclTypedouble.h. How is it supposed to be created?

edhartnett commented 5 years ago

As Rick points out this header file is a generated file, in a directory that comes after the directory ni/src/lib/nfp. So what do we do?

The easy answer is to generate the header file with configure instead of with make. We already do this for a bunch of other header files. Since the configure step happens before any of the make steps, the header file will exist when the make needs it.

But what I don't know is what commands I run to generate the NclTypedouble.h file. How exactly is it generated?

rbrownrigg commented 5 years ago

Those files are generated from sed & shell scripts. The Makefile in the ncl-proper directory that is created from the yMakefile ends up with these targets:

NclTypedouble.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh double

NclTypedouble.c: double_data_c.sh op_funcs.sh NclTypedouble.c.specific $(NUM_OP_TMPL) @$(SHELL) double_data_c.sh

NclTypefloat.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh float

NclTypefloat.c: float_data_c.sh op_funcs.sh NclTypefloat.c.specific $(NUM_OP_TMPL) @$(SHELL) float_data_c.sh

NclTypeint.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh int

NclTypeint.c: int_data_c.sh op_funcs.sh NclTypeint.c.specific $(NUM_OP_TMPL) @$(SHELL) int_data_c.sh

NclTypelong.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh long

NclTypelong.c: long_data_c.sh op_funcs.sh NclTypelong.c.specific $(NUM_OP_TMPL) @$(SHELL) long_data_c.sh

NclTypeshort.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh short

NclTypeshort.c: short_data_c.sh op_funcs.sh NclTypeshort.c.specific $(NUM_OP_TMPL) @$(SHELL) short_data_c.sh

NclTypelogical.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh logical

NclTypelogical.c: logical_data_c.sh op_funcs.sh NclTypelogical.c.specific $(NUM_OP_TMPL) @$(SHELL) logical_data_c.sh

NclTypestring.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh string

NclTypestring.c: string_data_c.sh op_funcs.sh NclTypestring.c.specific $(STR_OP_TMPL) @$(SHELL) string_data_c.sh

NclTypeobj.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh obj

NclTypeobj.c: obj_data_c.sh op_funcs.sh NclTypeobj.c.specific $(NUM_OP_TMPL) @$(SHELL) obj_data_c.sh

NclTypechar.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh char

NclTypechar.c: char_data_c.sh op_funcs.sh NclTypechar.c.specific $(NUM_OP_TMPL) @$(SHELL) char_data_c.sh

NclTypebyte.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh byte

NclTypebyte.c: byte_data_c.sh op_funcs.sh NclTypebyte.c.specific $(NUM_OP_TMPL) @$(SHELL) byte_data_c.sh

NclTypeint64.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh int64

NclTypeint64.c: int64_data_c.sh op_funcs.sh NclTypeint64.c.specific $(NUM_OP_TMPL) @$(SHELL) int64_data_c.sh

NclTypeushort.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh ushort

NclTypeushort.c: ushort_data_c.sh op_funcs.sh NclTypeushort.c.specific $(NUM_OP_TMPL) @$(SHELL) ushort_data_c.sh

NclTypeuint.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh uint

NclTypeuint.c: uint_data_c.sh op_funcs.sh NclTypeuint.c.specific $(NUM_OP_TMPL) @$(SHELL) uint_data_c.sh

NclTypeulong.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh ulong

NclTypeulong.c: ulong_data_c.sh op_funcs.sh NclTypeulong.c.specific $(NUM_OP_TMPL) @$(SHELL) ulong_data_c.sh

NclTypeuint64.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh uint64

NclTypeuint64.c: uint64_data_c.sh op_funcs.sh NclTypeuint64.c.specific $(NUM_OP_TMPL) @$(SHELL) uint64_data_c.sh

NclTypeubyte.h: data_h.sh NclType.h.sed @$(SHELL) data_h.sh ubyte

NclTypeubyte.c: ubyte_data_c.sh op_funcs.sh NclTypeubyte.c.specific $(NUM_OP_TMPL) @$(SHELL) ubyte_data_c.sh

On Thu, Mar 7, 2019 at 10:13 AM Ed Hartnett notifications@github.com wrote:

As Rick points out this header file is a generated file, in a directory that comes after the directory ni/src/lib/nfp. So what do we do?

The easy answer is to generate the header file with configure instead of with make. We already do this for a bunch of other header files. Since the configure step happens before any of the make steps, the header file will exist when the make needs it.

But what I don't know is what commands I run to generate the NclTypedouble.h file. How exactly is it generated?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NCAR/ncl/issues/85#issuecomment-470612841, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnXqf59DzpDvy_CYHkOL8lCcQZj9Ttks5vUUiggaJpZM4bjsMv .

edhartnett commented 5 years ago

OK, good! Let's break down what is going on here. In ni/src/ncl/double_data_c.sh we have this:

#!/bin/sh

sh op_funcs.sh double NhlTDouble NhlTDoubleGenArray 9.9692099683868690e+36 > .tmp.$$ 

if [ ! $? ]
then
    exit $?
fi

sed \
-e 's/DATATYPE/double/g' \
-e 's/LOCALTYPE/double/g' \
-e 's/HLUTYPEREP/NhlTDouble/g' \
-e 's/HLUGENTYPEREP/NhlTDoubleGenArray/g' \
-e 's/DEFAULT_MISS/9.9692099683868690e+36/g' \
-e 's/DEFAULT_FORMAT/%lf/g' \
-e "/REPLACE/r .tmp.$$" \
-e '/REPLACE/d' \
-e '/DSPECIFIC/r NclTypedouble.c.specific' \
-e '/DSPECIFIC/d' \
-e 's/Ncl_Type_double_mod_type/NULL/' \
-e 's/Ncl_Type_double_mod/NULL/' \
NclType.c.sed > NclTypedouble.c

rm .tmp.$$

echo "created NclTypedouble.c"

exit 0

As we can see the first thing the script does is call op_funcs.sh, which does this:

#!/bin/sh

if [ $1 = "ushort" ]; then
    def_type="unsigned short"
elif [ $1 = "uint" ]; then
    def_type="unsigned int"
elif [ $1 = "ulong" ]; then
    def_type="unsigned long"
elif [ $1 = "int64" ]; then
    def_type="long long"
elif [ $1 = "uint64" ]; then
    def_type="unsigned long long"
elif [ $1 = "ubyte" ]; then
    def_type="unsigned char"
else
    def_type=$1
fi

export def_type

sed \
-e "s/DATATYPE/$1/g" \
-e "s/LOCALTYPE/$def_type/g" \
TypeResetMissing.c.sed

#
# Begin "logical" section
#

if [ $1 = "logical" ]
then

sed \
-e "s/HLUGENTYPEREP/$3/g" \
-e "s/HLUTYPEREP/$2/g" \
-e "s/DATATYPE/logical/g" \
-e "s/LOCALTYPE/$def_type/g" \
-e "s/DEFAULT_MISS/$4/g" \
TypeInitClassTemplate.c.sed

sed \
-e "s/OUTDATATYPE/logical/g" \
-e "s/DATATYPE/logical/g" \
-e "s/LOCALTYPE/$def_type/g" \
-e "s/LOCALOUTTYPE/logical/g" \
-e "s/LEFTMISSING/lhs_m->logicalval/g" \
-e "s/RIGHTMISSING/rhs_m->logicalval/g" \
-e "s/THEOP/\&\&/g" \
-e "s/OPER/\.ncl_and\./g" \
-e "s/FUNCNAME/and/g" \
TypeAndOpTemplate.c.sed
...

Wow, so there is a lot going on here. But ultimately, this is generating some files with simple substitution, as far as I can tell. So sed expects to find "LOCALTYPE" and will substitute $def_type, for example.

There are a bunch of sed files:

MathFuncs.c.sed      MatMulDValOp.c.sed      NclType.h.sed            TypeFunctionOpTemplate.c.sed  TypeOrOpTemplate.c.sed             TypestringSelectOpTemplate.c.sed  TypeSupportMonoOpTemplate.c.sed
MathFuncs.h.sed      MultiDValOp.c.sed       NclTypestring.c.sed      TypeInitClassTemplate.c.sed   TypeResetMissing.c.sed             TypeSupport.c.sed                 TypeSupportMonoOpTemplate.h.sed
MathTemplate2.c.sed  NclMultiDValData.c.sed  nio_path.c.sed           TypeIsMonoFunc.c.sed          TypeSelectOpTemplate.c.sed         TypeSupport.h.sed                 TypeSupportOpTemplate.c.sed
MathTemplate.c.sed   NclMultiDValData.h.sed  TypeAndOpTemplate.c.sed  TypeMatMulOpTemplate.c.sed    TypeSimpleOpTemplate.c.sed         TypeSupportMatTemplate.c.sed      TypeSupportOpTemplate.h.sed
MathTemplate.h.sed   NclType.c.sed           TypeDivOpTemplate.c.sed  TypeMonoOpTemplate.c.sed      TypestringCompareOpTemplate.c.sed  TypeSupportMatTemplate.h.sed      TypeXorOpTemplate.c.sed

What we are going to do is very simple, but will take a few keystrokes. For each file we will: 1 - Copy the file to a .in instead of a .sed and add it to git. 2 - Add a line in configure.ac which will cause MathFuncs.c.in to be turned into MathFuncs.c. 3 - Edit the .in file, and put "@" around all substitutions. So LOCALTYPE becomes @LOCALTYPE@. 4 - Add a line in configure.ac to define LOCALTYPE to whatever string we want.

When we have done this with all sed files, then all .h files will be constructed at configure time, and will be present before make starts.

I will start by doing one and you can see what I mean.

edhartnett commented 5 years ago

OK, I already have a question. When I look at MathFuncs.c I see:

/*
 *      $Id: MathFuncs.c.sed,v 1.3 1997-04-14 23:57:14 ethan Exp $
 */
/************************************************************************
*                                   *
*                Copyright (C)  1995            *
*        University Corporation for Atmospheric Research        *
*                All Rights Reserved            *
*                                   *
************************************************************************/
/*
 *  File:       
 *
 *  Author:     Ethan Alpert
 *          National Center for Atmospheric Research
 *          PO 3000, Boulder, Colorado
 *
 *  Date:       Tue Jan 31 15:16:30 MST 1995
 *
 *  Description:    
 */

#include <math.h>
#include <ncarg/hlu/hlu.h>
#include <ncarg/hlu/NresDB.h>
#include "defs.h"
#include "NclDataDefs.h"
#include "NclBuiltInSupport.h"
#include "NclMdInc.h"
#include "TypeSupport.h"

REPLACE

OK, that's not much to go on. ;-)

Can you post here the generated version of this file for you from the legacy build system?

rbrownrigg commented 5 years ago

Ok, wow -- I missed this inquiry through the chaos of the day. Apologies -- I'm trying to keep a tight feedback loop going.

The generated version is attached -- its about 6800+ lines long. I will look into this first thing in the morning to try and determine how the file is actually generated.

On Thu, Mar 7, 2019 at 11:11 AM Ed Hartnett notifications@github.com wrote:

OK, I already have a question. When I look at MathFuncs.c I see:

/*

  • $Id: MathFuncs.c.sed,v 1.3 1997-04-14 23:57:14 ethan Exp $ */ /****
    • *
    • Copyright (C) 1995 *
    • University Corporation for Atmospheric Research *
    • All Rights Reserved *
    • * ****/ /*
  • File:
  • Author: Ethan Alpert
  • National Center for Atmospheric Research
  • PO 3000, Boulder, Colorado
  • Date: Tue Jan 31 15:16:30 MST 1995
  • Description:
    */

include

include <ncarg/hlu/hlu.h>

include <ncarg/hlu/NresDB.h>

include "defs.h"

include "NclDataDefs.h"

include "NclBuiltInSupport.h"

include "NclMdInc.h"

include "TypeSupport.h"

REPLACE

OK, that's not much to go on. ;-)

Can you post here the generated version of this file for you from the legacy build system?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NCAR/ncl/issues/85#issuecomment-470634618, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnXtE7-F_-O2jzEz9i_EJ1WO1oXtq5ks5vUVZjgaJpZM4bjsMv .

edhartnett commented 5 years ago

The funny thing is, this is all C code! Why did you guys feel you had to build a bunch of C code. Usually that sort of thinking is reserved for Fortran. ;-)

Instead of trying to figure out what is going on, let's take a shortcut. Build the system with the legacy build system (which I could never get to work for me), and then tar up that directory, with all the generated files, and send me the tarball.

We will start with the generated files, and see if we really need to do any substitutions at all.

edhartnett commented 5 years ago

OK, we have made a lot of progress, but I am still getting this failure:

/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"ncl\" -DPACKAGE_TARNAME=\"ncl\" -DPACKAGE_VERSION=\"6.5.0-development\" -DPACKAGE_STRING=\"ncl\ 6.5.0-development\" -DPACKAGE_BUGREPORT=\"ncl-install@ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ncl\" -DVERSION=\"6.5.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBXRENDER=1 -DHAVE_LIBM=1 -DHAVE_LIBNETCDF=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBZ=1 -DHAVE_LIBCAIRO=1 -DHAVE_LIBPNG=1 -DHAVE_LIBFREETYPE=1 -DHAVE_LIBPIXMAN_1=1 -DHAVE_LIBUDUNITS2=1 -DHAVE_LIBEXPAT=1 -DHAVE_LIBDF=1 -DHAVE_LIBMFHDF=1 -DBuildHDF4=1 -DHAVE_LIBGCTP=1 -DHAVE_LIBJASPER=1 -DHAVE_LIBGRIB2C=1 -DBuildGRIB2=1 -DHAVE_LIBGDAL=1 -DBuildGDAL=1 -DHAVE_LIBHDF5=1 -DBuildHDF5=1 -DNCARGURL=\"ngurl\" -DNeedFuncProto=1 -DSYSV=1 -D_POSIX_SOURCE=1 -D_XOPEN_SOURCE=1 -DByteSwapped=1 -DLinux=1 -DIBM=1 -DNGVERSION=\"6.5.0\" -DNCLVERSION=\"6.5.0\" -DDEFAULT_GKS_BUFSIZE=0 -DNGTMPDIR=\"tmp\" -DMAJOR=4 -DBuildPNG=1 -DSPOOL_TRANS=\"ctrans\" -DBINDIR=\"bin\" -DLIBDIR=\"lib\" -DFONTCAPDIR=\"fontcaps\" -DGRAPHCAPDIR=\"graphcaps\" -DNCARGDIR=\"ncarg\" -DUSE_NETCDF4=1 -I.  -I../../../../ni/src/ncl -I../../../../ncarg2d/src/libncarg_gks -I../../../../common/src/libncarg_c -I../../../../ncarg2d/src/libncarg -I../../../../ngmath/src/lib -I../../../../ni/src/lib/hlu -I../../../../ni/src/ncl/ncarg/ncl -I/usr/local/hdfeos/include -I/usr/local/hdfeos5/include -I/usr/local/freexl-1.0.5/include -I/usr/local/libgeotiff-1.4.3/include -I/usr/local/json-c-0.13.1/include -I/usr/local/geos-3.7.1/include -I/usr/local/gdal-2.2.4/include -I/usr/local/netcdf-c-4.6.2/include -I/usr/include/freetype2 -I/usr/local/hdf-4.2.13/include -I/usr/local/hdf5-1.10.4/include  -g -O2 -MT areavolW.lo -MD -MP -MF $depbase.Tpo -c -o areavolW.lo areavolW.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DPACKAGE_NAME=\"ncl\" -DPACKAGE_TARNAME=\"ncl\" -DPACKAGE_VERSION=\"6.5.0-development\" "-DPACKAGE_STRING=\"ncl 6.5.0-development\"" -DPACKAGE_BUGREPORT=\"ncl-install@ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ncl\" -DVERSION=\"6.5.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBXRENDER=1 -DHAVE_LIBM=1 -DHAVE_LIBNETCDF=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBZ=1 -DHAVE_LIBCAIRO=1 -DHAVE_LIBPNG=1 -DHAVE_LIBFREETYPE=1 -DHAVE_LIBPIXMAN_1=1 -DHAVE_LIBUDUNITS2=1 -DHAVE_LIBEXPAT=1 -DHAVE_LIBDF=1 -DHAVE_LIBMFHDF=1 -DBuildHDF4=1 -DHAVE_LIBGCTP=1 -DHAVE_LIBJASPER=1 -DHAVE_LIBGRIB2C=1 -DBuildGRIB2=1 -DHAVE_LIBGDAL=1 -DBuildGDAL=1 -DHAVE_LIBHDF5=1 -DBuildHDF5=1 -DNCARGURL=\"ngurl\" -DNeedFuncProto=1 -DSYSV=1 -D_POSIX_SOURCE=1 -D_XOPEN_SOURCE=1 -DByteSwapped=1 -DLinux=1 -DIBM=1 -DNGVERSION=\"6.5.0\" -DNCLVERSION=\"6.5.0\" -DDEFAULT_GKS_BUFSIZE=0 -DNGTMPDIR=\"tmp\" -DMAJOR=4 -DBuildPNG=1 -DSPOOL_TRANS=\"ctrans\" -DBINDIR=\"bin\" -DLIBDIR=\"lib\" -DFONTCAPDIR=\"fontcaps\" -DGRAPHCAPDIR=\"graphcaps\" -DNCARGDIR=\"ncarg\" -DUSE_NETCDF4=1 -I. -I../../../../ni/src/ncl -I../../../../ncarg2d/src/libncarg_gks -I../../../../common/src/libncarg_c -I../../../../ncarg2d/src/libncarg -I../../../../ngmath/src/lib -I../../../../ni/src/lib/hlu -I../../../../ni/src/ncl/ncarg/ncl -I/usr/local/hdfeos/include -I/usr/local/hdfeos5/include -I/usr/local/freexl-1.0.5/include -I/usr/local/libgeotiff-1.4.3/include -I/usr/local/json-c-0.13.1/include -I/usr/local/geos-3.7.1/include -I/usr/local/gdal-2.2.4/include -I/usr/local/netcdf-c-4.6.2/include -I/usr/include/freetype2 -I/usr/local/hdf-4.2.13/include -I/usr/local/hdf5-1.10.4/include -g -O2 -MT areavolW.lo -MD -MP -MF .deps/areavolW.Tpo -c areavolW.c  -fPIC -DPIC -o .libs/areavolW.o
In file included from ./TypeSupport.h:32:0,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,
                 from ./TypeSupport.h:32,

There are two TypeSupport.h files. So is the wrong one being found first? Or what?

rbrownrigg commented 5 years ago

(Apologies -- just now able to look at this -- busy conference)

I am not seeing two TypeSupport.h files, and that directory -- ..../ni/src/lib/nfp -- is building fine for me (?) Do you by chance have a stale, unmanaged file sitting around? What does a "find ..../ni/src -name TypeSupport.h -print" report? There should be only two -- one under ..../ni/src/ncl, which I committed, and one that gets copied by the configure step to ..../ni/src/ncl/ncarg/ncl, which I believe is where codes under nfp should be looking?

On Tue, Mar 19, 2019 at 7:41 AM Ed Hartnett notifications@github.com wrote:

OK, we have made a lot of progress, but I am still getting this failure:

/bin/bash ../../../../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"ncl\" -DPACKAGE_TARNAME=\"ncl\" -DPACKAGE_VERSION=\"6.5.0-development\" -DPACKAGE_STRING=\"ncl\ 6.5.0-development\" -DPACKAGE_BUGREPORT=\"ncl-install@ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ncl\" -DVERSION=\"6.5.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBXRENDER=1 -DHAVE_LIBM=1 -DHAVE_LIBNETCDF=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBZ=1 -DHAVE_LIBCAIRO=1 -DHAVE_LIBPNG=1 -DHAVE_LIBFREETYPE=1 -DHAVE_LIBPIXMAN_1=1 -DHAVE_LIBUDUNITS2=1 -DHAVE_LIBEXPAT=1 -DHAVE_LIBDF=1 -DHAVE_LIBMFHDF=1 -DBuildHDF4=1 -DHAVE_LIBGCTP=1 -DHAVE_LIBJASPER=1 -DHAVE_LIBGRIB2C=1 -DBuildGRIB2=1 -DHAVE_LIBGDAL=1 -DBuildGDAL=1 -DHAVE_LIBHDF5=1 -DBuildHDF5=1 -DNCARGURL=\"ngurl\" -DNeedFuncProto=1 -DSYSV=1 -D_POSIX_SOURCE=1 -D_XOPEN_SOURCE=1 -DByteSwapped=1 -DLinux=1 -DIBM=1 -DNGVERSION=\"6.5.0\" -DNCLVERSION=\"6.5.0\" -DDEFAULT_GKS_BUFSIZE=0 -DNGTMPDIR=\"tmp\" -DMAJOR=4 -DBuildPNG=1 -DSPOOL_TRANS=\"ctrans\" -DBINDIR=\"bin\" -DLIBDIR=\"lib\" -DFONTCAPDIR=\"fontcaps\" -DGRAPHCAPDIR=\"graphcaps\" -DNCARGDIR=\"ncarg\" -DUSE_NETCDF4=1 -I. -I../../../../ni/src/ncl -I../../../../ncarg2d/src/libncarg_gks -I../../../../common/src/libncarg_c -I../../../../ncarg2d/src/libncarg -I../../../../ngmath/src/lib -I../../../../ni/src/lib/hlu -I../../../../ni/src/ncl/ncarg/ncl -I/usr/local/hdfeos/include -I/usr/local/hdfeos5/include -I/usr/local/freexl-1.0.5/include -I/usr/local/libgeotiff-1.4.3/include -I/usr/local/json-c-0.13.1/include -I/usr/local/geos-3.7.1/include -I/usr/local/gdal-2.2.4/include -I/usr/local/netcdf-c-4.6.2/include -I/usr/include/freetype2 -I/usr/local/hdf-4.2.13/include -I/usr/local/hdf5-1.10.4/include -g -O2 -MT areavolW.lo -MD -MP -MF $depbase.Tpo -c -o areavolW.lo areavolW.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DPACKAGE_NAME=\"ncl\" -DPACKAGE_TARNAME=\"ncl\" -DPACKAGE_VERSION=\"6.5.0-development\" "-DPACKAGE_STRING=\"ncl 6.5.0-development\"" -DPACKAGE_BUGREPORT=\"ncl-install@ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ncl\" -DVERSION=\"6.5.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBXRENDER=1 -DHAVE_LIBM=1 -DHAVE_LIBNETCDF=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBZ=1 -DHAVE_LIBCAIRO=1 -DHAVE_LIBPNG=1 -DHAVE_LIBFREETYPE=1 -DHAVE_LIBPIXMAN_1=1 -DHAVE_LIBUDUNITS2=1 -DHAVE_LIBEXPAT=1 -DHAVE_LIBDF=1 -DHAVE_LIBMFHDF=1 -DBuildHDF4=1 -DHAVE_LIBGCTP=1 -DHAVE_LIBJASPER=1 -DHAVE_LIBGRIB2C=1 -DBuildGRIB2=1 -DHAVE_LIBGDAL=1 -DBuildGDAL=1 -DHAVE_LIBHDF5=1 -DBuildHDF5=1 -DNCARGURL=\"ngurl\" -DNeedFuncProto=1 -DSYSV=1 -D_POSIX_SOURCE=1 -D_XOPEN_SOURCE=1 -DByteSwapped=1 -DLinux=1 -DIBM=1 -DNGVERSION=\"6.5.0\" -DNCLVERSION=\"6.5.0\" -DDEFAULT_GKS_BUFSIZE=0 -DNGTMPDIR=\"tmp\" -DMAJOR=4 -DBuildPNG=1 -DSPOOL_TRANS=\"ctrans\" -DBINDIR=\"bin\" -DLIBDIR=\"lib\" -DFONTCAPDIR=\"fontcaps\" -DGRAPHCAPDIR=\"graphcaps\" -DNCARGDIR=\"ncarg\" -DUSE_NETCDF4=1 -I. -I../../../../ni/src/ncl -I../../../../ncarg2d/src/libncarg_gks -I../../../../common/src/libncarg_c -I../../../../ncarg2d/src/libncarg -I../../../../ngmath/src/lib -I../../../../ni/src/lib/hlu -I../../../../ni/src/ncl/ncarg/ncl -I/usr/local/hdfeos/include -I/usr/local/hdfeos5/include -I/usr/local/freexl-1.0.5/include -I/usr/local/libgeotiff-1.4.3/include -I/usr/local/json-c-0.13.1/include -I/usr/local/geos-3.7.1/include -I/usr/local/gdal-2.2.4/include -I/usr/local/netcdf-c-4.6.2/include -I/usr/include/freetype2 -I/usr/local/hdf-4.2.13/include -I/usr/local/hdf5-1.10.4/include -g -O2 -MT areavolW.lo -MD -MP -MF .deps/areavolW.Tpo -c areavolW.c -fPIC -DPIC -o .libs/areavolW.o In file included from ./TypeSupport.h:32:0, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32, from ./TypeSupport.h:32,

There are two TypeSupport.h files. So is the wrong one being found first? Or what?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NCAR/ncl/issues/85#issuecomment-474400884, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnXkRDvVcpZQ5YM6ocjdZz2_LAhL7Jks5vYPcBgaJpZM4bjsMv .