bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Compile latest version under Windows


From: Jim Segrave
Subject: Re: [Bug-gnubg] Compile latest version under Windows
Date: Tue, 26 Nov 2002 19:30:20 +0100
User-agent: Mutt/1.4i

On Tue 26 Nov 2002 (17:24 +0100), Holger wrote:
> Jim Segrave wrote:
> > On Tue 26 Nov 2002 (16:37 +0100), Holger wrote:
> > > Hi,
> > > 
> > > I'm having problems compiling the CVS version. It fails with:
> > > 
> > > eval.o(.text+0x89d):eval.c: undefined reference to `BearoffInitBuiltin'
> > > 
> > > I do have bearoff.c and .o in SOURCES and OBJS in Makefile,
> > respectively. It
> > > seems that there is no function definition in bearoff.c, only the
> > > declaraction in bearoff.h.
> > > 
> > Does your makefile include br1.c in COMMON_SOURCES? That's where the
> > function is defined. 
> 
> I don't have the file. I think the ./configure procedure doesn't work well
> on Windows. I've heard, though, that a few people have had success. And I
> think Nardy is trying this with MinGW and MSYS.
> 
> > If br1.c doesn't exist, it is constructed by doing:
> > 
> > br1.c:  makebearoff makebearoff1
> >     if [ ! -f br1.c ]; then \
> >        ./makebearoff -o 6 -s 7999999 | ./makebearoff1 -o br1.c; \
> >     fi
> > 
> > Try running makebearoff -o 6 -s 7999999 | makebearoff1 -o br1.c
> > and seeing if you get a reasonable looking br1.c, including the
> > missing function.
> 
> Ok. Unfortunately, I still don't know that much about Makefiles. But I'll
> try to make up one that works for me.

I think we might need some input from Joern here.
br1.c is under CVS, but that version doesn't have the static data
table in it (it's only a few lines long). So if make runs, the
if [ ! -f br1.c ]; then \
  ./makebearoff -o 6 -s 7999999 | ./makebearoff1 -o br1.c; \
fi

will not execute and br1.c doesn't get rebuilt. If you remove it, it
does get rebuilt with the data installed. I'm not sure if br1.c should
be under CVS (or, if so, if it should be one that's been built via
running makebearoff). Joern can say whether or not it's necessary to
have the bearoff database compiled into br1.c. If you want to build a
br1.c with a database, some more work is needed:

I don't know if constructs like 
  if [ ! -f br1.c ]; then
are supported in a Windows build environment. 

If not, then maybe:

Start with a copy of (it's short) br1.c. You may already have it, if
not, it's under CVS
If you don't want to get a fresh copy of makebearoff.c from CVS, then
check that the version you have at about lines 1205 and 1210 don't
have:
"Number of positions    :%'12d\n"
and
"Size of cache          :%'12d\n"

(The single quotes between the % and the 12 are 'not a good thing' and
should be deleted)

Then you need to fix (or get a copy from CVS when I check it in, I'm
testing a build now) of makebearoff1.c.

At line 188, change it from:
      fprintf ( pfOut, "0x%02hhX, ", ac[ i ] );
to:
      fprintf ( pfOut, "0x%02hhX, ", (ac[ i ] & 0xff) );
or you may get a few thousand warnings from your compiler about
implicit truncation of an int to unsigned character.

Comment out with a leading '#' the lines in your Makefile which read:

br1.c:  makebearoff makebearoff1
        if [ ! -f br1.c ]; then \
           ./makebearoff -o 6 -s 7999999 | ./makebearoff1 -o br1.c; \
        fi

add br1.c to COMMON_SOURCES

Do a make.
Then do:
c:> makebearoff -o 6 -s 7999999 | makebearoff1 -o br1.c

Do another make, this time it will spend a minute or so compiling
br1.c, which will be about 10MB in size. 

But I'm not sure if you need br1.c to include this database or whether
it does the right thing without it?

Joern?

PS: also to Joern - the README talks about gnubg_ts1.bd, but gnubg
warns about gnubg_ts0.bd. 



-- 
Jim Segrave           address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]