XBoard beta tar ball

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: XBoard beta tar ball

Post by Michel »

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.
Well given that the included gettext files are for 0.18 I think adding

GETTEXT_MACRO_VERSION=0.18

to configure.ac should be completely safe for 0.18 users.

It could conceivably create problems for 0.17 users (like me) but that seems not to be the case.

EDIT

Note that GETTEXT_MACRO_VERSION=0.18 does not specify a requirement.
It simply sets a variable which is then substituted into the various makefiles.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

Does this mean that the real problem is that we distribute gettext 0.18 with XBoard in the first place, rather than letting it use the corresponding files from the gettext that is installed on the host system (which ./configure assumes we will be using)? Perhaps these gettext files have accidentally leaked into git and the distribution tar ball, and without them everything would be fine, because ./autogen.sh would just generate them locally?

I did notice that when I use "gettextize -f" to cure this problem (something Tim recommended; don't ask me what it is supposed to do) I create tons of changes in all kind of git files, which leads to inability to switch branches because "the working tree is dirty". I then usually cure that again with a "git reset --hard HEAD", which apparently does not subvert the existing Makefile, so that I am OK until the next time ./autogen.sh is run (which sometimes happens automatically, when I switch to a very old branch).
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Code: Select all

Does this mean that the real problem is that we distribute gettext 0.18 with XBoard in the first place, rather than letting it use the corresponding files from the gettext that is installed on the host system (which ./configure assumes we will be using)? Perhaps these gettext files have accidentally leaked into git and the distribution tar ball, and without them everything would be fine, because ./autogen.sh would just generate them locally? 
Perhaps, but I doubt it. It seems the modus operandi for gettext is to bundle it with the tar ball and to tell autoconf which version you have bundled.

In principle autoconf should be able to autodetect the bundled version but that seems to be somewhat broken. Hence the problems.

autoreconf could correctly detect the bundled version but autogen.sh could not.....

The purpose of gettextize is to update the bundled version. If you do that you should
tell autoconf.

EDIT:

It actually makes some sense that autoconf does not detect the bundled version.
autoconf is there to detect features of the installation system, not features of your application.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

Well, if the files are expected to be bundled, I don't see any reason why the configure process would have to involve itself with them at all. We also don't generate make errors when a backend.c from 4.2.7 gets distributed with 4.6.1. (I am sure it would give plenty of compile errors, of course.)

As I understood it, configuring serves to determine what exactly you should use from the host system that was not distributed with the package.

Perhaps it is a mistake that gettext is mentioned in configure.ac altogether.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Well, if the files are expected to be bundled, I don't see any reason why the configure process would have to involve itself with them at all.
Well I guess for the same reason that it is involved with other source files. To tell them about properties of your system.

I agree that the design of gettext seems somewhat peculiar. Nonetheless I believe that this issue is now understood and solved.

Just to make sure: can you test that the configure.ac fix works for your system as well?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

Yes, it does work on my Ubuntu 10.04. But I still feel a bit queesy about it.

Apparently the macros used are what you have installed on your system (as determined by configure). The problem is that the Makefile.in.in seems to be version-specific in a non-backward-compatible way, and that make actually tests for this compatibility.

Now the solution you propose seems to fool configure into thinking your system has 0.18, whatever it has in reality. This seems to work when in reality you have 0.17 (as we do), and of course when you do actually have 0.18. But there is no guarantee that it would also work for people who have 0.16, or that it will continue to work when we all have 0.19.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

Apparently the macros used are what you have installed on your system (as determined by configure). The problem is that the Makefile.in.in seems to be version-specific in a non-backward-compatible way, and that make actually tests for this compatibility.
Are you sure? I think the macros are bundled (in the m4 directory).
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

No, I am not sure of anything. But if they are bundled, why does autoconf insist they are 0.17, and thus incompatible with the Makefile.in.in? And if they are bundled, what is their left to configure that is used from the host system? It should just trust that what we bundle should be used together.

Problem is that I have really no idea what these macros are for. Or the Makefile.in.in, for that matter. One assumes that there is some process that converts the latter to a Makefile.in, perhaps by expanding these macros?
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: XBoard beta tar ball

Post by Michel »

But if they are bundled, why does autoconf insist they are 0.17,
I think that is simply a bug. But as I said "autoreconf" could correctly detect them.
And if they are bundled, what is their left to configure that is used from the host system? It should just trust that what we bundle should be used together.

Problem is that I have really no idea what these macros are for. Or the Makefile.in.in, for that matter. One assumes that there is some process that converts the latter to a Makefile.in, perhaps by expanding these macros?
I don't really know....
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard beta tar ball

Post by hgm »

More fun:

Image