pkgsrc-Bugs archive

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

pkg/39903: bmake-20081111 fails to compile on IRIX



>Number:         39903
>Category:       pkg
>Synopsis:       bmake-20081111 fails to compile on IRIX
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 12 13:55:00 +0000 2008
>Originator:     Stuart Shelton
>Release:        pkgsrc latest from CVS
>Organization:
>Environment:
IRIX 6.5.30f; MIPSpro Compilers, Version 7.4.4m
>Description:
cc -O2 -n32 -I. -I/usr/bsd/var/tmp/devel/bmake/work/bmake -DHAVE_CONFIG_H 
-I/usr/bsd/include -D__inline__=inline -DHAVE_NBCOMPAT_H=1 
-I/usr/bsd/var/tmp/devel/bmake/work/libnbcompat 
-I/usr/bsd/var/tmp/devel/bmake/work/bmake/missing -DNEED_HOST_CDEFS_H   
-D_PATH_DEFSYSPATH=\"/usr/bsd/share/mk\" -I/usr/bsd/include -D__inline__=inline 
-DHAVE_NBCOMPAT_H=1 -I/usr/bsd/var/tmp/devel/bmake/work/libnbcompat -c 
/usr/bsd/var/tmp/devel/bmake/work/bmake/parse.c
cc-1029 cc: ERROR File = /usr/bsd/var/tmp/devel/bmake/work/bmake/parse.c, Line 
= 480
  An expression is expected at this point.

                        .fname = NULL,
                        ^

cc-1029 cc: ERROR File = /usr/bsd/var/tmp/devel/bmake/work/bmake/parse.c, Line 
= 481
  An expression is expected at this point.

                        .lineno = 0,
                        ^

cc-1029 cc: ERROR File = /usr/bsd/var/tmp/devel/bmake/work/bmake/parse.c, Line 
= 482
  An expression is expected at this point.

                        .fd = -1,
                        ^

3 errors detected in the compilation of 
"/usr/bsd/var/tmp/devel/bmake/work/bmake/parse.c".
*** Error code 2

Stop.
make: stopped in /usr/bsd/var/tmp/devel/bmake/work/IRIX
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/devel/bmake
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/devel/bmake

>How-To-Repeat:

The code in question is:

/*-
 * Parse_Error  --
 *  External interface to ParseErrorInternal; uses the default filename
 *  Line number.
 *
 * Results:
 *  None
 *
 * Side Effects:
 *  None
 */
/* VARARGS */
void
Parse_Error(int type, const char *fmt, ...)
{
  va_list ap;

  va_start(ap, fmt);
  if (curFile == (IFile *)NIL) {
    /* avoid segfault */
    static IFile intFile = {
      .fname = NULL,
      .lineno = 0,
      .fd = -1,
    };
    curFile = &intFile;
  }
  ParseVErrorInternal(stderr, curFile->fname, curFile->lineno,
        type, fmt, ap);
  va_end(ap);

  if (debug_file != stderr && debug_file != stdout) {
    va_start(ap, fmt);
    ParseVErrorInternal(debug_file, curFile->fname, curFile->lineno,
          type, fmt, ap);
    va_end(ap);
  }
  /*
   * if we get this far, make sure we don't leave curFile
   * pointing to our dummy one.
   */
  if (curFile->fname == NULL) {
    curFile = (IFile *)NIL;
  }
}

>Fix:

Is this non-standard/GNU-specific syntax?

I'm not sure if this is correct, but changing the line following the segfault 
comment with:

static IFile intFile = { NULL, 0, -1 };

... seems to allow bmake to compile successfully.



Home | Main Index | Thread Index | Old Index