bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep 2.5 build problem on QNX 6.2


From: Stepan Kasal
Subject: Re: grep 2.5 build problem on QNX 6.2
Date: Sun, 20 Oct 2002 09:42:34 +0200
User-agent: Mutt/1.2.5.1i

----- Forwarded message from David Wolfe <address@hidden> -----

Date: Sat, 19 Oct 2002 01:53:35 -0400
From: David Wolfe <address@hidden>
Subject: Re: grep 2.5 build problem on QNX 6.2
To: Stepan Kasal <address@hidden>
Organization: gForce Technologies, Inc.
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-Priority: 3
X-MSMail-priority: Normal

Hi, Stepan.  You emailed me a few weeks ago regarding a compilation
problem I was having with grep 2.5 under QNX 6.2.  (Sorry it has taken
so long to respond.)  You suggested trying version 2.5.1, and also noted
that--if that didn't work--I might want to grab the new regex files from
the latest glibc.

The 2.5.1 sources (from subversions.gnu.org) had the exact same problem
as version 2.5, so I did as you suggested and downloaded the glibc
CVS from sources.redhat.com.  It was surprisingly easy to compile with
the new regex code.  All I had to do was:

- Copy the following files from libc/posix to grep/lib:

  * regex.c     (<-- overwrote original)
  * regex.h     (<-- overwrote original)
  * regex_internal.c
  * regex_internal.h
  * regcomp.c
  * regexec.c

- Copy libc/posix/regex.h to grep/lib/posix, overwriting the existing
  file.  (I'm not sure this was necessary, but I did it anyway.)

- Convert above files to UNIX line-ending convention.  (They were
  DOS-format for some reason, and QNX didn't like that very much.)

- Run autogen, configure, and make from the top-level dir

The compiled executable seems to work fine, except for failing the
backref.sh test miserably.  That test almost hung my machine completely;
I could barely manage to open a shell and do a ps to find out what it
was doing:

0  186130479  186114093  - Oct19 ?        00:00:34 ../src/grep -E -e
^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$

It seemed to be trapped in an infinite loop.  (Or perhaps I just got
impatient! ;-) ) I hard-coded an immediate 'exit 1' failure return at
the top of backref.sh so I could run the rest of the tests, and obtained
the following output from 'make check':

make[2]: Entering directory `/root/projects/grep/tests'

Please, do not be alarmed if some of the tests failed.
Report them to <address@hidden>,
with the line number, the name of the file,
and grep version number 'grep --version'.
Make sure you have the word grep in the subject.
Thank You.

PASS: warning.sh
PASS: khadafy.sh
Spencer test #37 failed
Spencer test #55 failed
FAIL: spencer1.sh
PASS: bre.sh
PASS: ere.sh
PASS: status.sh
PASS: empty.sh
PASS: options.sh
FAIL: backref.sh
PASS: file.sh
====================
2 of 10 tests failed
====================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/root/projects/grep/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/root/projects/grep/tests'
make: *** [check-recursive] Error 1

So, all in all, it wasn't too hard for QNX.  I suspect that other OSes
may be a bit trickier.  Let me know if I can help.  I also hack on Linux
sometimes, and have access to a few machines running Irix, too.

Thanks for taking the time to reply to my original message.  It was fun
poking around in the grep and libc sources... 8-)

Regards,

- Dave


----- Original Message -----
From: "Stepan Kasal" <address@hidden>
To: "David Wolfe" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, October 01, 2002 10:28 AM
Subject: Re: grep 2.5 build problem on QNX 6.2


> Hello,
>
> On Tue, Oct 01, 2002 at 09:06:24AM -0400, David Wolfe wrote:
> > Wish I had advice on how to fix this, but I don't know where to
> > begin.  (I'm happy to poke around some more if someone can tell me
> > what to look for.)
>
> a quick answer:
>
> 1) At least grep 2.5.1 is available.  If ftp://alpha.gnu.org doesn't
> have it (it probably doesn't, it had a crash some time ago), you have
> to retrieve it from cvs.  Search the Free Software Directory in
> www.gnu.org for more information.  I've also found this: cvs -z3
> -d:pserver:address@hidden:/cvs co grep
>
> (The cvs contains a copy of 2.5.1.)
>
> 2) If the problem lies in regex.c, you should try update to the newest
> regex.c from libc/posix/ subdirectory of the glibc CVS.
>
> The command cvs -z9 -d:pserver:address@hidden:/cvs/glibc
> co libc retrieves whole libc direcory, you cd libc/posix then and use
> regex.c (plus included *.h and *.c files).
>
> (AFAIK, there is no equivalent tarball.)
>
> I think that adapting grep to the newest regex.c is very useful work,
> there are often bug reports in bug-gnu-utils which could all be solved
> by this.
>
> Though I'm not the grep maintainer, I'm interested in this, please
> tell me if you do anything with this.  (And, of course, feel free to
> ask for more information.)
>
> HTH, Stepan Kasal



----- End forwarded message -----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]