According to Jerry Stratton:
> I've managed to compile htdig on Mac OS X 10.0.3, but when I attempt
> to run any of the programs except for htfuzzy, I get a "Bus error"
> immediately. Any ideas?
I'm pretty sure you need the macosx patch, so your second try is
probably the way to proceed. I never heard of needing to change regex
versions on Max OS X, so I don't think that substitution is a good idea.
Are you sure that using g++/strstream.h in place of stream.h is correct?
It strikes me as a bit odd, possibly wrong, and it's not mentioned at
all in Scott's article. Maybe you're missing the correct stream.h header
file on your system.
Uh, yeah. stream.h is missing--I went looking for a replacement
but got distracted and forgot about having started doing that. (On
earlier--non-Unix--versions of Mac OS, stream.h was replaced with
another file, which I managed to track down as iostream.h. There is an
iostream.h on OS X, but it doesn't help, and it was wishful thinking
to expect that the same fix would work under a completely different OS
just because the two OS's share the same name :*)
There is *no* stream.h file on my system; I went and downloaded
the latest darwin installation; it has no stream.h either.
Actually, I could be wrong about not wanting iostream.h. While
searching the web I found:
>Is stream.h a UNIX specific header file? If not, where can I get a
>copy? I am trying to compile C++ code that was sent to me and my only
I believe <stream.h> is the oldest of the C++ stream libraries circa
1984 give or take a few years and has been obsolete and deprecated for
probably ten years. Everybody should be using <iostream.h> now. The
interface is slightly different in the details and hence the different
file name. But conceptually everything is the same and the odds are
good you could probably just swap the name from stream.h to iostream.h
and be fine everywhere.
Either this isn't true, or there is another problem with using
htDig on OS X 10.0.3 (or both...).
Where does the bus error occur? Can you get stack backtraces of the
various programs that crash, and if so, are they all failing at about
the same point?
I'll look into this, but I suspect it won't help until I find out
what I can do about stream.h missing.
Jerry
>
> During ./configure, I get a notice that Spinlocks are not supported
> on my system. However, the compilation process completes.
>
> SECOND TRY:
>
> Modified from OS X Server instructions at:
> http://www.stepwise.com/Articles/Workbench/2000-02-26.01.html
>
> mkdir htdig
> cd htdig
> wget http://www.htdig.org/files/htdig-3.1.5.tar.gz
> gunzip htdig-3.1.5.tar.gz
> tar -xvf htdig-3.1.5.tar
> wget
> http://www3.stepwise.com/Articles/Workbench/htdig-3.1.5-patch-macosx.tar.gz
> gunzip htdig-3.1.5-patch-macosx.tar.gz
> tar -xvf htdig-3.1.5-patch-macosx.tar
> patch -p 1 -d htdig-3.1.5 < htdig-3.1.5-patch-macosx
> cd htdig-3.1.5
> ./configure \
> --prefix=/Library/WebServer/htdig \
> --with-cgi-bin-dir=/Library/WebServer/CGI-Executables \
> --with-image-dir=/Library/WebServer/htdig/Images \
> --with-search-dir=/Library/WebServer/htdig/Documents/search \
> powerpc-apple-rhapsody5.5
> cd include
> ln -s /usr/include/gcc/darwin/2.95.2/g++/strstream.h stream.h
> cd ..
> make
> make install
>
>
> THIRD AND FOURTH TRY:
>
> I read the following in the FAQ:
>
> "Despite a great deal of debugging of these programs, we haven't been
> able to completely eliminate all such problems on all platforms. If
> you're running htsearch or htfuzzy on a BSDI system, a common cause
> of core dumps is due to a conflict between the GNU regex code bundled
> in htdig 3.1.2 and later, and the BSD C or C++ library. The solution
> is to use the BSD library's own regex code instead, as summarized by
> Joe Jah:"
>
> So I tried the following:
>
> * make clean
> * Remove references to regex.o from htlib/Makefile.
> * Remove htlib/regex.h.
> * Remove references to htlib/regex.h in htfuzzy/Makefile, which will
> be there if you have previously done a "make depends" (I hadn't, and
> they weren't)
> * make
>
>
> =====
> Again, each of these compiles, but I get a "Bus error" on running
> anything except htfuzzy.

