PCRE_UTF8 unavailable when using configure-alt

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
kosh
Posts: 72
Joined: Sun Sep 13, 2009 5:38 am
Location: Japan
Contact:

PCRE_UTF8 unavailable when using configure-alt

Post by kosh »

Hello, Lutz
Is the bug report good here?

Code: Select all

$ ./configure && make
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX pcre.c
...
$ ./newlisp -n -e '(regex-comp "ほげほげ" 0x800)'    # PCRE_UTF8 = 0x800
"ERCP7\000..."

Code: Select all

$ ./configure-alt && make
gcc -m32 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG pcre.c
...
$ ./newlisp -n -e '(regex-comp "ほげほげ" 0x800)'
ERR: regular expression in function regex-comp : "offset 0 this version of PCRE is not compiled with PCRE_UTF8 support"
This seems for the error to happen when SUPPORT_UTF8 is undefined when pcre.c is compiled.

---
kosh - newlisp v.10.2.16 on Ubuntu 9.10 IPv4

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: PCRE_UTF8 unavailable when using configure-alt

Post by Lutz »

Do this:

Code: Select all

./configure-alt --enable-utf8
To see all options do this:

Code: Select all

./configure-alt --help
The normal 'configure' does UTF8 on most platforms automatically, not on Windows. When using 'configure-alt', you have to specify it always. The description in the help wrongly describes it as the default -> Ted ;)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: PCRE_UTF8 unavailable when using configure-alt

Post by Lutz »

I also just realize when using the alternate 'configura-alt' script, config.h generated by configure-alt never got included by the PCRE files, even when including --enable-utf8 on the command line. This is fixed now in inprogress/newlisp-10.2.18.tgz.

pcre-config.h now also includes config.h when using configure-alt. The standard configure script was always working fine.

-> Ted: this should also be announced on http://dpkg.reactor-core.org/

Locked