Opened 22 years ago

Closed 21 years ago

#82 closed defect (fixed)

WMS Client - Conflict between system regex.h and rxposix.h when using libwww

Reported by: dmorissette Owned by: dmorissette
Priority: normal Milestone:
Component: WMS Client Version: 4.0
Severity: normal Keywords:
Cc:

Description

Subject:         [mapserver-users] 3.5 build problem
   Date:         Thu, 06 Dec 2001 00:02:05 -0500
   From:         Stephen Woodbridge <woodbri@swoodbridge.com>
     To:         MapServer List <mapserver-users@lists.gis.umn.edu>

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

Change History (6)

comment:1 by dmorissette, 22 years ago

Summary: WMS Client - Conflict betweeh system regex and libwww regexWMS Client - Conflict between system regex.h and rxposix.h when using libwww
Reply to Stephen W. on the list:

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.


comment:2 by dmorissette, 22 years ago

Priority: highnormal

comment:3 by dmorissette, 22 years ago

Status: newassigned
Until we implement a permanent fix, I have added a test in configure.in to 
produce an error if this potential conflict is detected.  Then once the conflict 
is resolved using one of the suggestions above, one can rerun the MapServer 
configure with --disable-rxposix-conflict-error.  A note about this problem has 
also been inclued in README.CONFIGURE.

comment:4 by dmorissette, 22 years ago

Owner: changed from morissette@… to sfournier@…
Status: assignednew

comment:5 by dmorissette, 21 years ago

dependson: 237
Owner: changed from sfournier@… to morissette@…
This bug will go away once the switch to libcurl is completed in bug 237

comment:6 by dmorissette, 21 years ago

Resolution: fixed
Status: newclosed
Version: 3.53.7
Fixed in 3.7: libwww is gone!  :D
Note: See TracTickets for help on using tickets.