Can't compile new egbbso.so for Linux

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Can't compile new egbbso.so for Linux

Postby Volker Pittlik » 26 Jul 2009, 05:06

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
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

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

Postby Daniel Shawul » 26 Jul 2009, 18:16

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
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

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

Postby Volker Pittlik » 26 Jul 2009, 18:42

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
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

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

Postby Daniel Shawul » 26 Jul 2009, 18:56

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 :)
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

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

Postby Volker Pittlik » 27 Jul 2009, 06:51

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
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 13 guests