[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MSYS build and POSIX regex



On Fri, Nov 23, 2012 at 5:05 PM, Howard Chu <hyc@symas.com> wrote:
> Only you can answer that. Read the config.log file and see what error
> message was in it for the regfree test.

As far as I can investigate the situation configure script tries to
build following source to find regex library:

| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char regfree ();
| int
| main ()
| {
| return regfree ();
|   ;
|   return 0;
| }

There is 3 attempts to build it with or without various libraries:

1) cc -o conftest.exe -g -O2   conftest.c  -lws2_32 >&5
C:\temp\temp\ccKv1vKc.o: In function `main':
d:\MyProgram\kokoko\openldap-2.4.33/conftest.c:69: undefined reference
to `regfree'

2) cc -o conftest.exe -g -O2   conftest.c -lregex   -lws2_32 >&5
D:\Dev\mingw\bin/ld.exe: cannot find -lregex

3) cc -o conftest.exe -g -O2   conftest.c -lgnuregex   -lws2_32 >&5
D:\Dev\mingw\bin/ld.exe: cannot find -lgnuregex

But PCRE posix wrappers lives in libpcreposix.a. Is there any way to
use pcre libraries  (libpcreposix.a + libpcre.a) for openldap build?
Should such behavior of configuration script be consifdered as bug?