bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

0.14.5 minor build problems on IRIX


From: Tim Mooney
Subject: 0.14.5 minor build problems on IRIX
Date: Sun, 17 Jul 2005 20:16:58 -0500 (CDT)


[I'm not subscribed to bug-gnu-gettext, please Cc: me on any responses]

I've just finished building GNU gettext 0.14.5 on mips-sgi-irix6.5
(IRIX 6.5.26f, mips4, in 64 bit mode), with the vendor C and C++ compilers
(MIPSPro v7.4 for both).  I ran into several minor roadblocks, and thought
I would report them.

- po-lex.c fails to build when using CC=c99 or (CC=cc and CFLAGS='-c99').
  This is because of the two variadic macros:

cc-1054 c99: ERROR File = po-lex.c, Line = 458
  There are not enough arguments in a macro invocation.

            po_gram_error (_("invalid multibyte sequence"));
                                                          ^

cc-1054 c99: ERROR File = po-lex.c, Line = 487
  There are not enough arguments in a macro invocation.

  incomplete multibyte sequence at end of file"));
                                                ^

(additional errors elided).  Building with CC=cc and CFLAGS='-xansi'
didn't encounter this error.

- gettext-runtime/libasprintf/autosprintf.cc fails to build with the
  vendor C++ compiler, CC:

 CC -DHAVE_CONFIG_H -I. -I. -I. -g -c autosprintf.cc  -DPIC -o
.libs/autosprintf
.o
cc-1020 CC: ERROR File = vasprintf.h, Line = 48
  The identifier "va_list" is undefined.

  extern int vasprintf (char **result, const char *format, va_list args)
                                                           ^

cc-1020 CC: ERROR File = autosprintf.cc, Line = 41
  The identifier "va_list" is undefined.

      va_list args;
      ^

cc-1065 CC: ERROR File = autosprintf.cc, Line = 41
  A semicolon is expected at this point.

      va_list args;
              ^

cc-1020 CC: ERROR File = autosprintf.cc, Line = 42
  The identifier "args" is undefined.

      va_start (args, format);
      ^

4 errors detected in the compilation of "autosprintf.cc".


This is apparently caused because autosprintf.cc includes <stdarg.h> too
late; something in one of the earlier C++ header files <iostream> or
<string> (included by autosprintf.h, which happens before <stdarg.h>) is
causing most of <stdarg.h> to be hidden.

The following patch fixed this problem for me.


--- gettext-0.14.5.orig/gettext-runtime/libasprintf/autosprintf.cc      
2005-05-20 15:12:23.000000000 -0500
+++ gettext-0.14.5.hacked/gettext-runtime/libasprintf/autosprintf.cc    
2005-07-16 23:58:23.758532393 -0500
@@ -24,12 +24,13 @@
 # define _GNU_SOURCE    1
 #endif

-/* Specification.  */
-#include "autosprintf.h"
-
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
+
+/* Specification.  */
+#include "autosprintf.h"
+
 #include "lib-asprintf.h"

 namespace gnu






- The install fails in the gettext-tools/examples directory, because
  the EXAMPLESFILES used in the for loop in the install-data-local target
  overflows the maximum command line limit.

Tim
--
Tim Mooney                              address@hidden
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164




reply via email to

[Prev in Thread] Current Thread [Next in Thread]