On Thu, Nov 25, 2010 at 16:03, Erik Faye-Lund <kusmabite@xxxxxxxxx> wrote: > I'm really not thinking straight today: This was in the MSVC-section, > and I tried to build with MinGW. If I move it to the MinGW section, > then it's closer to working: > > $ make > Â ÂCC alias.o > Â ÂCC alloc.o > <...> > Â ÂCC gettext.o > gettext.c:3:21: error: libintl.h: No such file or directory > gettext.c:7:22: error: langinfo.h: No such file or directory > gettext.c: In function 'git_setup_gettext': > gettext.c:17: warning: implicit declaration of function 'bindtextdomain' > gettext.c:25: error: 'LC_MESSAGES' undeclared (first use in this function) > gettext.c:25: error: (Each undeclared identifier is reported only once > gettext.c:25: error: for each function it appears in.) > gettext.c:30: warning: implicit declaration of function 'nl_langinfo' > gettext.c:30: error: 'CODESET' undeclared (first use in this function) > gettext.c:30: warning: assignment makes pointer from integer without a cast > gettext.c:32: warning: implicit declaration of function 'bind_textdomain_codeset > ' > gettext.c:34: warning: implicit declaration of function 'textdomain' > make: *** [gettext.o] Error 1 > > So this seems to be the same issue as what Hannes is talking about; > gettext.o being included into LIB_OBJS before we know if it should or > not. > > Moving it down to the rest of the NO_GETTEXT-magic fixes the problem for me: > > > diff --git a/Makefile b/Makefile > index 8357106..a858708 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,6 +1,5 @@ > Â# The default target of this Makefile is... > Âall:: > - > Â# Define V=1 to have a more verbose compile. > Â# > Â# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken. > @@ -628,9 +627,6 @@ LIB_OBJS += entry.o > ÂLIB_OBJS += environment.o > ÂLIB_OBJS += exec_cmd.o > ÂLIB_OBJS += fsck.o > -ifndef NO_GETTEXT > -LIB_OBJS += gettext.o > -endif > ÂLIB_OBJS += graph.o > ÂLIB_OBJS += grep.o > ÂLIB_OBJS += hash.o > @@ -1603,6 +1600,8 @@ endif > > Âifdef NO_GETTEXT > Â Â Â ÂCOMPAT_CFLAGS += -DNO_GETTEXT > +else > + Â Â Â LIB_OBJS += gettext.o > Âendif > > Âifdef NEEDS_LIBINTL Doesn't it also work for you to just add: NO_GETTEXT = YesPlease NEEDS_LIBINTL = To the MinGW specific section in the Makefile? That's why I did the "Makefile: move "Platform specific tweaks" above LIB_{H,OBJS}" patch. I just hadn't submitted another patch to disable it on MinGW. I think I asked someone to look into that (e.g. I know that you're working on MinGW + gettext, so maybe we don't want to disable it anymore). But I can't find that posting now, and maybe I didn't send it. Anyway, if that works it's a cleaner way to disable it. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html