According to Joe R. Jah:
> On Wed, 28 Jul 1999, Gilles Detillieux wrote:
> > OK, upon closer examination, it appears I was mistaken about one point.
> > 3.1.2 doesn't use the regex code in the C library, but rather it bundles
> > the GNU regex code in the package, and puts it in htlib/libht.a.
> > The extern "C" construct above doesn't work because htlib/regex.h
> > already includes this construct - that's why it was removed from
> > htfuzzy/Endings.cc.
> > 
> > So, perhaps this GNU regex.c code is causing a conflict with your C
> > or C++ library.  If you already have a regex.h in your /usr/include
> > directory, and regex functions in your C library, you might want to try
> > using these instead of the ones in htlib.  To do this, I think you'd need
> > to remove references to regex.o from htlib/Makefile, remove regex.o from
> 
> Bingo;)  I removed references to regex.o from htlib/Makefile.
> 
> > htlib/libht.a, and probably also remove htlib/regex.h.  If this works,
> 
> I ran make clean and removed htlib/regex.h; however, I had to also remove
> references to htlib/regex.h in htfuzzy/Makefile.  It worked like a charm;)
> 
> Thanks a million Gilles and Geoff.

Glad to help!  I guess this becomes a developer issue now, so I'm
cross-posting to htdig3-dev.  Can someone who knows the configure program
and BSDI better than I do please devise a test for this situation, and
to take the appropriate action?  I guess it would be similar to what's
done for selecting the bundled vs. system version of strftime and other
such functions.  The extra wrinkle is that this time there's an include
file involved as well.

I'm also not sure what the test should be.  It's not enough to just
check for the presence of regex.h in /usr/include, or the presence
of regex functions in the C library.  I tried on my Red Hat Linux 4.2
system to switch from the bundled regex code to the C library version.
It compiled and linked without any complaint or warning, but when I ran
"htfuzzy endings" it segfaulted.  The backtrace wasn't particularly
helpful either:

#0  0x400ae0e2 in rx_cache_get_superstate ()
#1  0x400e3dc8 in __DTOR_END__ ()
#2  0x1 in ?? ()
#3  0x40006460 in ?? ()
Cannot access memory at address 0x96c30.

So, it would seem that so far, the bundled regex code is only a problem
on BSDI, and the system C library regex code should only be used in this
case.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to