Page 1 of 1

Can't compile new egbbso.so for Linux

PostPosted: 26 Jul 2009, 05:06
by Volker Pittlik
When trying to compile (64 bit Linux, Ubuntu 8.04) the new egbbso.so (v 3.3) I get the error

Code: Select all
volker@vpittlik:~/schach/scorpio/egbb33/egbbdll$ make
g++ -O3  -c -fPIC index_new.cpp
index_new.cpp: In function »void init_indices()«:
index_new.cpp:83: Fehler: »abs« wurde in diesem Gültigkeitsbereich nicht definiert
index_new.cpp:141: Fehler: »abs« wurde in diesem Gültigkeitsbereich nicht definiert
make: *** [index_new.o] Fehler 1


what means that "abs" is not defined although common.h (where abs is defined) is included in index_new.cpp.
(Commenting or uncommenting this "USESPINLOCK" thing has nothing to do with it.)

Any suggestions?

vp

Re: Can't compile new egbbso.so for Linux

PostPosted: 26 Jul 2009, 18:16
by Daniel Shawul
Hi Volker
#include <stdlib.h> at the beginning of the index_new.cpp file. I haven't tried but
I think that should work.

regards

Re: Can't compile new egbbso.so for Linux

PostPosted: 26 Jul 2009, 18:42
by Volker Pittlik
That has an effect. The error is gone. However, the next one occurs:

Code: Select all
volker@vpittlik:~/schach/scorpio/egbb33/egbbdll$ make
g++ -O3  -c -fPIC index_new.cpp
g++ -O3  -c -fPIC decompress.cpp
g++ -O3  -c -fPIC codec.cpp
g++ -O3  -c -fPIC cache.cpp
cache.cpp: In member function »void LRU_CACHE::add(INFO*)«:
cache.cpp:77: Fehler: »memcpy« wurde in diesem Gültigkeitsbereich nicht definiert
cache.cpp:117: Fehler: »memcpy« wurde in diesem Gültigkeitsbereich nicht definiert
make: *** [cache.o] Fehler 1


This time it says "memcpy" is undefined. It seems it has to do something with the standard libraries.

vp

Re: Can't compile new egbbso.so for Linux

PostPosted: 26 Jul 2009, 18:56
by Daniel Shawul
Somehow i must have forgotten to include the necessary header files. I don't know why it works for me
on MSVC. Anyway try to include the following headers in "common.h" and see what happens

#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <csignal>
#include <cctype>
#include <ctime>
#include <cmath>
#include <sys/timeb.h>

There shouldn't be any problem with all those headers :)

Re: Can't compile new egbbso.so for Linux

PostPosted: 27 Jul 2009, 06:51
by Volker Pittlik
Daniel Shawul wrote:... Anyway try to include the following headers in "common.h" and see what happens...


It was leading to a similar error (something else was undefined). I noticed "common.h" was not included in cache.h. I did so but now I get:

Code: Select all
volker@vpittlik:~/schach/scorpio/egbb33/egbbdll$ make clean; make
rm -rf egbbdll.o moves.o index_new.o decompress.o codec.o cache.o
g++ -O3  -c -fPIC egbbdll.cpp
g++ -O3  -c -fPIC moves.cpp
g++ -O3  -c -fPIC index_new.cpp
g++ -O3  -c -fPIC decompress.cpp
g++ -O3  -c -fPIC codec.cpp
g++ -O3  -c -fPIC cache.cpp
In file included from cache.h:5,
                 from cache.cpp:1:
common.h:250: Fehler: »INFO« bezeichnet keinen Typ
common.h:347: Fehler: »LRU_CACHE« bezeichnet keinen Typ
make: *** [cache.o] Fehler 1


saying "INFO" and "LRU_CACHE" are no types. It's getting a bit confusing now.

Regards
vp