Current syzygy master compile error

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12539
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Current syzygy master compile error

Post by Dann Corbit »

Code: Select all

gcc -pthread -O3 -march=native -pipe -D_GNU_SOURCE -Wall -std=c11 -Wno-array-bounds -flto -c decompress.c -DMAGIC -DUSE_POPCNT -DTBPIECES=7 -DREGULAR -o objsr/decompress.o
In file included from decompress.h:10:0,
                 from decompress.c:15:
probe.h:151:46: error: unknown type name 'bitboard'
 int probe_tb(int *pieces, int *pos, int wtm, bitboard occ, int alpha, int beta);
                                              ^~~~~~~~
make[1]: *** [Makefile.general:30: decompress.o] Error 1
make[1]: Leaving directory 'F:/project/dcorbit/tb-master/src'
make: *** [Makefile:36: rtbver] Error 2
I just added types.h to probe.h:

Code: Select all

/*
  Copyright (c) 2011-2016, 2018 Ronald de Man

  This file is distributed under the terms of the GNU GPL, version 2.
*/

#ifndef PROBE_H
#define PROBE_H
#include "types.h"
#include "defs.h"

#define TBPIECES 7

#if defined(SUICIDE)
and it compiled fine.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

Re: Current syzygy master compile error

Post by noobpwnftw »

It seems to missed the

Code: Select all

#include "types.h"
prior to including decompress.h in tbver, which then includes probe.h that needs the definitions.

You could raise an issue there.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Current syzygy master compile error

Post by syzygy »

noobpwnftw wrote:You could raise an issue there.
Indeed. Why start a thread on talkchess about a simple compilation error?
frankp
Posts: 228
Joined: Sun Mar 12, 2006 3:11 pm

Re: Current syzygy master compile error

Post by frankp »

Did you include the path to the src directory?
I added this to bash.rc and it compiled.
Before I added typedef unit_64 bitboard (or whatever is was) to the source, did the trick.