[nhc-bugs] Problem compiling with nhc98 for Windows NT using Tracer

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 1 Aug 2001 10:53:05 +0100


> nhc98 (configuration for Win NT, latest cygwin release)
> hmake -T aborts with the following error message:
>
> nhc98  -T   -o testHAT testHAT.T.o
> E:/Programme/nhc98-1.06/lib/ix86-CYGWIN_NT-4.0/libdebugT.a(browsercomms.o)(.text+0x1af8):browsercomms.c: undefined reference to `re_comp'
>
> I assume something went wrong during the installation!?

No, it would appear that Cygwin either doesn't have the regexp library,
or requires it as an extra link library on the commandline.

As it happens, we no longer use regexps anyway, so the easiest fix is
just to delete/comment-out the obsolete piece of code.  (It has already
been removed in the CVS tree.)

In src/tracer/runtime/browsercomms.c, find the function defined with:

    C_HEADER(cInitializeDebugger)

and delete or comment-out the following paragraph:

    if ((regexp = getenv("TRACE_BPREGEXP")) != NULL) { 
        char *errmsg = (char *)re_comp(regexp);
        if (errmsg != NULL) {
            fprintf(stderr, "Bad regular expression in TRACE_BPREGEXP: %s", 
                    errmsg);
            exit(1);
        }
        trace_bpregexp = TRUE;
    }
    
Then, rebuild the tracer runtime system with `make tracer' or just
`make traceruntime' (and re-install with `make install' if necessary).

Regards,
    Malcolm