ddugovic / capablanca

An Internet Chess Server supporting Chess variants (based on Lasker-2.2.3)
http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=capablanca.git;a=summary
GNU General Public License v2.0
12 stars 7 forks source link

Runtime errors #1

Closed iw6dgm closed 8 years ago

iw6dgm commented 8 years ago

Linux deepnet-64 3.19.0-61-generic #69~14.04.1-Ubuntu SMP Thu Jun 9 09:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

dpkg -l | grep tdb ii libntdb1:amd64 1.0-2ubuntu1 amd64 New Trivial Database - shared library ii libqtdbus4:amd64 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 amd64 Qt 4 D-Bus module library ii libtdb-dev 1.3.8-0ubuntu0.14.04.1 amd64 Trivial Database - development files ii libtdb1:amd64 1.3.8-0ubuntu0.14.04.1 amd64 Trivial Database - shared library ii python-ntdb 1.0-2ubuntu1 amd64 Python bindings for NTDB ii python-tdb 1.3.8-0ubuntu0.14.04.1 amd64 Python bindings for TDB ii tdb-tools 1.3.8-0ubuntu0.14.04.1 amd64 Trivial Database - bundled binaries

./bin/chessd -p 5000 -T ./bin/timeseal_decoder-Linux-ELF-2.4 joshua@deepnet-64:~/chess/chessd$ CHESSD: Initialized on port 5000 ./bin/chessd: symbol lookup error: ./lib/chessd.so: undefined symbol: tdb_open

and chessd exits. Can't figure out why it can't find tdb_open....

Thanks in advance for any advice.

ddugovic commented 8 years ago

Oh wow, I thought Capablanca development had stagnated. I need to merge those upstream changes and test...

EDIT: I merged upstream changes and see that now chessd provides its own tdb library instead of the standard libtdb. I haven't yet figured out how properly to use timeseal but at least the server runs...

iw6dgm commented 8 years ago

Hi Daniel, Thanks for your prompt reply. Now chessd would not compile unless I strip out "-m32" in the auto-generated Makefile (I think it is because I run a x86_64 arch). Even if it does compile afterwards it crashes with Sat Jul 9, 11:02 BST 2016 CHESSD: Can't read ratings data! Sat Jul 9, 11:02 BST 2016 CHESSD: Can't write wild style 1 Sat Jul 9, 11:02 BST 2016 CHESSD: Can't write wild style 3 Sat Jul 9, 11:02 BST 2016 CHESSD: Can't write wild style 4 Sat Jul 9, 11:02 BST 2016 Could not open ECO file errors, and creates some weird file with gibberish filename. I suppose there's something wrong related with 32/64 bit architectures... That happens even if I try to run chessd with imported data (players, ratings, ...). N.B.: In ficsmain.c there's a static reference to /home/mics/bin/backtrace which is probably wrong.

Thank you!

ddugovic commented 8 years ago

Oops, I forgot to provide some information about my machine for comparison. Somehow ./configure && make works for me, though if that fails maybe try autoconf && ./configure && make?

$ uname -a
Linux dugovic-host 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I did add a chessd user on my system and chown'd the resulting directory after make install.

ddugovic commented 8 years ago

Oh, also after quite some digging I found that Ubuntu 16 doesn't have bcrypt for encryption so you need to link with mcrypt instead.

EDIT: I'm not sure how I got this project to configure or compile correctly... I'll see if I can provide clearer instructions.

iw6dgm commented 8 years ago

Still having same issues. Anyway, I have probably forgotten to mention that I did configure with --prefix=$HOME/chess. ($HOME/chess/cheesd folder is clean). Strange to say, I have this project (a slightly older version) running on a 32 bit Ubuntu with data (players, rankings, games,...) from the original FICS source code (v1.7.4). (I do have Ubuntu 14.04.3 running, so bcrypt should be there...)

ddugovic commented 8 years ago

Now that I removed -m32 I'm having all kinds of runtime errors, such as:

chessd@dugovic-host:/usr/local/chessd$ bin/chessd -f -p 5000
CHESSD: Initialized on port 5000
Sat Jul  9, 06:44 CDT 2016 CHESSD: Loaded 166 commands (admin=46 normal=120)
Sat Jul  9, 06:44 CDT 2016 CHESSD: Can't read ratings data!
Sat Jul  9, 06:44 CDT 2016 Could not open ECO file

I'm curious why, so I'll continue investigating...

ddugovic commented 8 years ago

Well, there are so many compiler warnings that it's difficult to see the forest through the trees! At least now we're logging the error and it's obvious that utils.c is to blame, although I don't understand how.