[mapserver-users] 3.5 build problem

Daniel Morissette morissette at dmsolutions.ca
Thu Dec 6 11:28:25 EST 2001


Stephen,

It seems that you have 2 versions of regex installed on your system: the
default system regex in /usr/lib, and rxposix in /usr/local/...

The problem is that MapServer only cares about the system regex (and
regex.h), but libwww which is used by the --with-wmsclient does detect
your rxposix.h and use it in priority over regex.h if it's found... and
then you end up with conflicting declarations.

I don't think there is a nice and easy fix... here are some options:

1- Remove rxposix from your system and recompile libwww and the conflict
will go away.

2- Make MapServer aware of rxposix... we may do that down the road, but
I suspect that this will have implications with PHP as well, so I won't
do that now.  I filed a bug about this and might make that change
eventually: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=82

3- Try playing with libwww's --with-regex configure option to try to
force it to use the system regex in priority.  If that doesn't work then
edit libwww's configure.in to remove rxposix.h in the line that reads:
  AC_CHECK_HEADERS(rxposix.h regex.h)
... then run autoconf and reconfigure.

I hope that helps,

Daniel


Stephen Woodbridge wrote:
> 
> I ran into a problem with the 12/4 nightly build. This problem occured
> when I added --with-wmsclient to ./configure
> 
> Any ideas?
>   -Steve
> 
> ./configure  --with-proj --with-ogr --with-gdal --with-wmsclient
> 
> make
> 
> ...
> 
> gcc -c -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ
> -DUSE_PROJ_API_H -DUSE_WMS -DUSE_WMS_LYR  -DUSE_TIFF -DUSE_JPEG
> -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_TTF
> -DGD_HAS_GDIMAGEGIFPTR   -DUSE_OGR -DUSE_GDAL   -I/usr/include
> -I/usr/local/include -I/usr/local/include  -I/usr/local/include
> -I/usr/local/include/w3c-libwww -DHAVE_CONFIG_H  mapwmslayer.c -o
> mapwmslayer.o
> In file included from /usr/local/include/w3c-libwww/wwwsys.h:1051,
>                  from /usr/local/include/w3c-libwww/WWWLib.h:50,
>                  from mapwmslayer.c:100:
> /usr/local/include/rxposix.h:122: warning: `REG_NOTEOL' redefined
> /usr/include/regex.h:278: warning: this is the location of the previous
> definition
> In file included from /usr/local/include/w3c-libwww/WWWXML.h:57,
>                  from /usr/local/include/w3c-libwww/HTInit.h:144,
>                  from /usr/local/include/w3c-libwww/WWWInit.h:51,
>                  from mapwmslayer.c:102:
> /usr/local/include/w3c-libwww/HTXML.h:104: warning: `/*' within comment
> In file included from /usr/local/include/w3c-libwww/wwwsys.h:1051,
>                  from /usr/local/include/w3c-libwww/WWWLib.h:50,
>                  from mapwmslayer.c:100:
> /usr/local/include/rxposix.h:39: conflicting types for `regex_t'
> /usr/include/regex.h:391: previous declaration of `regex_t'
> /usr/local/include/rxposix.h:42: warning: redefinition of `regoff_t'
> /usr/include/regex.h:394: warning: `regoff_t' previously declared here
> /usr/local/include/rxposix.h:49: conflicting types for `regmatch_t'
> /usr/include/regex.h:422: previous declaration of `regmatch_t'
> /usr/local/include/rxposix.h:132: conflicting types for `regcomp'
> /usr/include/regex.h:518: previous declaration of `regcomp'
> /usr/local/include/rxposix.h:135: conflicting types for `regerror'
> /usr/include/regex.h:525: previous declaration of `regerror'
> /usr/local/include/rxposix.h:143: conflicting types for `regexec'
> /usr/include/regex.h:522: previous declaration of `regexec'
> /usr/local/include/rxposix.h:144: conflicting types for `regfree'
> /usr/include/regex.h:527: previous declaration of `regfree'
> make: *** [mapwmslayer.o] Error 1



More information about the mapserver-users mailing list