Re: issues with bsdgrep and lang/go
Em 2011.08.10. 5:02, Jason Hellenthal escreveu: So has the maintainer of bsdgrep updated it yet so these things do not happen ?, if not (and apparently not) I don't understand why you are explicitly defaulting your gnugrep to a broken bsdgrep. This was a known problem a few months back and I for one have not seen updates on that yet. I don't remember of this bug but I may have missed it. Could you tell me where did you see it? I'm very thankful to Alexander for using the buggy BSD grep because he helped fixing a bug. Criticizing is the easiest option but probably not the best. Gabor Kovesdan ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
Em 2011.08.10. 22:09, Alexander Best escreveu: well i'd like to help the author of bsdgrep to improve it. testing it and then going back to gnu grep, because bsdgrep still has bugs isn't going to help much. by using it i'd like to trip over these kind of bugs and report them. but you're right...the author hasn't really paid a lot of attention to bsdgrep, lately.:( i guess that's a problem when you have an open os, where everybody can do as much or as little as it pleases him.;) I do! In this year's Summer of Code I'm working on the regex code. A good and efficient regex support is important for a fast and clean BSD grep. The ultimate goal is to get rid of both GNU grep and libgnuregex. I'm sorry if I temporarily neglected some bug reports. Gabor ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
Em 2011.08.09. 13:27, Test Rat escreveu: Try below workaround. It also makes empty GREP_COLOR behave like gnugrep(1). Thanks a lot, you were so quick that I haven't had a chance to look at it yet. I'll commit the patch soon. Also, thanks to Alexander for using BSD grep and reporting bugs. Gabor Kovesdan ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
On Tue Aug 9 11, Jason Hellenthal wrote: So has the maintainer of bsdgrep updated it yet so these things do not happen ?, if not (and apparently not) I don't understand why you are explicitly defaulting your gnugrep to a broken bsdgrep. This was a known problem a few months back and I for one have not seen updates on that yet. well i'd like to help the author of bsdgrep to improve it. testing it and then going back to gnu grep, because bsdgrep still has bugs isn't going to help much. by using it i'd like to trip over these kind of bugs and report them. but you're right...the author hasn't really paid a lot of attention to bsdgrep, lately. :( i guess that's a problem when you have an open os, where everybody can do as much or as little as it pleases him. ;) Debugging pencil should be handy in this case. On Tue, Aug 09, 2011 at 08:18:42AM +, Alexander Best wrote: hi there, i'm running HEAD on amd64 with bsdgrep (WITH_BSD_GREP=true). i noticed the lang/go port won't build due to errors caused by egrep. this might be a ports issue, but to me it rather looks like bsdgrep is not behaving exactly the same, as gnu grep. however i haven't tried building the port with gnu grep. maybe somebody could check that out. the port errors are of the following form: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/gobj.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/galign.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/ggen.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/cgen.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c -I. -o cplx.o ../gc/cplx.c [...] cheers. alex ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
issues with bsdgrep and lang/go
hi there, i'm running HEAD on amd64 with bsdgrep (WITH_BSD_GREP=true). i noticed the lang/go port won't build due to errors caused by egrep. this might be a ports issue, but to me it rather looks like bsdgrep is not behaving exactly the same, as gnu grep. however i haven't tried building the port with gnu grep. maybe somebody could check that out. the port errors are of the following form: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/gobj.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/galign.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/ggen.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/cgen.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from|from: No such file or directory quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c -I. -o cplx.o ../gc/cplx.c [...] cheers. alex ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
Alexander Best arun...@freebsd.org writes: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from| from: No such file or directory Do you use GREP_OPTIONS? $ echo foo | env -i GREP_OPTIONS= bsdgrep foo bsdgrep: foo: No such file or directory ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
On Tue Aug 9 11, Test Rat wrote: Alexander Best arun...@freebsd.org writes: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from| from: No such file or directory Do you use GREP_OPTIONS? otaku% type $GREP_OPTIONS otaku% echo foo | env -i GREP_OPTIONS= bsdgrep foo env: bsdgrep: No such file or directory otaku% $ echo foo | env -i GREP_OPTIONS= bsdgrep foo bsdgrep: foo: No such file or directory ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
Alexander Best arun...@freebsd.org writes: On Tue Aug 9 11, Test Rat wrote: Alexander Best arun...@freebsd.org writes: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from| from: No such file or directory Do you use GREP_OPTIONS? otaku% type $GREP_OPTIONS otaku% echo foo | env -i GREP_OPTIONS= bsdgrep foo env: bsdgrep: No such file or directory otaku% Actually, it's lang/go that seems to set the environment variable. $ fgrep -r GREP_OPTIONS $(make -V WRKSRC) .../src/cmd/gc/mkopnames:export GREP_OPTIONS= .../src/Make.inc:GREP_OPTIONS:= .../src/Make.inc:export LANG LC_ALL LC_CTYPE GREP_OPTIONS GREP_COLORS .../src/Make.inc: @echo export GREP_OPTIONS=$(GREP_OPTIONS) .../test/run:unset GREP_OPTIONS # in case user has a non-standard set .../doc/devel/weekly.html:* build: clear custom variables like GREP_OPTIONS, Try below workaround. It also makes empty GREP_COLOR behave like gnugrep(1). %% Index: usr.bin/grep/grep.c === --- usr.bin/grep/grep.c (revision 224705) +++ usr.bin/grep/grep.c (working copy) @@ -304,7 +304,7 @@ init_color(const char *d) char *c; c = getenv(GREP_COLOR); - return (c != NULL ? c : d); + return (c != NULL c[0] != '\0' ? c : d); } int @@ -360,7 +360,7 @@ main(int argc, char *argv[]) /* support for extra arguments in GREP_OPTIONS */ eargc = 0; - if (eopts != NULL) { + if (eopts != NULL eopts[0] != '\0') { char *str; /* make an estimation of how many extra arguments we have */ @@ -373,6 +373,7 @@ main(int argc, char *argv[]) eargc = 0; /* parse extra arguments */ while ((str = strsep(eopts, )) != NULL) + if(*str != '\0') eargv[eargc++] = grep_strdup(str); aargv = (char **)grep_calloc(eargc + argc + 1, %% ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: issues with bsdgrep and lang/go
On Tue Aug 9 11, Test Rat wrote: Alexander Best arun...@freebsd.org writes: On Tue Aug 9 11, Test Rat wrote: Alexander Best arun...@freebsd.org writes: [...] gmake -C 6g install gmake[1]: Entering directory `/usr/ports/lang/go/work/go-20110515/src/cmd/6g' quietgcc -I/usr/ports/lang/go/work/go-20110515/include -ggdb -O2 -c /usr/ports/lang/go/work/go-20110515/src/cmd/6g/list.c egrep: : error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level: |In file included from| from: No such file or directory Do you use GREP_OPTIONS? otaku% type $GREP_OPTIONS otaku% echo foo | env -i GREP_OPTIONS= bsdgrep foo env: bsdgrep: No such file or directory otaku% Actually, it's lang/go that seems to set the environment variable. $ fgrep -r GREP_OPTIONS $(make -V WRKSRC) .../src/cmd/gc/mkopnames:export GREP_OPTIONS= .../src/Make.inc:GREP_OPTIONS:= .../src/Make.inc:export LANG LC_ALL LC_CTYPE GREP_OPTIONS GREP_COLORS .../src/Make.inc: @echo export GREP_OPTIONS=$(GREP_OPTIONS) .../test/run:unset GREP_OPTIONS # in case user has a non-standard set .../doc/devel/weekly.html:* build: clear custom variables like GREP_OPTIONS, Try below workaround. It also makes empty GREP_COLOR behave like gnugrep(1). thanks a bunch. after applying your patch lang/go builds without any issues! :) cheers. alex %% Index: usr.bin/grep/grep.c === --- usr.bin/grep/grep.c (revision 224705) +++ usr.bin/grep/grep.c (working copy) @@ -304,7 +304,7 @@ init_color(const char *d) char *c; c = getenv(GREP_COLOR); - return (c != NULL ? c : d); + return (c != NULL c[0] != '\0' ? c : d); } int @@ -360,7 +360,7 @@ main(int argc, char *argv[]) /* support for extra arguments in GREP_OPTIONS */ eargc = 0; - if (eopts != NULL) { + if (eopts != NULL eopts[0] != '\0') { char *str; /* make an estimation of how many extra arguments we have */ @@ -373,6 +373,7 @@ main(int argc, char *argv[]) eargc = 0; /* parse extra arguments */ while ((str = strsep(eopts, )) != NULL) + if(*str != '\0') eargv[eargc++] = grep_strdup(str); aargv = (char **)grep_calloc(eargc + argc + 1, %% ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org