buggrep - Bugs: bug #24813, grep 2.5.3 fails to compile on Sun...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #24813: grep 2.5.3 fails to compile on Sun Solaris with "void function cannot return value" error

Submitted by:  Kamaraju Kusumanchi <kamaraju>
Submitted on:  Tue 11 Nov 2008 03:00:16 PM UTC  
Votes:  1  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: In Progress
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 28 Jun 2011 12:06:50 PM UTC, comment #3:

That particular problem has gone way, but a couple of others sneaked in:

  • Initially, the configure step (with Studio 12.2 cc, but independent of

the compiler used) failed: the last relevant line in config.log is

configure:12489: checking for MAP_ANONYMOUS
configure:3255: error: fn_grep: regular expressions not supported

For some reason, configure decides that the GNU grep 2.5.1 I have in
PATH is insufficient and falls back to fn_grep, which fails on several
patterns that are taken as regular expressions. Removing the
offending dots lets configure complete:

--- configure.dist 2011-06-21 20:05:44.000000000 +0200
+++ configure 2011-06-28 12:49:25.971164000 +0200
@@ -12496 +12496 @@
- I cant identify this map.
+ I cant identify this map
@@ -12501 +12501 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :
@@ -12512 +12512 @@
- I cant identify this map.
+ I cant identify this map
@@ -12517 +12517 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :
@@ -25456 +25456 @@
- I cant identify this map.
+ I cant identify this map
@@ -25461 +25461 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :
@@ -25472 +25472 @@
- I cant identify this map.
+ I cant identify this map
@@ -25477 +25477 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :
@@ -26958 +26958 @@
- I cant identify this map.
+ I cant identify this map
@@ -26963 +26963 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :
@@ -26974 +26974 @@
- I cant identify this map.
+ I cant identify this map
@@ -26979 +26979 @@
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cant identify this map" >/dev/null 2>&1; then :

  • There's one compiler warning:

"/vol/src/gnu/grep/grep-2.9/src/dfa.c", line 1546: warning: initializer does not fit or is out of range: 0xfffffffc

  • A couple of tests fail:

FAIL: test-mbrtowc4.sh
FAIL: test-mbrtowc3.sh
FAIL: test-mbsrtowcs4.sh
FAIL: test-setlocale2.sh
FAIL: test-mbrtowc3.sh (exit: 262)
FAIL: test-mbrtowc4.sh (exit: 262)
FAIL: test-mbsrtowcs4.sh (exit: 262)
FAIL: test-setlocale2.sh (exit: 1)

(Thanks to Rainer Orth for passing me the above results).

Paolo Bonzini <bonzini>
Wed 30 Mar 2011 08:21:43 AM UTC, comment #2:

Can you please check the status of this bug with 2.7 or the latest version from git?

Paolo Bonzini <bonzini>
Thu 22 Jan 2009 02:57:23 PM UTC, comment #1:

I don't know what compiler you're using, but we had the same problem using Sun Studio 12, which we were able to get around using "-features=extensions" as CFLAGS, as suggested here: http://forums.sun.com/thread.jspa?threadID=5182898 .

Depending on your compiler, there might be another option you can set to get it to ignore the "void function cannot return value" error.

You can also change the source code... "void function cannot return value" is caused by lines like this:


COMPILE_FCT(Acompile)
{
return GEAcompile (pattern, size, RE_SYNTAX_AWK);
}


which strictly speaking should be this:

++++
COMPILE_FCT(Acompile)
{
GEAcompile (pattern, size, RE_SYNTAX_AWK);
}
++++

(gcc ignores the "void function should not return a value" convention)

Nada O'Neal <nadaoneal>
Tue 11 Nov 2008 03:00:16 PM UTC, original submission:

I downloaded the source for grep 2.5.3 from http://ftp.gnu.org/gnu/grep/grep-2.5.3.tar.bz2 .

I configured the source using

nohup ./configure --prefix=/home/kkusuman/software/myroot 2>&1 > configure.log &

I tried to compile the source using

nohup make 2>&1 > make.log &

The compilation stops with the following errors

Making all in src
make[2]: Entering directory `/home/kkusuman/software/compileHere/grep-2.5.3/src'
source='search.c' object='search.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
cc -DHAVE_CONFIG_H -I. -I.. -I../intl -I../lib -DLOCALEDIR=\"/home/kkusuman/software/myroot/share/locale\" -I/home/kkusuman/software/myroot/include -g -c search.c
"search.c", line 169: warning: argument #1 is incompatible with prototype:
prototype: pointer to char : "/usr/include/iso/wchar_iso.h", line 194
argument : pointer to const char
"search.c", line 284: void function cannot return value
"search.c", line 289: void function cannot return value
"search.c", line 294: void function cannot return value
cc: acomp failed for search.c
make[2]: *** [search.o] Error 2
make[2]: Leaving directory `/home/kkusuman/software/compileHere/grep-2.5.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kkusuman/software/compileHere/grep-2.5.3'
make: *** [all] Error 2

The configure.log, make.log are attached for your reference.

thanks
raju

Kamaraju Kusumanchi <kamaraju>

 

Attached Files
file #16831:  make.log added by kamaraju (18kB - application/octet-stream)
file #16830:  configure.log added by kamaraju (8kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  • -unavailable- added by dagobert (Also seen this bug)
  • -unavailable- added by nadaoneal (Posted a comment)
  • -unavailable- added by jamesprescott (Voted in favor of this item)
  • -unavailable- added by kamaraju (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Jun 2011 12:06:50 PM UTCbonziniStatusNeed Info=>In Progress
    Wed 30 Mar 2011 08:21:43 AM UTCbonziniStatusNone=>Need Info
    Wed 24 Mar 2010 02:08:13 PM UTCdagobertCarbon-Copy-=>Added dagobert
    Tue 20 Jan 2009 05:03:33 AM UTCjamesprescottCarbon-Copy-=>Added jamesprescott
    Tue 11 Nov 2008 03:00:18 PM UTCkamarajuAttached File-=>Added configure.log, #16830
      Attached File-=>Added make.log, #16831

    Back to the top


    Powered by Savane 3.1-cleanup