Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 243412 - sys-apps/grep fails to compile on IRIX
Summary: sys-apps/grep fails to compile on IRIX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High blocker (vote)
Assignee: Gentoo non-Linux Team
URL: https://savannah.gnu.org/patch/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-23 15:49 UTC by Stuart Shelton
Modified: 2009-08-27 12:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to prevent void functions from trying to return a value (grep-2.5.4.patch,718 bytes, patch)
2009-02-25 18:28 UTC, Stuart Shelton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2008-10-23 15:49:38 UTC
grep fails with:

source='search.c' object='search.o' libtool=no \
        DEPDIR=.deps depmode=sgi /opt/portage/bin/bash ../depcomp \
        cc -DHAVE_CONFIG_H -I. -I.. -I../intl -I../lib -DLOCALEDIR=\"/opt/portage/usr/share/locale\"  -I/opt/portage/usr/include  -c99 -O2 -n32 -mips4 -r14000 -float_const -use_readonly_const -TARG:isa=mips4:platform=ip35: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 -diag_error 1035 -woff 1174,1183,1185,1552,3968,3970 -n32 -I/opt/portage/usr/include -c search.c
cc-1117 cc: ERROR File = search.c, Line = 260
  An expression appears after a "return" in a "void" function.

    return GEAcompile (pattern, size,
           ^

cc-1117 cc: ERROR File = search.c, Line = 266
  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 = 271
  An expression appears after a "return" in a "void" function.

    return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
           ^

cc-3604 cc: WARNING File = search.c, Line = 1249
  missing return statement at end of non-void function "Pexecute"

  }
  ^

3 errors detected in the compilation of "search.c".
make[2]: *** [search.o] Error 2
make[2]: Leaving directory `/usr/opt/portage/var/tmp/portage/sys-apps/grep-2.5.3-r1/work/grep-2.5.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/opt/portage/var/tmp/portage/sys-apps/grep-2.5.3-r1/work/grep-2.5.3'
make: *** [all] Error 2
 * ERROR: sys-apps/grep-2.5.3-r1 failed:
 * emake failed
 * 
 * Call stack:
 * ebuild.sh:  49: <call src_compile>
 * environment:2429:     emake || die "emake failed"

... this can be fixed by removing the "return" keyword from lines 260, 266, and 271.
Comment 1 Stuart Shelton 2009-01-22 18:17:55 UTC
... even with these changes, the grep (now sys-apps/grep-2.5.3-r01.1) testsuite still fails with:

PASS: warning.sh
PASS: khadafy.sh
PASS: spencer1.sh
PASS: bre.sh
PASS: ere.sh
PASS: pcre.sh
PASS: status.sh
PASS: empty.sh
PASS: options.sh
PASS: backref.sh
PASS: file.sh
Testing:  ../src/grep Word -o -i
  input:  "WordA/wordB/WORDC/"
  output: ""
  expect: "Word/word/WORD/"
FAIL
Testing:  ../src/grep WORD -o -i
  input:  "WordA/wordB/WORDC/"
  output: ""
  expect: "Word/word/WORD/"
FAIL
Testing:  ../src/grep Word --color=always -i
  input:  "WordA/wordb/WORDC/"
  output: "WordA/wordb/WORDC/" [without colouring]
  expect: "WordA/wordb/WORDC/" [with colouring]
FAIL
Testing:  ../src/grep WORD --color=always -i
  input:  "WordA/wordb/WORDC/"
  output: "WordA/wordb/WORDC/" [without colouring]
  expect: "WordA/wordb/WORDC/" [with colouring]
FAIL
FAIL: foad1.sh
SKIP: fmbtest.sh
PASS: yesno.sh
=================================
1 of 13 tests failed
(1 tests were not run)
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/usr/opt/portage/var/tmp/portage/sys-apps/grep-2.5.3-r01.1/work/grep-2.5.3/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/usr/opt/portage/var/tmp/portage/sys-apps/grep-2.5.3-r01.1/work/grep-2.5.3/tests'
make: *** [check-recursive] Error 1
 * ERROR: sys-apps/grep-2.5.3-r01.1 failed:
 *   Make check failed. See above for details.
 * 
 * Call stack:
 *               ebuild.sh:  49: <call src_test>
 *             environment:2469: <call _eapi0_src_test>
 *               ebuild.sh: 616:                      hasq test $FEATURES && die "Make check failed. See above for details."
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-22 19:16:12 UTC
For the record, the WordA/wordB/WORDC tests also fail on BSD systems.

And it seems to be upstream already:

http://savannah.gnu.org/bugs/?24703
Comment 3 Stuart Shelton 2009-02-25 18:28:12 UTC
Created attachment 183166 [details, diff]
Patch to prevent void functions from trying to return a value
Comment 4 Stuart Shelton 2009-02-25 18:30:42 UTC
The good news is that, with this patch, the grep-2.5.4 test-suite passes successfully.
Comment 5 Fabian Groffen gentoo-dev 2009-02-25 19:04:46 UTC
please send this patch upstream and give us a reference so we can track the patch

In the meanwhile I've committed it to the Prefix tree.
Comment 6 Stuart Shelton 2009-02-26 11:14:22 UTC
https://savannah.gnu.org/patch/index.php?6756