All,
I tried to build wireshark 0.99.6 on several platforms and I discovered
several problems I'm reporting on this email.
I haven't been following up the mailing list, so I don't know if they
are known problems or not. Anyway:
[1] When building a rpm package, the rpm build fails because of a
warning that is treated as error (when it should not be!).
The problem is reported in: wiretap/file_access.c (line 993) (the
warning is about passing a 'const' pointer to gzwrite that is declared
to take a non-const pointer).
As workaround, simply change the RPM SPEC file under
packaging/rpm/SPEC/wireshark.spec.in (or, if you have already run the
configure, change the packaging/rpm/SPEC/wireshark.spec) to have
--disable-warnings-as-errors in the CFLAGS.
The correct fix would be to understand why the rpm build uses the
-Werror flag even if not requested...
[2] The RPM build still fail because apparently the man pages are now
installed under $PREFIX/share/man instead of $PREFIX/man.
The workaround is, again, to change the SPEC file (same as above),
replacing the line:
%prefix/man/*/*
into:
%prefix/share/man/*/*
(in %files section)
Again, the correct action would be to understand why the man pages are
installed under '$PREFIX/share' now and perhaps move it back the way it
was before.
[3] On RedHat Enterprise 3, CentOS 3, and RedHat 9 the build fails
because the file:
gtk/export-object.c
uses some functions that are available only on GTK 2.4 and above.
The correct fix is to #ifdef those sections to use the new API (GTK
2.4>) only if gtk+2.4 is available, or use the old API for older gtk.
Attached you can find the .diff file for this.
Fabrizio
--- export_object.c 2007-07-30 15:45:51.000000000 -0700
+++ ../../wireshark-0.99.6.original/gtk/export_object.c 2007-07-05 12:22:28.000000000 -0700
@@ -179,19 +179,11 @@
gtk_window_set_transient_for(GTK_WINDOW(save_as_w),
GTK_WINDOW(object_list->dlg));
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(save_as_w), entry->filename);
-#else
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(save_as_w), entry->filename);
-#endif
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(save_as_w),
+ entry->filename);
if(gtk_dialog_run(GTK_DIALOG(save_as_w)) == GTK_RESPONSE_ACCEPT)
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
eo_save_entry(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(save_as_w)), entry, TRUE);
-#else
- eo_save_entry(gtk_file_selection_get_filename(GTK_FILE_SELECTION(save_as_w)), entry, TRUE);
-
-#endif
window_destroy(save_as_w);
}
@@ -216,11 +208,7 @@
while(slist) {
entry = slist->data;
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
save_as_fullpath = g_build_filename(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(save_in_w)), entry->filename, NULL);
-#else
- save_as_fullpath = g_build_filename(gtk_file_selection_get_filename(GTK_FILE_SELECTION(save_in_w)), entry->filename, NULL);
-#endif
if (!eo_save_entry(save_as_fullpath, entry, FALSE))
all_saved = FALSE;