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

Bug#226509: apt: FTBFS when configured with --disable-nls



On Tue, Jan 06, 2004 at 07:17:58PM -0800, Eric Wong wrote:

> Package: apt
> Version: 0.5.20
> Severity: wishlist
> 
> I get the following error when building after I've configured apt with
> --disable-nls  (I'm building this for a Solaris install, but the same
> error occurs under i386).
> 
> Compiling contrib/extracttar.cc to /home/eric/.apt-fu/sources/a/apt/apt-0.5.20/obj/apt-inst/extracttar.opic
> In file included from /usr/include/c++/3.3/clocale:49,
>                  from /usr/include/c++/3.3/i486-linux/bits/c++locale.h:41,
>                  from /usr/include/c++/3.3/iosfwd:46,
>                  from /usr/include/c++/3.3/bits/stl_algobase.h:70,
>                  from /usr/include/c++/3.3/memory:54,
>                  from /usr/include/c++/3.3/string:48,
>                  from /home/eric/.apt-fu/sources/a/apt/apt-0.5.20/include/apt-pkg/fileutl.h:28,
>                  from /home/eric/.apt-fu/sources/a/apt/apt-0.5.20/include/apt-pkg/extracttar.h:21,
>                  from contrib/extracttar.cc:23:
> /usr/include/locale.h:125: error: syntax error before `throw'
> In file included from /usr/include/c++/3.3/i486-linux/bits/c++locale.h:41,
>                  from /usr/include/c++/3.3/iosfwd:46,
>                  from /usr/include/c++/3.3/bits/stl_algobase.h:70,
>                  from /usr/include/c++/3.3/memory:54,
>                  from /usr/include/c++/3.3/string:48,
>                  from /home/eric/.apt-fu/sources/a/apt/apt-0.5.20/include/apt-pkg/fileutl.h:28,
>                  from /home/eric/.apt-fu/sources/a/apt/apt-0.5.20/include/apt-pkg/extracttar.h:21,
>                  from contrib/extracttar.cc:23:
> /usr/include/c++/3.3/clocale:58: error: `setlocale' not declared
> make[2]: *** [/home/eric/.apt-fu/sources/a/apt/apt-0.5.20/obj/apt-inst/extracttar.opic] Error 1
> make[1]: *** [all] Error 2
> make: *** [all] Error 2

Does this fix it?  Apparently, apti18n.h does some weird things like defining a
macro for setlocale, which of course breaks the prototype in locale.h

8.~	2003-07-18 08:35:23.000000000 -0700
+++ extracttar.cc	2004-01-06 19:57:56.000000000 -0800
@@ -19,7 +19,6 @@
 #ifdef __GNUG__
 #pragma implementation "apt-pkg/extracttar.h"
 #endif
-#include <apti18n.h>
 #include <apt-pkg/extracttar.h>
 
 #include <apt-pkg/error.h>
@@ -32,7 +31,9 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <iostream>
+#include <apti18n.h>
 									/*}}}*/
+
 using namespace std;
     
 // The on disk header for a tar file.


-- 
 - mdz



Reply to: