GNOME Bugzilla – Bug 520599
Check for ggz is wrong
Last modified: 2012-01-31 23:29:34 UTC
checking for GGZ library version: 0.0.14... no configure: error: The GGZ version is too old. Version 0.0.14 is required. But I do have version 0.0.14 installed. configure:26679: result: yes (libraries /gnome/usr/lib, headers /gnome/usr/include) configure:26717: checking for GGZ library version: 0.0.14 configure:26747: gcc -o conftest -g -O1 -L/gnome/usr/lib -L/usr/local/lib conftest.c >&5 conftest.c:40:17: error: ggz.h: No such file or directory conftest.c: In function 'main': conftest.c:44: error: 'LIBGGZ_VERSION_MAJOR' undeclared (first use in this function) conftest.c:44: error: (Each undeclared identifier is reported only once conftest.c:44: error: for each function it appears in.) conftest.c:44: error: 'LIBGGZ_VERSION_MINOR' undeclared (first use in this function) conftest.c:44: error: 'LIBGGZ_VERSION_MICRO' undeclared (first use in this function) It looks like it doesn't try to include files from /gnome/usr/include
Josef, do you know why this probblem occurs?
This is a known problem that has been fixed in a more recent ggz.m4 than gnome-games includes. I think we've made more updates to ggz.m4 than gnome-games have, so the easiest solution is probably to get the latest ggz.m4 and copy the gnome modifications over to it. As far as I can tell, this essentially means adding the following to the new ggz.m4: # AC_GGZ_CHECK_SERVER_DEFINES AC_DEFUN([AC_GGZ_CHECK_SERVER_DEFINES],[ AM_CONDITIONAL([GGZ_SERVER],[test "$ggz_server" = "yes"]) ]) I verified the problem on an ubuntu feisty install and then made this change (and updated the other m4 files that gnome-games uses from ggz for good measure) and it detected libggz correctly.
Created attachment 106837 [details] [review] Preliminary ggz.m4 patch This patch is a result of taking ggz.m4 from ggz trunk (revision 9724) and merging the gnome-games changes with it. I'm reasonably certain I've got everything correct, but it could do with some good testing.
The patch looks good. We'll need releaseteam approval to commit it now though.
I've tested the patch with gcc 4.3 (on opensuse-factory) with libggz and ggz-client-libs installed to /home/roger/local and gnome-games also installing to the same location. It worked fine (I verified that I had the same problem as Vincent before applying the patch). I also tried installing gnome-games to /home/roger/local2 (where ggz did not exist) but only selecting aisleriot to be compiled to check that ggz was not required in that case. That also worked fine.
Wouldn't it be much simpler to have pkg-config files for ggz?
(In reply to comment #6) > Wouldn't it be much simpler to have pkg-config files for ggz? Yes. Yes it would. The original GGZ bootstrapping code predates the widespread adoption of pkg-config, so using it was never considered. However I see no reason why converting to pkg-config would not make everything far, far easier. -jason
We can introduce pkg-config files but would still need the current checks in cases of pkg-config not being found. For a comparison, we regularly notice compilation issues from people who don't have gettext installed. I doubt that pkg-config is present on more systems than gettext is. So while it may be widespread, I don't think it's omnipresent, especially outside of the Linux world.
Patch applied to SVN trunk, so now the ggz.m4 in gnome-games is in sync with the one in GGZ trunk. Using pkg-config in GGZ still seems like a good idea, though... http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=7546
*** Bug 510917 has been marked as a duplicate of this bug. ***
*** Bug 521191 has been marked as a duplicate of this bug. ***
This bug is being reassigned to the "general" component so we can close the ggz bugzilla component. Apologies for the mass email!