According to Joe R. Jah:
> I'd like htdig to display relative URL's on the local site in the results;
> I applied Andy Armstrong's patch; I set the following config line:
>
> url_rewrite_rules: http://cloud.ccsf.cc.ca.us\\(.*\\) \\1
>
> and randig; here is the result:
>
> $ gdb htdig htdig.core
> GNU gdb
> This GDB was configured as "i386-unknown-bsdi4.0.1"...
> Core was generated by `htdig'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x1810e3e4 in rx_search ()
> (gdb) bt
> #0 0x1810e3e4 in rx_search ()
> #1 0x18115be0 in re_search_2 ()
> #2 0x18115d05 in re_match_2 ()
> #3 0x18115d72 in re_match ()
> #4 0x8066d8a in RegexReplace::Replace (this=0x80ec600, source=@0x8047464)
> at RegexReplace.cc:51
> #5 0x8066b83 in RegexReplaceList::Replace () at RegexReplaceList.cc:56
> #6 0x806348d in URL::rewrite (this=0x8818f80) at HtURLRewriter.h:20
> #7 0x8056141 in Retriever::got_href (this=0x80477b4, url=@0x8818f80,
> description=0x8821b60 "General Information ")
> at Retriever.cc:1252
> #8 0x8052bb4 in HTML::do_tag (this=0x897cb00, retriever=@0x80477b4,
> tag=@0x897cb68) at HTML.cc:1075
> #9 0x8051070 in HTML::parse (this=0x897cb00, retriever=@0x80477b4,
> baseURL=@0x80ece00) at HTML.cc:315
> #10 0x8054b73 in Retriever::RetrievedDocument (this=0x80477b4,
> doc=@0x80ecc00, ref=0x8140700) at Retriever.cc:577
> #11 0x805484e in Retriever::parse_url (this=0x80477b4, urlRef=@0x813f5c0)
> at Retriever.cc:474
> #12 0x8054269 in Retriever::Start (this=0x80477b4) at Retriever.cc:294
> #13 0x80584c3 in main (ac=4, av=0x80479c0) at htdig.cc:267
> #14 0x804f0bc in __start ()
> (gdb) q
> $
>
> Any pointers will be appreciated.
Well, it's hard to know for sure, not having access to a BSDI system
myself, but if I recall you had ended up building htdig with this
patch by keeping the provided regex.h (rather than using the one on
your system), but linking with your C library's regex.o (rather than
using the provided regex.c). This does sound like trouble to me!
It may very well be that the glibc version of regex.h that comes with
htdig is incompatible with your C library's regex.o, and so htdig ends
up calling re_match() with incorrect arguments. Maybe we were too hasty
in changing the FAQ!
I think we should take a few steps back and look at the errors you got
when you applied Andy Armstrongs patch, but removed regex.h so it would
use the one from your C library's header files:
____________________________________________________
In file included from RegexReplaceList.h:16,
from HtURLRewriter.h:9,
from URL.cc:26:
RegexReplace.h:36: field `re' has incomplete type
RegexReplace.h:37: field `regs' has incomplete type
gmake[1]: *** [URL.o] Error 1
gmake[1]: Leaving directory `/tmp/htdig-3.1.5/htlib'
gmake: *** [all] Error 1
____________________________________________________
The problem lines in RegexReplace.h are:
struct re_pattern_buffer re; // This is the compiled source regex
struct re_registers regs; // Match registers
which use structures that are defined in our regex.h, but
apparently not in yours. These structures are passed as arguments to
re_compile_pattern() and re_match(), so they're pretty important. You are
just asking for trouble if you pass your C library's re_compile_pattern()
and re_match() functions pointers to structures whose definitions aren't
even known to them! What you'd need to do is make RegexReplace.h &
RegexReplace.cc less glibc dependent, and able to work with the equivalent
(though different) structures used by your C library.
Having a look at your regex.h, to know what structures your re_match()
uses, would be very helpful.
In the meantime, I'll back out the change to the FAQ.
--
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
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html