Bug 27923

Summary: build failure on gcjwebplugin - GTK not found
Product: classpath Reporter: Paul Jenner <psj>
Component: classpathAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: betelgeuse, bug-classpath
Priority: P3    
Version: 0.92   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: add GTK configure check for gcjwebplugin

Description Paul Jenner 2006-06-06 20:28:57 UTC
Build of Classpath HEAD fails for me on gcjwebplugin due to GTK not being found:

./../../native/plugin/gcjwebplugin.cc:55:21: error: gtk/gtk.h: No such file or directory
./../../native/plugin/gcjwebplugin.cc: In function 'bool plugin_failed()':
../../../native/plugin/gcjwebplugin.cc:907: error: 'GtkWidget' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:907: error: 'dialog' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:908: error: 'ok_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:911: error: 'GTK_DIALOG_MODAL' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:912: error: 'GTK_MESSAGE_WARNING' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:913: error: 'GTK_BUTTONS_NONE' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:914: error: 'gtk_message_dialog_new' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:915: error: 'GTK_DIALOG' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:916: error: 'GTK_STOCK_OK' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:917: error: 'GTK_RESPONSE_OK' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:917: error: 'gtk_dialog_add_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:918: error: 'gtk_widget_show_all' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:919: error: 'gtk_dialog_run' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:921: error: 'gtk_widget_destroy' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc: In function 'bool plugin_ask_user_about_documentbase(char*)':
../../../native/plugin/gcjwebplugin.cc:1052: error: 'GtkWidget' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1052: error: 'dialog' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1053: error: 'ok_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1054: error: 'cancel_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1055: error: 'whitelist_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1056: error: 'GTK_RESPONSE_NONE' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1059: error: 'GTK_DIALOG_MODAL' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1060: error: 'GTK_MESSAGE_WARNING' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1061: error: 'GTK_BUTTONS_NONE' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1063: error: 'gtk_message_dialog_new' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1064: error: 'GTK_MESSAGE_DIALOG' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1065: error: 'gtk_message_dialog_format_secondary_text' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1067: error: 'GTK_DIALOG' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1068: error: 'GTK_STOCK_CANCEL' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1069: error: 'GTK_RESPONSE_CANCEL' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1069: error: 'gtk_dialog_add_button' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1072: error: 'GTK_RESPONSE_OK' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1075: error: 'GTK_RESPONSE_APPLY' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1076: error: 'gtk_widget_grab_focus' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1078: error: 'gtk_widget_show_all' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1079: error: 'gtk_dialog_run' was not declared in this scope
../../../native/plugin/gcjwebplugin.cc:1080: error: 'gtk_widget_destroy' was not declared in this scope

I can workaround by disabling plugin but configure should detect GTK and not build plugin if not found.

This is with a --disable-gtk-peer build (due to old version of GTK) but otherwise working GTK 2.6 installed.
Comment 1 Paul Jenner 2006-06-08 19:12:54 UTC
Created attachment 11640 [details]
add GTK configure check for gcjwebplugin

Patch to add GTK configure check to gcjwebplugin attached. Build succeeds for me with this.

Not sure if this interferes with GTK AWT peers configure check though as I can't successfully build those currently due to lack of GTK 2.8.
Comment 2 Petteri Räty 2007-02-14 19:34:22 UTC
Found the same problem in 0.93 release when bumping the ebuild in Gentoo.
Comment 3 Petteri Räty 2007-02-14 19:41:37 UTC
(In reply to comment #1)
> Created an attachment (id=11640) [edit]
> add GTK configure check for gcjwebplugin
> 

This patch does not cover ./configure --disable-gtk-peer --enable plugin I think.
Comment 4 Paul Jenner 2007-03-31 16:11:11 UTC
Fixed with this commit:

2007-03-16  Mark Wielaard  <mark@klomp.org>

         * configure.ac (COMPILE_PLUGIN): Stop when no plugin headers found.
         Also check for gtk+ dependency.

configure --enable-plugin --disable-gtk-peer --disable-gconf-peer now builds for me.