Subject: pkg/23073: package archivers/cxunzip build fails
To: None <gnats-bugs@gnats.netbsd.org>
From: Tyler R.Retzlaff <rtr@NetBSD.org>
List: netbsd-bugs
Date: 10/06/2003 22:04:26
>Number:         23073
>Category:       pkg
>Synopsis:       package archivers/cxunzip build fails
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 06 12:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tyler R. Retzlaff
>Release:        NetBSD 1.6ZC
>Organization:

>Environment:
System: NetBSD silence 1.6ZC NetBSD 1.6ZC (silence) #5: Fri Sep 26 22:31:33 EST 2003 rtr@silence:/usr/obj/netbsd/silence i386
Architecture: i386
Machine: i386

$ gcc -v
Using built-in specs.
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf --host=i386--netbsdelf --target=i386--netbsdelf : (reconfigured) /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf1.6W --host=i386--netbsdelf --target=i386--netbsdelf
Thread model: posix
gcc version 3.3.1

>Description:
	There are two files that cause compilation failure, the first 
	failure follows.  I have included patch-ab, patch-ac and 
	a distinfo patch to correct the failure.

Making all in src
gmake[2]: Entering directory `/usr/obj/pkgsrc/i386/archivers/cxunzip/work.silence/cxunzip-0.96/src'
c++ -DHAVE_CONFIG_H -I. -I. -I.. -DGNOMELOCALEDIR=\""/usr/pkg/share/locale"\"   -I/usr/pkg/include -I/usr/pkg/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/pkg/lib/gnome-libs/include -I/usr/pkg/include/glib/glib-1.2 -I/usr/pkg/lib/glib/include -I/usr/pkg/include/orbit-1.0 -I/usr/pkg/include/gtk-1.2 -I/usr/X11R6/include  -Wall -Wstrict-prototypes  -O2 -I/usr/pkg/include -I/usr/X11R6/include -c main.cc
c++ -DHAVE_CONFIG_H -I. -I. -I.. -DGNOMELOCALEDIR=\""/usr/pkg/share/locale"\"   -I/usr/pkg/include -I/usr/pkg/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/pkg/lib/gnome-libs/include -I/usr/pkg/include/glib/glib-1.2 -I/usr/pkg/lib/glib/include -I/usr/pkg/include/orbit-1.0 -I/usr/pkg/include/gtk-1.2 -I/usr/X11R6/include  -Wall -Wstrict-prototypes  -O2 -I/usr/pkg/include -I/usr/X11R6/include -c app.cc
app.cc: In function `void create_view_dialog(App*)':
app.cc:219: error: invalid conversion from `void (*)(gchar*, App*)' to `void
   (*)(gchar*, void*)'
gmake[2]: *** [app.o] Error 1

>How-To-Repeat:
	cd /usr/pkgsrc/archivers/cxunzip && make
>Fix:
	I don't know if this fix will cause problems with gcc2 since I don't
	have it to test with, however unlikely.

distinfo

$NetBSD: distinfo,v 1.1 2002/05/25 02:42:32 fredb Exp $

SHA1 (cxunzip-0.96.tar.gz) = 5c639c344a8a3a05ab33419d1b1f66b99ac460a4
Size (cxunzip-0.96.tar.gz) = 185785 bytes
SHA1 (patch-aa) = 1738c34f3a0ca48f8651228b72e044b32872d6a1
SHA1 (patch-ab) = 4850d910d93a17f7be0987a76eb209f777955f9d
SHA1 (patch-ac) = 7b97e5faf824c5347ace88ff8bbddf6404390238

patch-ab

--- src/app.cc.orig     2003-10-06 21:17:24.000000000 +1000
+++ src/app.cc  2003-10-06 21:17:32.000000000 +1000
@@ -215,7 +215,7 @@

        dialog=gnome_request_dialog(FALSE,_("View file with program"),
                                    program,1024,
-                                   view_dialog_clicked_callback,app,
+                                   (void (*)(gchar*, gpointer))view_dialog_clicked_callback,app,
                                    NULL);
        g_free(program);
        gtk_widget_show(dialog);

patch-ac

--- src/menu.hh.orig    2003-10-06 21:18:37.000000000 +1000
+++ src/menu.hh 2003-10-06 21:18:43.000000000 +1000
@@ -38,34 +38,34 @@
        GNOMEUIINFO_END
 };

-GnomeUIInfo actionsmenu[] = {
-       (GnomeUIInfo){GNOME_APP_UI_ITEM,
+static GnomeUIInfo actionsmenu[] = {
+       {GNOME_APP_UI_ITEM,
                      N_("_Uncompress..."),N_("Uncompress archive"),
-                     uncompress_file_callback,NULL,NULL,
+                     (gpointer)uncompress_file_callback,NULL,NULL,
                      GNOME_APP_PIXMAP_STOCK,GNOME_STOCK_MENU_CONVERT,
                      'U',GDK_CONTROL_MASK,NULL},
-       (GnomeUIInfo){GNOME_APP_UI_ITEM,
+       {GNOME_APP_UI_ITEM,
                      N_("_View..."),N_("View selected file from archive"),
-                     view_callback,NULL,NULL,
+                     (gpointer)view_callback,NULL,NULL,
                      GNOME_APP_PIXMAP_STOCK,GNOME_STOCK_MENU_INDEX,
                      'V',GDK_CONTROL_MASK,NULL},
-       (GnomeUIInfo){GNOME_APP_UI_ITEM,
+       {GNOME_APP_UI_ITEM,
                      N_("_Test..."),N_("Test archive"),
-                     test_archive_callback,NULL,NULL,
+                     (gpointer)test_archive_callback,NULL,NULL,
                      GNOME_APP_PIXMAP_STOCK,GNOME_STOCK_MENU_SEARCH,
                      'T',GDK_CONTROL_MASK,NULL},
        GNOMEUIINFO_END
 };

-GnomeUIInfo helpmenu[] = {
-       (GnomeUIInfo){GNOME_APP_UI_ITEM,
+static GnomeUIInfo helpmenu[] = {
+       {GNOME_APP_UI_ITEM,
                      _("_About..."),NULL,
-                     about_callback,NULL,NULL,
+                     (gpointer)about_callback,NULL,NULL,
                      GNOME_APP_PIXMAP_STOCK,GNOME_STOCK_MENU_ABOUT,
                      0,(GdkModifierType)0,NULL},
        /*  GNOMEUIINFO_SEPARATOR,
            GNOMEUIINFO_HELP("cxunzip"), */
-       GNOMEUIINFO_END,
+       GNOMEUIINFO_END
 };

 GnomeUIInfo mainmenu[] = {

>Release-Note:
>Audit-Trail:
>Unformatted: