XBoard beta tar ball

Discussion of chess software programming and technical issues.

Moderator: Ras

Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Great!!!

I verified that it works.

This patch finally removes one of my frustrations when using xboard (the unpredictable behaviour when engine startup fails).

I have not used the TM feature of xboard yet so I cannot comment on that.

BTW. Something OT.

./autogen.sh

did not work for me (gettext issues).

However

autoreconf

did the job. It seems autoreconf is a bit more robust.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Not sure if this is the intended behaviour but it seems killing the engine manually
(with the kill command) still make xboard exit as well (after displaying a proper popup).
User avatar
hgm
Posts: 28444
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

I think this could be called intentional. Guided by the policy of minimal change, I left the error handling as it was (i.e. a fatal error) except in frequenty occurring situations where this was clearly undesirable: failure to start the engine (which became a switch to -ncp mode), or engine exit during a tournament (which just goes on with the next game).

I am not claiming that this is optimal. I just never thought much about it.

As to ./autogen.sh:

Do you also have this annoying version problem: every time I use autoge.sh, a subsequent make will fail with the complaint of a gettext version mismatch (v 0.18 vs 0.17). My guess it that this is really a packaging error, where we distribute some gettext file that explicitly mentions 0.18, rather than leaving it to configure to decide which gettext version we have, and use that.

But I know virtually nothing about autoconf matters, and for Arun, who handles this, this is not a problem, as he has gettext 0.18 on his machine...
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Well it turned out that I did not have gettext-devel installed (I am on CentOS now). After fixing that, ./autogen.sh worked.
Curiously autoreconf managed to do things without gettext-devel (I guess it somehow disabled gettext).

EDIT:

I was too fast. While ./autogen.sh and ./configure worked, make did not (0.18 vs 0.17 issue).

With autoreconf everything worked....
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

It seems autoreconf overrules the

AM_GNU_GETTEXT_VERSION(0.17)

in configure.ac and produces a configure with

GETTEXT_MACRO_VERSION=0.18

Why it does that I have no idea....
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

My guess it that this is really a packaging error, where we distribute some gettext file that explicitly mentions 0.18, rather than leaving it to configure to decide which gettext version we have, and use that.
Well something like that must be true

fgrep -R 0.18 *

on a fresh checkout from Savannah returns

Code: Select all

m4/lib-ld.m4:# lib-ld.m4 serial 4 (gettext-0.18)
m4/iconv.m4:# iconv.m4 serial 11 (gettext-0.18.1)
m4/po.m4:# po.m4 serial 17 (gettext-0.18)
m4/po.m4:  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
m4/lib-link.m4:# lib-link.m4 serial 21 (gettext-0.18)
m4/nls.m4:# nls.m4 serial 5 (gettext-0.18)
m4/progtest.m4:# progtest.m4 serial 6 (gettext-0.18)
m4/lib-prefix.m4:# lib-prefix.m4 serial 7 (gettext-0.18)
m4/gettext.m4:# gettext.m4 serial 63 (gettext-0.18)
po/Makefile.in.in:# Origin: gettext-0.18
po/Makefile.in.in:GETTEXT_MACRO_VERSION = 0.18
So plenty of 0.18 stuff.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

But I know virtually nothing about autoconf matters, and for Arun, who handles this, this is not a problem, as he has gettext 0.18 on his machine...
I am not so sure that the installed version really matters. I think xboard uses an internal version of gettext.

I replaced 0.17 by 0.18 in po/Makefile (after running ./autogen.sh and ./configure and suddenly everything worked).

Curiously replacing
AM_GNU_GETTEXT_VERSION(0.17)
by
AM_GNU_GETTEXT_VERSION(0.18)
in configure.ac has no effect. This is consistent with the manual which says that this statement is optional.
User avatar
hgm
Posts: 28444
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

The last one seems the culprit. (The rest is just comment lines, starting with '#'?)

When I load a fresh tar ball from git, change 0.18->0.17 in po/Makefile.in.in, and then do

./autogen.sh
./configure
make

I have no problems. The make completes, and the ./xboard I get can be run in Danish.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Yep. And another fix is to add

GETTEXT_MACRO_VERSION=0.18

to configure.ac. Like this
dnl| add gettext support
AM_GNU_GETTEXT_VERSION(0.17)
AM_GNU_GETTEXT([external])
GETTEXT_MACRO_VERSION=0.18
(probably the AM_GNU_GETTEXT_VERSION(0.17) can be deleted).

After that ./autogen.sh ./configure make works.

It seems the actual version of gettext is completely unimportant.

EDIT:

Yep, the following is sufficient
dnl| add gettext support
AM_GNU_GETTEXT([external])
GETTEXT_MACRO_VERSION=0.18
User avatar
hgm
Posts: 28444
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

The question, however, is whether making this change would now spoil it for people that actually have gettext 0.18 installed on their system. In that case we would have just swapped one problem for another.

That the actual version does not matter is not very surprising, as we are using only the most basic functionality, that 0.01 probably already had. One can hope, of course, that there is some backward compatibility here, where one only has to specify the minimally required version, and that a higher version number would automatically be OK.

[edit]: apparently not! When I change the number in Makefile.in.in to 0.16, it still complains that 0.16 != 0.17.

What I don't understand is that when I change the AM_GNU_GETTEXT_VERSION(0.17) into 0.18, keeping 0.18 in the Makefile.in.in, it still complains that 0.17 != 0.18. Apparently it still takes what I have then, and not what I specify.
Last edited by hgm on Wed Apr 11, 2012 4:01 pm, edited 1 time in total.