Page 1 of 1

error compiling hgmaster on mac

PostPosted: 15 May 2011, 02:04
by Josh Pettus
Hi, all of a sudden i am having difficulty compiling the hgmaster branch on mac. When I run the ./autogen.sh script I get:
Code: Select all
Me-MacBook-Pro:xboard-36aefa2 me$ ./autogen.sh
configure.ac:79: warning: macro `AM_GNU_GETTEXT_VERSION' not found in library
configure.ac:80: warning: macro `AM_GNU_GETTEXT' not found in library
configure.ac:161: installing `./config.sub'
configure.ac:72: installing `./compile'
configure.ac:34: installing `./missing'
configure.ac:161: installing `./config.guess'
Makefile.am: installing `./depcomp'
Makefile.am:49: installing `./mdate-sh'
Makefile.am:49: installing `./texinfo.tex'
configure.ac:79: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:80: error: possibly undefined macro: AM_GNU_GETTEXT


I know it works in fine in linux.
Any ideas?

Re: error compiling hgmaster on mac

PostPosted: 15 May 2011, 06:57
by H.G.Muller
Arun is working on getting the internationalization to work with XBoard, and I regularly synchronize hgmaster with GNU-Savannah master nowadays. There is a compiler switch USE_NLS that controls this, but I am not sure how exactly it should be used (and i somehow doubt it would already work at the autogen.sh level).

But I think the error should go away when you install the package 'gettext'.

Re: error compiling hgmaster on mac

PostPosted: 15 May 2011, 07:37
by Josh Pettus
Odd, I installed gettext 0.18.1.1_2 via macports and gave me the same error. i'm sure the problem is on my end with my setup. I'll have to take a closer look at it tomorrow.

Re: error compiling hgmaster on mac

PostPosted: 24 May 2011, 16:35
by Josh Pettus
I still don't get it. I tried it from Fink as well which the package actually recognized as being there. But unfortunately it is still at 0.17 which xboard won't except. So it's back to macports. (which I don't like as much anyway cause the way it installs packages) Is there something I have to do with autoconf?

Re: error compiling hgmaster on mac

PostPosted: 28 May 2011, 02:21
by arun
can you try to edit configure.ac and change the 0.18... to your 0.17 version and run autogen.sh afterwards? perhaps then your fink package will work...

Re: error compiling hgmaster on mac

PostPosted: 28 May 2011, 07:36
by Josh Pettus
I get through the error in ./configure but I get another one in make

Code: Select all
Making all in po
*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.17
make[2]: *** [check-macro-version] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Re: error compiling hgmaster on mac

PostPosted: 28 May 2011, 14:30
by Josh Pettus
There, I simply copied/replaced gettext 18.1 from macports over the fink install and it worked. Did it manually. Macports installs in your /usr/local/bin and fink installs everything in a /sw folder so as not to interfere with your other unix stuff including xcode tools.

Re: error compiling hgmaster on mac

PostPosted: 25 Oct 2011, 21:27
by Josh Pettus
Well I've had to throw in the towel, this same problem has plagued me for months, ever since I upgraded to Lion. I have tried everything, installing gettext from fink, macports, homebrew, even source. It installs just fine. I type gettext in terminal and it loads up. Except that for some reason autoconf isn't finding it in the "library" or whatever

"configure.ac:79: warning: macro `AM_GNU_GETTEXT_VERSION' not found in library
configure.ac:80: warning: macro `AM_GNU_GETTEXT' not found in library"

I saw you lowered the requirement to 0.17 but now I cant even get that :?

As you said it can't be disabled at the ./autogen.sh level

I don't know...

Re: error compiling hgmaster on mac

PostPosted: 26 Oct 2011, 07:44
by H.G.Muller
A 'warning' is not supposed to be fatal, is it? Does something go wrong when you try to ./configure anyway?

I will point out the problem to Arun.

Re: error compiling hgmaster on mac

PostPosted: 26 Oct 2011, 12:59
by John Cheetham
"configure.ac:79: warning: macro `AM_GNU_GETTEXT_VERSION' not found in library
configure.ac:80: warning: macro `AM_GNU_GETTEXT' not found in library"


I got this warning when compiling savannah master on Fedora 15.

I changed the first line of autogen.sh from:
Code: Select all
aclocal \

to
Code: Select all
aclocal -I m4\


then the warning went away.

Re: error compiling hgmaster on mac

PostPosted: 27 Oct 2011, 01:57
by Josh Pettus
Unfortunately it is fatal :(
As configure will then fail even if I try to disable gettext

"./configure: line 3923: syntax error near unexpected token `0.17'
./configure: line 3923: `AM_GNU_GETTEXT_VERSION(0.17)'"

But on the bright side that trick worked perfectly John! Thank-you so much!

I'm back in business. :D

Re: error compiling hgmaster on mac

PostPosted: 03 Nov 2011, 07:42
by arun
Hi

I'll try to look into this... just to make sure in fink you installed the gettext and the gettext-dev? Can you check if you have the file gettext.m4 somewhere in your aclocal path? On my system it's in /usr/share/aclocal/gettext.m4. AFAIK this is the file that defines the macros that seems to be missing on your computer.

Feel free to email me offline if you want to (arun@nubati.net)

Arun

Re: error compiling hgmaster on mac

PostPosted: 03 Nov 2011, 14:58
by Josh Pettus
Hi Arun,

Thank-you so much for looking into this. You are right, that file was missing from my computer. But now that I know what to look for, I was able to rdl the source and just copy that file into the ../aclocal folder appropriately. (wonder why this wasn't done with "make install") :? Unfortunately a mac gettext-dev does not exist on macports or homebrew, and even on fink is not available for 10.7. (even they are out of date) It was one of the first things I was searching for, but couldn't find.

Re: error compiling hgmaster on mac

PostPosted: 05 Nov 2011, 20:55
by arun
Does XBoard compile now that you have that file? Strange that macport and fink are not up to date on gettext, seems to me that lots of other software also would need this file to be able to just even run the configure process..

Arun

Re: error compiling hgmaster on mac

PostPosted: 06 Nov 2011, 05:08
by Josh Pettus
Yup it compiles now, thanks.

Macport is up to date
save missing the gettext-dev package

its just fink that isn't
which has gettext-dev but also out of date.
:\