pkgsrc-Bugs archive

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

pkg/38210: textproc/grep-2.5.3 fails to compile on IRIX (2.5.1nb4 built correctly)



>Number:         38210
>Category:       pkg
>Synopsis:       textproc/grep-2.5.3 fails to compile on IRIX (2.5.1nb4 built 
>correctly)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 10 11:10:00 +0000 2008
>Originator:     Stuart Shelton
>Release:        pkgsrc latest from CVS
>Organization:
>Environment:
IRIX64 octane 6.5 07202013 IP30; IRIX 6.5.30; MIPSpro Compilers: Version 7.4.4m
>Description:

grep-2.5.3 fails with:

source='search.c' object='search.o' libtool=no  DEPDIR=.deps depmode=sgi 
/bin/ksh ../depcomp  cc -DHAVE_CONFIG_H -I. -I.. -I../intl -I../lib 
-DLOCALEDIR=\"/usr/bsd/share/locale\"   -I/usr/bsd/include -D__inline__=inline 
-I/usr/bsd/include  -c99 -O2 -n32 -mips4 -r14000 -apo -float_const 
-use_readonly_const -TARG:isa=mips4:platform=ip30:processor=r14000 
-TENV:zeroinit_in_bss=ON -OPT:fast_io=ON:Olimit=8192:reorg_common=ON:swp=ON 
-LNO:auto_dist=ON:fusion_peeling_limit=8:gather_scatter=2 -woff 
1174,1183,1185,1552,3970,3968 -n32 -I/usr/bsd/include -c search.c
cc-1164 cc: WARNING File = search.c, Line = 169
  Argument of type "const char *" is incompatible with parameter of type
          "char *restrict".

              wcrtomb(buf + i, wc, &cur_state);
                      ^

cc-1117 cc: ERROR File = search.c, Line = 283
  An expression appears after a "return" in a "void" function.

    return GEAcompile (pattern, size,
           ^

cc-1117 cc: ERROR File = search.c, Line = 289
  An expression appears after a "return" in a "void" function.

    return GEAcompile (pattern, size, RE_SYNTAX_AWK);
           ^

cc-1117 cc: ERROR File = search.c, Line = 294
  An expression appears after a "return" in a "void" function.

    return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
           ^

3 errors detected in the compilation of "search.c".
*** Error code 2

Stop.
bmake: stopped in /usr/bsd/var/tmp/textproc/grep/work/grep-2.5.3/src
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/var/tmp/textproc/grep/work/grep-2.5.3
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/var/tmp/textproc/grep/work/grep-2.5.3
*** Error code 1

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

Stop.
bmake: stopped in /usr/bsd/src/textproc/grep


... and this appears to be correct!

In "grep.h", we have the following definitions:

#ifdef GREP_PROGRAM
# define COMPILE_FCT(f) static COMPILE_RET f COMPILE_ARGS
#else /* !GREP_PROGRAM */
# define COMPILE_FCT(f) COMPILE_RET compile COMPILE_ARGS

... below:

#define COMPILE_RET void

... which expands out to:

# define COMPILE_FCT(f) static void f (char const *pattern, size_t size)
# define COMPILE_FCT(f) void compile (char const *pattern, size_t size)

... so when the source contains:

COMPILE_FCT(Ecompile)
{
  return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
}

... this becomes:

static void Ecompile(char const *pattern, size_t size)
{
  return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
}

... which the compiler is classifying as an ERROR :(
>How-To-Repeat:

>Fix:

GEAcompile also has a return type of COMPILE_RET, which is #defined to be void 
- so presumably removing the 'return' statements should fix the problem without 
breaking the code.

NB:

mk/compiler/mipspro.mk has line 46:

CC_VERSION!=            ${CCPATH} -version 2>&1 | ${GREP} '^MIPSpro'

... which breaks when upgrading 'grep', since this is evaluated after the older 
grep has been removed, but before the newer one has been installed.



Home | Main Index | Thread Index | Old Index