Grads on Slackware 11 - segmentation faults due to a severe case of versionitis

Jean Pierre Arabonis arabonis at EGS.UCT.AC.ZA
Wed Nov 1 09:40:11 EST 2006


Good Day Patrice

    I am now trying to give your version with the --enable-dyn-supplibs
option an attempt as I am not having any success with the rebuilding of
the libraries, there seem to be major incompatibilities between the
newer gcc and the older versions of opendap.
    I have installed the following from opendap, libdap-3.7.2 and
libnc-dap-3.6.2 but when I run
    ./configure --enable-dyn-supplibs --with-dods

    I seem to be missing udunits.h , I'm not quite sure which package
this comes from.
    Could you give me a bit more info of what exactly you have installed
to get this working, below is the result of my ./configure, I'd
appreciat eif you have a moment to have a glance at it and draw my
attention to what needs fixing.

    Many Thanks
       Jean Pierre


./configure --enable-dyn-supplibs --with-dods
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no

Checking for programs
------------------
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether ln -s works... yes

Setting host specific options
-------------------------
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for supplibs directory... ./supplibs

Checking system libraries, headers, and compiler features
-----------------------------------------
checking for cos in -lm... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes

checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking for unistd.h... (cached) yes

checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for strtod... yes
checking for off_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... 1
checking for fseeko... yes

Checking for optional feature support
------------------------------------
checking whether to use dynamic linking... yes (Warning: binaries may not be suitable for distribution)

Check GrADS command line editing support...
checking for a readline compatible library... -lreadline -ltermcap
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking whether readline supports history... yes
checking history.h usability... no
checking history.h presence... no
checking for history.h... no
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
+ Command line editing enabled

Check GrADS GUI support...
checking for main in -lXt... yes
checking for main in -lXaw... yes
checking for main in -lXmu... yes
checking libsx.h usability... no
checking libsx.h presence... no
checking for libsx.h... no
- GUI disabled

Check GrADS printim support...
checking for gdlib-config... /usr/bin/gdlib-config
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking for gdImageCreate in -lgd... yes
checking for gdCompareInt... no
+ printim enabled

checking if wi command has been enabled... no
- wi disabled

+ LATS enabled

Checking which GrADS binaries can be built
------------------------------------
checking udunits.h usability... no
checking udunits.h presence... no
checking for udunits.h... no
- gradsnc (plain netCDF) build disabled

checking for udunits.h... (cached) no
- gradshdf (HDF-SDS/netCDF) build disabled

checking for udunits.h... (cached) no
- gradsdods (OPeNDAP/netCDF) build disabled

  +=========================================================================+
   GrADS 1.9b4 : Built Wed Nov 1 16:29:41 SAST 2006 for i686-pc-linux-gnu
  +=========================================================================+

  +----------------------------------+
  |                                  |
  | Configuration Summary            |
  |                                  |
  |  + readline enabled              |
  |  + printim enabled               |
  |  - GUI disabled                  |
  |  + LATS enabled                  |
  |  - wi disabled (default)         |
  |                                  |
  | Build Summary                    |
  |                                  |
  |  + gradsc    (classic) enabled   |
  |  - gradsnc   (netCDF)  disabled  |
  |  - gradshdf  (HDF-SDS) disabled  |
  |  - gradsdods (OPeNDAP) disabled  |
  |                                  |
  |  + Dynamic linking enabled       |
  |                                  |
  +----------------------------------+
configure: creating src/VERSION
configure: creating src/buildinfo.h
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h

Run 'make && make install' to build GrADS.
Executables will be installed to bin/ in current dir, unless prefix was specified.









Patrice Dumas wrote:
> On Sat, Oct 28, 2006 at 08:25:34AM +0200, Jean Pierre Arabonis wrote:
>
>> Thanks Pat, with your and Jennifers' input I am starting to actually
>> understand what is happening.
>>    The patch would be much appreciated.
>>
>
> Here it is.
>
> --
> Pat
>
> ------------------------------------------------------------------------
>
> diff -Naur grads-1.9b4/src/gacfg.c grads-1.9b4_new/src/gacfg.c
> --- grads-1.9b4/src/gacfg.c   2005-05-18 14:29:17.000000000 +0000
> +++ grads-1.9b4_new/src/gacfg.c 2005-11-03 13:18:45.000000000 +0000
> @@ -32,6 +32,7 @@
>   */
>
>  #include <stdio.h>
> +#include <string.h>
>  #include "grads.h"
>  #include "buildinfo.h"
>
> diff -Naur grads-1.9b4/src/gaexpr.c grads-1.9b4_new/src/gaexpr.c
> --- grads-1.9b4/src/gaexpr.c  2005-05-18 14:48:36.000000000 +0000
> +++ grads-1.9b4_new/src/gaexpr.c        2005-11-03 11:22:27.000000000 +0000
> @@ -13,6 +13,7 @@
>  #endif
>
>  #include <stdio.h>
> +#include <string.h>
>  #include <math.h>
>  #include "grads.h"
>
> diff -Naur grads-1.9b4/src/gaio.c grads-1.9b4_new/src/gaio.c
> --- grads-1.9b4/src/gaio.c    2005-05-23 17:59:01.000000000 +0000
> +++ grads-1.9b4_new/src/gaio.c  2005-11-03 11:37:35.000000000 +0000
> @@ -22,6 +22,7 @@
>  #include "grads.h"
>  #include <math.h>
>  #include <stdio.h>
> +#include <string.h>
>  #if USESDF == 1
>  #include <netcdf.h>
>  #if USEHDF == 1
> diff -Naur grads-1.9b4/src/gasdf.c grads-1.9b4_new/src/gasdf.c
> --- grads-1.9b4/src/gasdf.c   2005-05-18 14:29:17.000000000 +0000
> +++ grads-1.9b4_new/src/gasdf.c 2005-11-04 10:02:05.000000000 +0000
> @@ -5785,7 +5785,11 @@
>    /* Turn off automatic error handling. */
>    ncopts = 0;
>
> +#if USEHDF == 1
>    if (ncattname (cdfid, varid, attnum, name) == -1) {
> +#else
> +  if (nc_inq_attname(cdfid, varid, attnum, name) == -1) {
> +#endif
>      ncopts = oldncopts ;
>      return Failure;
>    }
> @@ -5813,10 +5817,23 @@
>    /* Turn off automatic error handling. */
>    ncopts = 0;
>
> +#if USEHDF == 1
>    if (ncattinq (cdfid, varid, aname, atype, alen) == -1) {
>      ncopts = oldncopts ;
>      return Failure;
>    }
> +#else
> +  if (nc_inq_atttype(cdfid, varid, aname, atype) != NC_NOERR) {
> +    ncopts = oldncopts ;
> +    return Failure;
> +  }
> +  size_t templen;
> +  if (nc_inq_attlen(cdfid, varid, aname, &templen) != NC_NOERR) {
> +    ncopts = oldncopts ;
> +    return Failure;
> +  }
> +  *alen = (int) templen;
> +#endif
>
>    /* Allocate space for values. */
>    if ((*atype == NC_BYTE) || (*atype == NC_CHAR))  {
> @@ -5831,6 +5848,7 @@
>      *adata = (double *) malloc (sizeof (double) * *alen);
>    }  else {
>      ncopts = oldncopts ;
> +    printf("UNKNOWN TYPE HERE !\n");
>      return Failure;
>    }
>
> @@ -5840,10 +5858,65 @@
>    }
>
>    /* Retrieve values. */
> +#if USEHDF == 1
>    if (ncattget (cdfid, varid, aname, (void *) (*adata)) == -1) {
>      ncopts = oldncopts ;
>      return Failure;
>    }
> +#else
> +  switch (*atype)
> +  {
> +     case NC_BYTE:
> +       if (nc_get_att_uchar(cdfid, varid, aname, (unsigned char *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     case NC_CHAR:
> +       if (nc_get_att_text(cdfid, varid, aname, (char *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     case NC_SHORT:
> +       if (nc_get_att_short(cdfid, varid, aname, (short *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     case NC_LONG:
> +       if (nc_get_att_int(cdfid, varid, aname, (int *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     case NC_FLOAT:
> +       if (nc_get_att_float(cdfid, varid, aname, (float *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     case NC_DOUBLE:
> +       if (nc_get_att_double(cdfid, varid, aname, (double *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +     default:
> +       if (nc_get_att_text(cdfid, varid, aname, (char *) *adata) != NC_NOERR)
> +       {
> +         ncopts = oldncopts ;
> +         return Failure;
> +       }
> +       break;
> +  }
> +#endif
>
>    /* If character, set last byte to null. */
>    if (*atype == NC_CHAR)  {
> diff -Naur grads-1.9b4/src/gxdxwd.c grads-1.9b4_new/src/gxdxwd.c
> --- grads-1.9b4/src/gxdxwd.c  2002-10-28 19:08:33.000000000 +0000
> +++ grads-1.9b4_new/src/gxdxwd.c        2005-11-03 13:37:45.000000000 +0000
> @@ -7,6 +7,7 @@
>  #endif
>
>  #include <stdio.h>
> +#include <stdlib.h>
>  #include <errno.h>
>
>  #include <X11/Xos.h>
> @@ -92,6 +91,7 @@
>      int bw;
>      Window dummywin;
>      XWDFileHeader header;
> +    char mytmp[64];
>
>
>      /*
> @@ -232,7 +232,8 @@
>       * Write out the color maps, if any
>       */
>
> -    if (debug) outl("xwd: Dumping %d colors.\n", ncolors);
> +    sprintf(mytmp, "xwd: Dumping %d colors.\n", ncolors);
> +    if (debug) outl(mytmp);
>  /*
>      {
>      int icineca=0;
> diff -Naur grads-1.9b4/src/gxeps.c grads-1.9b4_new/src/gxeps.c
> --- grads-1.9b4/src/gxeps.c   2004-02-27 14:42:11.000000000 +0000
> +++ grads-1.9b4_new/src/gxeps.c 2005-11-03 14:45:16.000000000 +0000
> @@ -6,6 +6,8 @@
>  #include <config.h>
>  #endif
>
> +#include <stdlib.h>
> +
>  /***********************************************************
>   * GXEPS a grads metafile to PostScript converter
>   * Copyright (c) 1999 - 2001 Matthias Munnich
> diff -Naur grads-1.9b4/src/gxhpng.c grads-1.9b4_new/src/gxhpng.c
> --- grads-1.9b4/src/gxhpng.c  2004-03-12 16:14:04.000000000 +0000
> +++ grads-1.9b4_new/src/gxhpng.c        2005-11-03 11:56:53.000000000 +0000
> @@ -6,7 +6,6 @@
>  #include <config.h>
>  #endif
>
> -
>  /* Rasterize current metafile buffer via gd library.  Loosly based
>     on the gxpng utility:
>
> @@ -455,7 +452,7 @@
>                                 im->polyInts[ints++] = (y-y1) * (x2-x1) / (y2-y1) + x1;
>                         }
>                 }
> -               qsort(im->polyInts, ints, sizeof(int), gdCompareInt);
> +               qsort(im->polyInts, ints, sizeof(int), (void *) gdCompareInt);
>
>                 for (i=0; (i < (ints)); i+=2) {
>                         gdImageLne(im, im->polyInts[i], y,
> diff -Naur grads-1.9b4/src/gxX.c grads-1.9b4_new/src/gxX.c
> --- grads-1.9b4/src/gxX.c     2005-05-18 14:29:17.000000000 +0000
> +++ grads-1.9b4_new/src/gxX.c   2005-11-03 11:28:15.000000000 +0000
> @@ -270,7 +270,7 @@
>
>    /* Set up icon pixmap */
>
> -  icon_pixmap = XCreateBitmapFromData(display, win, icon_bitmap_bits,
> +  icon_pixmap = XCreateBitmapFromData(display, win, (char *) icon_bitmap_bits,
>                  icon_bitmap_width, icon_bitmap_height);
>
>    /* Set standard properties */
> @@ -402,7 +402,7 @@
>    if (xfnam) flist = XListFonts (display, xfnam, 1, &i);
>    else flist = NULL;
>    if (flist==NULL) {
> -    flist = XListFonts (display, "-adobe-helvetica-bold-r-normal--??-100*", 1, &i);
> +    flist = XListFonts (display, "-adobe-helvetica-bold-r-normal-*-100*", 1, &i);
>    }
>    if (flist==NULL) {
>      flist = XListFonts (display, "-adobe-helvetica-bold-r-normal-*-120*", 1, &i);
> @@ -418,7 +418,7 @@
>    if (xfnam) flist = XListFonts (display, xfnam, 1, &i);
>    else flist = NULL;
>    if (flist==NULL) {
> -    flist = XListFonts (display, "-adobe-helvetica-bold-o-normal--??-100*", 1, &i);
> +    flist = XListFonts (display, "-adobe-helvetica-bold-o-normal-*-100*", 1, &i);
>    }
>    if (flist==NULL) {
>      flist = XListFonts (display, "-adobe-helvetica-bold-o-normal-*-120*", 1, &i);
> @@ -3267,7 +3267,7 @@
>    }
>
>    if (typ>1) {
> -    stipple_pixmap = XCreateBitmapFromData(display, win, bitmap_bits,
> +    stipple_pixmap = XCreateBitmapFromData(display, win, (char *) bitmap_bits,
>                      bitmap_width, bitmap_height);
>      XSetStipple(display, gc, stipple_pixmap);
>      XSetFillStyle(display, gc, FillStippled);
>


--
Jean Pierre Arabonis
arabonis at egs.uct.ac.za
Tel 021 780 1021 cell 084 401 1365
This email is 100% Microsoft Free

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20061101/4e55b495/attachment.html 


More information about the gradsusr mailing list