Package: gnome-apt
Version: 0.4.7-1.2
Severity: normal
Tags: patch
When building 'gnome-apt' on amd64/unstable with gcc-4.0,
I get the following error:
/usr/include/libintl.h:81: error: expected unqualified-id before 'const'
/usr/include/libintl.h:81: error: expected `)' before 'const'
/usr/include/libintl.h:81: error: expected initializer before 'const'
/usr/include/libintl.h:85: error: expected unqualified-id before 'const'
/usr/include/libintl.h:85: error: expected `)' before 'const'
/usr/include/libintl.h:85: error: expected initializer before 'const'
/usr/include/libintl.h:90: error: expected unqualified-id before 'const'
/usr/include/libintl.h:90: error: expected `)' before 'const'
/usr/include/libintl.h:90: error: expected initializer before 'const'
cache.h:99: warning: 'class GAptCacheFile::CacheView' has virtual functions but
non-virtual destructor
gdeb/gdeb.h:124: warning: 'class GDeb::Package' has virtual functions but
non-virtual destructor
make[4]: *** [gnome_apt-details.o] Error 1
make[4]: Leaving directory `/gnome-apt-0.4.7/src'
This occurs because the configure test for gettext fails because it
casts a 64 bit pointer to a 32 bit (int), which causes a
'cast from pointer to integer loses precision' error with gcc-4.0.
With the attached patch 'gnome-apt' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/gnome-apt-0.4.7/aclocal.m4 ./aclocal.m4
--- ../tmp-orig/gnome-apt-0.4.7/aclocal.m4 2004-02-12 00:30:14.000000000
+0100
+++ ./aclocal.m4 2005-04-12 20:40:40.975154293 +0200
@@ -7146,7 +7146,7 @@
[AC_TRY_LINK([
#include <libintl.h>
],
- [return (int) dgettext ("","")],
+ [return dgettext ("","") != 0],
gt_cv_func_dgettext_libc=yes,
gt_cv_func_dgettext_libc=no)
])
diff -urN ../tmp-orig/gnome-apt-0.4.7/configure ./configure
--- ../tmp-orig/gnome-apt-0.4.7/configure 2004-07-11 18:53:14.000000000
+0200
+++ ./configure 2005-04-12 20:40:00.953951576 +0200
@@ -21377,7 +21377,7 @@
int
main ()
{
-return (int) dgettext ("","")
+return dgettext ("","") != 0
;
return 0;
}
diff -urN ../tmp-orig/gnome-apt-0.4.7/src/cachecontrol.cc ./src/cachecontrol.cc
--- ../tmp-orig/gnome-apt-0.4.7/src/cachecontrol.cc 2004-02-02
01:26:23.000000000 +0100
+++ ./src/cachecontrol.cc 2005-04-12 20:38:03.874764997 +0200
@@ -23,6 +23,7 @@
*
**/
+#include <errno.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/dpkgpm.h>
diff -urN ../tmp-orig/gnome-apt-0.4.7/src/sources.cc ./src/sources.cc
--- ../tmp-orig/gnome-apt-0.4.7/src/sources.cc 2003-08-20 21:41:38.000000000
+0200
+++ ./src/sources.cc 2005-04-12 20:38:03.883763244 +0200
@@ -27,6 +27,7 @@
*
**/
+#include <errno.h>
#include <apt-pkg/configuration.h>
#include <gtk/gtktreeview.h>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]