On Mon, May 07, 2012 at 06:16:16AM +0200, John Spencer wrote:
> when compiling ncurses 5.9 with busybox sed,
> it'll produce invalid C files
>
> .../ncurses/lib_gen.c:27:3: error: expected identifier or '(' before 'int'
>
> the file contains:
> /* DO NOT EDIT THIS FILE BY HAND!
> * It is generated by ./base/MKlib_gen.sh generated. */
>
> the line that errs is
> * int waddch(stdscr,const chtype z) { ... }
>
> which clearly is invalid C
>
> it is generated by ncurses-5.9/ncurses/./base/MKlib_gen.sh which
> does a lot of sed...
>
> since i'm not very familiar with sed, it would be nice if someone
> could look at the issue.
>
> using gnu sed instead fixes the build.
The issue is that GNU sed uses its own regex implementation, while
Busybox uses the underlying C library's. This bug only showed up when
using Busybox on musl libc, and it was a bug we inherited from the TRE
regex implementation we use: it was failing to treat * as a literal
character at the beginning of a BRE. I've fixed it in musl and I'm
going to report the issue upstream to TRE as well, but it seems like
upstream TRE is no longer maintained.
Rich
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox