configuration system improvements
cover configuration system improvements
This group of patches improve the usability of kernel configuration system, mainly,
1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code from mconf.c to menu.c, make them be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;
0001--KBUILD-add-symbol-value-to-help-find-the-real-depe.patch 0002--KBUILD-add-menu_get_ext_help-function-to-display-m.patch 0003--KBUILD-menuconfig-improvements.patch 0004--KBUILD-make-use-of-menu_get_ext_help-in-gconfig.patch 0005--KBUILD-make-use-of-menu_get_ext_help-in-qconfig.patch 0006--KBUILD-make-use-of-menu_get_ext_help-in-make-conf.patch
I found gconfig still lack of "search by symbol" support, and that would be in another patch.
Request for comments, thanks.
--
Cheng Renquan, Shenzhen, China
PATCH 1/6 add symbol value to help find the real depend
kbuild-menuconfig-display-depend-value.patch
Sometimes when configuring need to disable some unused item, but the item is selected by many other items, it's hard to find the real dependency which selected it, This patch add every symbol's value accompanied to make it possible to find the real dependency easily.
An example is CONFIG_RFKILL,
---------------------- RF switch subsystem support ----------------------
| CONFIG_RFKILL: | | | | Say Y here if you want to have control over RF switches | | found on many WiFi and Bluetooth cards. | | | | To compile this driver as a module, choose M here: the | | module will be called rfkill. | | | | Symbol: RFKILL [=m] | | Prompt: RF switch subsystem support | | Defined at net/rfkill/Kconfig:4 | | Depends on: NET [=y] | | Location: | | -> Networking support (NET [=y]) | | Selected by: IWLCORE [=n] && NETDEVICES [=y] && !S390 [=S390] && PC | | |
----------------------------------------------------------------( 99%)---
--- scripts/kconfig/expr.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/kconfig/expr.c +2 -0
@@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out)static void expr_print_gstr_helper (void *data,struct symbol *sym,const char *str) {str_append ((struct gstr *)data, str); +if (sym) +str_printf ((struct gstr *)data," [=%s]" ,sym_get_string_value (sym)); }void expr_gstr_print (struct expr *e,struct gstr *gs)
Signature · 1 line
1.6.0.6
PATCH 2/6 add menu_get_ext_help function to display more information
The three functions are moved from mconf.c, then they can be shared in all menuconfig & gconfig & xconfig & config.
+void menu_get_ext_help(struct menu *menu, struct gstr *help) +static void get_prompt_str(struct gstr *r, struct property *prop) +void get_symbol_str(struct gstr *r, struct symbol *sym)
--- scripts/kconfig/lkc_proto.h | 2 + scripts/kconfig/menu.c | 79 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 0 deletions(-)
scripts/kconfig/lkc_proto.h +2 -0
@@ -17,6 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu)); P(menu_get_parent_menu,struct menu *,(struct menu *menu)); P(menu_has_help,bool,(struct menu *menu)); P(menu_get_help,const char *,(struct menu *menu)); +P(get_symbol_str,void,(struct gstr *r, struct symbol *sym)); +P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));/* symbol.c */ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
scripts/kconfig/menu.c +79 -0
88 lines not on this page · raw message
Signature · 1 line
1.6.0.6
PATCH 3/6 menuconfig improvements
The removed functions are moved into menu.c for sharing with gconfig & xconfig & config.
--- scripts/kconfig/mconf.c | 78 ++--------------------------------------------- 1 files changed, 3 insertions(+), 75 deletions(-)
scripts/kconfig/mconf.c +3 -75
@@ -199,8 +199,6 @@ inputbox_instructions_string[] = N_( setmod_text[] = N_("This feature depends on another which has been configured as a module.\n" "As a result, this feature will be built as a module." ), -nohelp_text[] = N_( -"There is no help available for this kernel option.\n" ), load_config_text[] = N_("Enter the name of the configuration file you wish to load. " "Accept the name shown to restore the configuration you "
@@ -284,66 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);static void show_helptext (const char *title,const char *text);static void show_help (struct menu *menu); -static void get_prompt_str (struct gstr *r,struct property *prop) -{ -int i, j; -struct menu *submenu[8 ], *menu; - -str_printf (r,_ ("Prompt: %s\n" ),_ (prop->text)); -str_printf (r,_ (" Defined at %s:%d\n" ), prop->menu->file->name, - prop->menu->lineno); -if (!expr_is_yes (prop->visible.expr)) { -str_append (r,_ (" Depends on: " )); -expr_gstr_print (prop->visible.expr, r); -str_append (r,"\n" ); - } - menu = prop->menu->parent; -for (i =0 ; menu != &rootmenu && i <8 ; menu = menu->parent) - submenu[i++] = menu; -if (i >0 ) { -str_printf (r,_ (" Location:\n" )); -for (j =4 ; --i >=0 ; j +=2 ) { - menu = submenu[i]; -str_printf (r,"%*c-> %s" , j,' ' ,_ (menu_get_prompt (menu))); -if (menu->sym) { -str_printf (r," (%s [=%s])" , menu->sym->name ? - menu->sym->name :_ ("<choice>" ), -sym_get_string_value (menu->sym)); - } -str_append (r,"\n" ); - } - } -} - -static void get_symbol_str (struct gstr *r,struct symbol *sym) -{ -bool hit; -struct property *prop; - -if (sym && sym->name) -str_printf (r,"Symbol: %s [=%s]\n" , sym->name, -sym_get_string_value (sym)); - for_all_prompts(sym, prop) -get_prompt_str (r, prop); - hit = false; - for_all_properties(sym, prop, P_SELECT) { -if (!hit) { -str_append (r," Selects: " ); - hit = true; - }else -str_printf (r," && " ); -expr_gstr_print (prop->expr, r); - } -if (hit) -str_append (r,"\n" ); -if (sym->rev_dep.expr) { -str_append (r,_ (" Selected by: " )); -expr_gstr_print (sym->rev_dep.expr, r); -str_append (r,"\n" ); - } -str_append (r,"\n\n" ); -} -static struct gstr get_relations_str (struct symbol **sym_arr) {struct symbol *sym;
@@ -699,19 +637,9 @@ static void show_helptext(const char *title, const char *text)static void show_help (struct menu *menu) {struct gstr help =str_new (); -struct symbol *sym = menu->sym; - -if (menu_has_help (menu)) - { -if (sym->name) { -str_printf (&help,"CONFIG_%s:\n\n" , sym->name); -str_append (&help,_ (menu_get_help (menu))); -str_append (&help,"\n" ); - } - }else { -str_append (&help, nohelp_text); - } -get_symbol_str (&help, sym); + +menu_get_ext_help (menu, &help); +show_helptext (_ (menu_get_prompt (menu)),str_get (&help));str_free (&help); }
Signature · 1 line
1.6.0.6
PATCH 4/6 make use of menu_get_ext_help in gconfig
Futhermore, gconfig interface lack the "search a symbol" function, do later.
--- scripts/kconfig/gconf.c | 21 ++++----------------- 1 files changed, 4 insertions(+), 17 deletions(-)
scripts/kconfig/gconf.c +4 -17
@@ -456,19 +456,9 @@ static void text_insert_help(struct menu *menu)GtkTextBuffer *buffer;GtkTextIter start, end;const char *prompt =_ (menu_get_prompt (menu)); -gchar *name; -const char *help; +struct gstr help =str_new (); - help =menu_get_help (menu); - -/* Gettextize if the help text not empty */ -if ((help !=0 ) && (help[0 ] !=0 )) - help =_ (help); - -if (menu->sym && menu->sym->name) - name =g_strdup_printf (menu->sym->name); -else - name =g_strdup ("" ); +menu_get_ext_help (menu, &help); buffer =gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_w));gtk_text_buffer_get_bounds (buffer, &start, &end);
@@ -478,14 +468,11 @@ static void text_insert_help(struct menu *menu)gtk_text_buffer_get_end_iter (buffer, &end);gtk_text_buffer_insert_with_tags (buffer, &end, prompt,-1 , tag1,NULL ); -gtk_text_buffer_insert_at_cursor (buffer," " ,1 ); -gtk_text_buffer_get_end_iter (buffer, &end); -gtk_text_buffer_insert_with_tags (buffer, &end, name,-1 , tag1, -NULL );gtk_text_buffer_insert_at_cursor (buffer,"\n\n" ,2 );gtk_text_buffer_get_end_iter (buffer, &end); -gtk_text_buffer_insert_with_tags (buffer, &end, help,-1 , tag2, +gtk_text_buffer_insert_with_tags (buffer, &end,str_get (&help),-1 , tag2,NULL ); +str_free (&help); }
Signature · 1 line
1.6.0.6
PATCH 5/6 make use of menu_get_ext_help in qconfig
--- scripts/kconfig/qconf.cc | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
scripts/kconfig/qconf.cc +4 -6
@@ -1041,12 +1041,10 @@ void ConfigInfoView::menuInfo(void) if (showDebug()) debug = debug_info(sym); - help = menu_get_help(menu); - /* Gettextize if the help text not empty */ - if (help.isEmpty()) - help = print_filter(menu_get_help(menu)); - else - help = print_filter(_(menu_get_help(menu))); + struct gstr help_gstr = str_new(); + menu_get_ext_help(menu, &help_gstr); + help = print_filter(str_get(&help_gstr)); + str_free(&help_gstr); } else if (menu->prompt) { head += "<big><b>"; head += print_filter(_(menu->prompt->text));
Signature · 1 line
1.6.0.6
PATCH 6/6 make use of menu_get_ext_help in "make config"
--- scripts/kconfig/conf.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
scripts/kconfig/conf.c +11 -11
@@ -37,14 +37,14 @@ static int conf_cnt;static char line[128 ];static struct menu *rootEntry; -static char nohelp_text[] =N_ ("Sorry, no help available for this option yet.\n" ); - -static const char *get_help (struct menu *menu) +static void print_help (struct menu *menu) { -if (menu_has_help (menu)) -return _ (menu_get_help (menu)); -else -return nohelp_text; +struct gstr help =str_new (); + +menu_get_ext_help (menu, &help); + +printf ("\n%s\n" ,str_get (&help)); +str_free (&help); }static void strip (char *str)
@@ -139,7 +139,7 @@ int conf_string(struct menu *menu)case '?' :/* print help */ if (line[1 ] =='\n' ) { -printf ("\n%s\n" ,get_help (menu)); +print_help (menu); def =NULL ;break ; }
@@ -219,7 +219,7 @@ static int conf_sym(struct menu *menu)if (sym_set_tristate_value (sym, newval))return 0 ; help: -printf ("\n%s\n" ,get_help (menu)); +print_help (menu); } }
@@ -306,7 +306,7 @@ static int conf_choice(struct menu *menu)fgets (line,128 , stdin);strip (line);if (line[0 ] =='?' ) { -printf ("\n%s\n" ,get_help (menu)); +print_help (menu);continue ; }if (!line[0 ])
@@ -330,7 +330,7 @@ static int conf_choice(struct menu *menu)if (!child)continue ;if (line[strlen (line) -1 ] =='?' ) { -printf ("\n%s\n" ,get_help (child)); +print_help (child);continue ; }sym_set_choice_value (sym, child->sym);
Signature · 1 line
1.6.0.6
Quoted 15 lines · Cheng Renquan
This group of patches improve the usability of kernel configuration system, mainly,
1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code frommconf.ctomenu.c, make them be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;0001--KBUILD-add-symbol-value-to-help-find-the-real-depe.patch 0002--KBUILD-add-menu_get_ext_help-function-to-display-m.patch 0003--KBUILD-menuconfig-improvements.patch 0004--KBUILD-make-use-of-menu_get_ext_help-in-gconfig.patch 0005--KBUILD-make-use-of-menu_get_ext_help-in-qconfig.patch 0006--KBUILD-make-use-of-menu_get_ext_help-in-make-conf.patch
Quoted 4 lines
I found gconfig still lack of "search by symbol" support, and that would be in another patch.
Request for comments, thanks.
Hi,
I still like this idea a lot. However, with "make gconfig" I am seeing a segfault when I click on "Firmware Drivers" in the main menu. I only see this with these patches applied.
Other than that, they look good to me.
Here's the gconfig info:
rddunlap@chimera:linux-2.6.29-rc6-git5> make ARCH=x86_64 O=xx64 gconfig &
[1] 10722
rddunlap@chimera:linux-2.6.29-rc6-git5> GEN /local/linsrc/tmp/linux-2.6.29-rc6-git5/xx64/Makefilescripts/kconfig/gconf arch/x86/Kconfig
make[2]: *** [gconfig] Segmentation fault
make[1]: *** [gconfig] Error 2
make: *** [sub-make] Error
and from the kernel log:
gconf[10868]: segfault at 0000000000000070 rip 00000000004111b6 rsp 00007ffff67cd6f0 error 4
Thanks,
Signature · 1 line
~Randy
Quoted 40 lines · Randy Dunlap
Quoted 15 lines · Cheng Renquan
This group of patches improve the usability of kernel configuration system, mainly,
1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code frommconf.ctomenu.c, make them be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;0001--KBUILD-add-symbol-value-to-help-find-the-real-depe.patch 0002--KBUILD-add-menu_get_ext_help-function-to-display-m.patch 0003--KBUILD-menuconfig-improvements.patch 0004--KBUILD-make-use-of-menu_get_ext_help-in-gconfig.patch 0005--KBUILD-make-use-of-menu_get_ext_help-in-qconfig.patch 0006--KBUILD-make-use-of-menu_get_ext_help-in-make-conf.patch
Quoted 4 lines
I found gconfig still lack of "search by symbol" support, and that would be in another patch.
Request for comments, thanks.
Hi,
I still like this idea a lot. However, with "make gconfig" I am seeing a segfault when I click on "Firmware Drivers" in the main menu. I only see this with these patches applied.
Other than that, they look good to me.
Here's the gconfig info:
rddunlap@chimera:linux-2.6.29-rc6-git5> make ARCH=x86_64 O=xx64 gconfig &
[1] 10722
rddunlap@chimera:linux-2.6.29-rc6-git5> GEN /local/linsrc/tmp/linux-2.6.29-rc6-git5/xx64/Makefilescripts/kconfig/gconfarch/x86/Kconfig
make[2]: *** [gconfig] Segmentation fault
make[1]: *** [gconfig] Error 2
make: *** [sub-make] Error
Quoted 3 lines
and from the kernel log:
gconf[10868]: segfault at 0000000000000070 rip
00000000004111b6rsp00007ffff67cd6f0error 4
Could you tell what distribution are you using? The versions of your glibc, gtk+2.0, and glibc? If you can correctly build other gtk+ programs?
I have developed these patches on default Fedora 10 i686, it runs well, and today I have tested it under a latest Gentoo x86_64 desktop, all seems run well here.
thanks,
Quoted 6 lines
Thanks,
--
~Randy
Signature · 3 lines
Cheng Renquan (程任全), from Shenzhen, China Dick Cavett - "If your parents never had children, chances are... neither will you."
Quoted 40 lines · Cheng Renquan
Quoted 39 lines · Randy Dunlap
Quoted 15 lines · Cheng Renquan
This group of patches improve the usability of kernel configuration system, mainly,
1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code frommconf.ctomenu.c, make them be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;0001--KBUILD-add-symbol-value-to-help-find-the-real-depe.patch 0002--KBUILD-add-menu_get_ext_help-function-to-display-m.patch 0003--KBUILD-menuconfig-improvements.patch 0004--KBUILD-make-use-of-menu_get_ext_help-in-gconfig.patch 0005--KBUILD-make-use-of-menu_get_ext_help-in-qconfig.patch 0006--KBUILD-make-use-of-menu_get_ext_help-in-make-conf.patch
Quoted 4 lines
I found gconfig still lack of "search by symbol" support, and that would be in another patch.
Request for comments, thanks.
Hi,
I still like this idea a lot. However, with "make gconfig" I am seeing a segfault when I click on "Firmware Drivers" in the main menu. I only see this with these patches applied.
Other than that, they look good to me.
Here's the gconfig info:
rddunlap@chimera:linux-2.6.29-rc6-git5> make ARCH=x86_64 O=xx64 gconfig &
[1] 10722
rddunlap@chimera:linux-2.6.29-rc6-git5> GEN /local/linsrc/tmp/linux-2.6.29-rc6-git5/xx64/Makefilescripts/kconfig/gconfarch/x86/Kconfig
make[2]: *** [gconfig] Segmentation fault
make[1]: *** [gconfig] Error 2
make: *** [sub-make] Error
Quoted 7 lines
Quoted 3 lines
and from the kernel log:
gconf[10868]: segfault at 0000000000000070 rip
00000000004111b6rsp00007ffff67cd6f0error 4Could you tell what distribution are you using? The versions of your glibc, gtk+2.0, and glibc? If you can correctly build other gtk+ programs?
This is on OpenSUSE 10.3 on x86_64.
glibc-2.6.1-18
gtk2-2.12.0-5
I don't know that I have any other gtk+ programs.
Quoted 3 lines
I have developed these patches on default Fedora 10 i686, it runs well, and today I have tested it under a latest Gentoo
x86_64desktop, all seems run well here.
Here's a backtrace from gdb. gconfig was built without -d, however.
(gdb) set args arch/x86/Kconfig
(gdb) run
Starting program: /local/linsrc/tmp/linux-2.6.29-rc6-git5/xx64/scripts/kconfig/gconf arch/x86/Kconfig
Program received signal SIGSEGV, Segmentation fault. 0x00000000004111b6 in get_symbol_str () (gdb) bt
#0 0x00000000004111b6 in get_symbol_str () #1 0x0000000000408acb in on_treeview2_cursor_changed () #2 0x00002ae6c6921d2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#3 0x00002ae6c69341fd in ?? () from /usr/lib64/libgobject-2.0.so.0 #4 0x00002ae6c6935c55 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#5 0x00002ae6c6936043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #6 0x00002ae6c54a1ada in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #7 0x00002ae6c54a85de in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #8 0x00002ae6c53b3bbf in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #9 0x00002ae6c6921d2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#10 0x00002ae6c69345f6 in ?? () from /usr/lib64/libgobject-2.0.so.0 #11 0x00002ae6c6935989 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#12 0x00002ae6c6936043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #13 0x00002ae6c54baff5 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #14 0x00002ae6c53acef2 in gtk_propagate_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x00002ae6c53ade95 in gtk_main_do_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#16 0x00002ae6c5bb67bc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0 #17 0x00002ae6c6f92064 in g_main_context_dispatch ()
from /usr/lib64/libglib-2.0.so.0
#18 0x00002ae6c6f9535d in ?? () from /usr/lib64/libglib-2.0.so.0 #19 0x00002ae6c6f95657 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 #20 0x00002ae6c53ae263 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #21 0x000000000040a7c5 in main ()
(gdb) quit
Signature · 1 line
~Randy [would be nice to have some kconfig debugging options]
Quoted 53 lines · Randy Dunlap
Quoted 40 lines · Cheng Renquan
Quoted 39 lines · Randy Dunlap
Quoted 15 lines · Cheng Renquan
This group of patches improve the usability of kernel configuration system, mainly,
1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code frommconf.ctomenu.c, make them be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;0001--KBUILD-add-symbol-value-to-help-find-the-real-depe.patch 0002--KBUILD-add-menu_get_ext_help-function-to-display-m.patch 0003--KBUILD-menuconfig-improvements.patch 0004--KBUILD-make-use-of-menu_get_ext_help-in-gconfig.patch 0005--KBUILD-make-use-of-menu_get_ext_help-in-qconfig.patch 0006--KBUILD-make-use-of-menu_get_ext_help-in-make-conf.patch
Quoted 4 lines
I found gconfig still lack of "search by symbol" support, and that would be in another patch.
Request for comments, thanks.
Hi,
I still like this idea a lot. However, with "make gconfig" I am seeing a segfault when I click on "Firmware Drivers" in the main menu. I only see this with these patches applied.
Other than that, they look good to me.
Here's the gconfig info:
rddunlap@chimera:linux-2.6.29-rc6-git5> make ARCH=x86_64 O=xx64 gconfig &
[1] 10722
rddunlap@chimera:linux-2.6.29-rc6-git5> GEN /local/linsrc/tmp/linux-2.6.29-rc6-git5/xx64/Makefilescripts/kconfig/gconfarch/x86/Kconfig
make[2]: *** [gconfig] Segmentation fault
make[1]: *** [gconfig] Error 2
make: *** [sub-make] ErrorQuoted 6 lines
Quoted 3 lines
and from the kernel log:
gconf[10868]: segfault at 0000000000000070 rip
00000000004111b6rsp00007ffff67cd6f0error 4Could you tell what distribution are you using? The versions of your glibc, gtk+2.0, and glibc? If you can correctly build other gtk+ programs?
This is on OpenSUSE 10.3 on
x86_64.glibc-2.6.1-18
gtk2-2.12.0-5
Quoted 7 lines
I don't know that I have any other gtk+ programs.
Quoted 3 lines
I have developed these patches on default Fedora 10 i686, it runs well, and today I have tested it under a latest Gentoo
x86_64desktop, all seems run well here.Here's a backtrace from gdb. gconfig was built without -d, however.
Here's a better backtrace; gconfig was built with -g (not -d ??!?).
Program received signal SIGSEGV, Segmentation fault. 0x00000000004111b6 in get_symbol_str ()
(gdb) #0 0x00000000004111b6 in get_symbol_str ()
#1 0x0000000000408acb in on_treeview2_cursor_changed (
treeview=<value optimized out>, user_data=<value optimized out>) at /local/linsrc/tmp/linux-2.6.29-rc6-git5/scripts/kconfig/gconf.c:461
#2 0x00002b61af79bd2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#3 0x00002b61af7ae1fd in ?? () from /usr/lib64/libgobject-2.0.so.0 #4 0x00002b61af7afc55 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#5 0x00002b61af7b0043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #6 0x00002b61ae31bada in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #7 0x00002b61ae3225de in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #8 0x00002b61ae22dbbf in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #9 0x00002b61af79bd2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#10 0x00002b61af7ae5f6 in ?? () from /usr/lib64/libgobject-2.0.so.0 #11 0x00002b61af7af989 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#12 0x00002b61af7b0043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #13 0x00002b61ae334ff5 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #14 0x00002b61ae226ef2 in gtk_propagate_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x00002b61ae227e95 in gtk_main_do_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#16 0x00002b61aea307bc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0 #17 0x00002b61afe0c064 in g_main_context_dispatch ()
from /usr/lib64/libglib-2.0.so.0
#18 0x00002b61afe0f35d in ?? () from /usr/lib64/libglib-2.0.so.0 #19 0x00002b61afe0f657 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 #20 0x00002b61ae228263 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #21 0x000000000040a7c5 in main (ac=2, av=0x7ffffd048228)
at /local/linsrc/tmp/linux-2.6.29-rc6-git5/scripts/kconfig/gconf.c:1609
Signature · 1 line
~Randy
Quoted 5 lines · Randy Dunlap
Quoted 5 lines
This is on OpenSUSE 10.3 on
x86_64.glibc-2.6.1-18
gtk2-2.12.0-5
Quoted 7 lines
Quoted 7 lines
I don't know that I have any other gtk+ programs.
Quoted 3 lines
I have developed these patches on default Fedora 10 i686, it runs well, and today I have tested it under a latest Gentoo
x86_64desktop, all seems run well here.Here's a backtrace from gdb. gconfig was built without -d, however.
Your glibc and gtk version not old, the building environment seems good, but here I don't have a OpenSUSE 10.3 x86_64, really no idea on how to resolve that problem, maybe I have chance to install a OpenSUSE 10.3 x86_64 these days, the I will try that,
Today I tested these patches on another pristine debian-5.0 (lenny) x86_64 system, it also performed well.
On systems I tested (glibc 2.6,2.7,2.8, gtk-2.12 or gtk-2.14), it may report warnings from gtkitemfactory.h and ununsed variables from images.c, but doesn't matter, after "scripts/kconfig/gconf arch/x86/Kconfig" run, the gtk gconfig window will display, with symbol's value quoted well,
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47: warning: function declaration isn’t a prototype
root@uitnode1 ~/src/linux-trees/linux-2.6.29-rc6-305-g2450cf5 # make gconfig
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/gconf.oscripts/kconfig/images.c:6: warning: ‘xpm_load’ defined but not used scripts/kconfig/images.c:36: warning: ‘xpm_save’ defined but not used scripts/kconfig/images.c:66: warning: ‘xpm_back’ defined but not used scripts/kconfig/images.c:175: warning: ‘xpm_symbol_no’ defined but not used scripts/kconfig/images.c:192: warning: ‘xpm_symbol_mod’ defined but not used scripts/kconfig/images.c:209: warning: ‘xpm_symbol_yes’ defined but not used scripts/kconfig/images.c:226: warning: ‘xpm_choice_no’ defined but not used scripts/kconfig/images.c:243: warning: ‘xpm_choice_yes’ defined but not used scripts/kconfig/images.c:277: warning: ‘xpm_menu_inv’ defined but not used scripts/kconfig/images.c:294: warning: ‘xpm_menuback’ defined but not used scripts/kconfig/gconf.c:946: warning: ‘renderer_toggled’ defined but not used
HOSTCC scripts/kconfig/kconfig_load.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/gconf
scripts/kconfig/gconf arch/x86/Kconfig
The get_symbol_str function is totally moved from mconf.c, and kept intact, to make it available not only used by menuconfig, but also can be used by gconfig & xconfig & config,
Maybe you can try to "make gconfig" from a vanilla linux-2.6.29-rc6-git5 kernel, without these kbuild patches, to check if your system can configure kernel with gconfig?
Alternatively, you can use this to compile gconfig,
gcc -Wall -Wl,--as-needed -Wstrict-prototypes -O2 -fomit-frame-pointer -D LKC_DIRECT_LINK pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0 -o scripts/kconfig/gconf scripts/kconfig/gconf.c scripts/kconfig/kconfig_load.c scripts/kconfig/zconf.tab.c -lncurses pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0
this will build a smaller scripts/kconfig/gconf, with less library dependencies, or try "-O2" to "-O0", "-ggdb" to compute more debuging information, thanks,
In the same time I found the scripts/kconfig/gconf building command have superfluous paramters, such as "-lncurses", gconfig doesn't need ncurses, I will post patches to reduce that later.
Quoted 42 lines
Here's a better backtrace; gconfig was built with -g (not -d ??!?).
Program received signal SIGSEGV, Segmentation fault.
0x00000000004111b6inget_symbol_str()
(gdb) #0 0x00000000004111b6 inget_symbol_str()
#1 0x0000000000408acb inon_treeview2_cursor_changed( treeview=<value optimized out>, user_data=<value optimized out>) at /local/linsrc/tmp/linux-2.6.29-rc6-git5/scripts/kconfig/gconf.c:461 #2 0x00002b61af79bd2f ing_closure_invoke()
from/usr/lib64/libgobject-2.0.so.0
#3 0x00002b61af7ae1fd in ?? () from/usr/lib64/libgobject-2.0.so.0#4 0x00002b61af7afc55 ing_signal_emit_valist()
from/usr/lib64/libgobject-2.0.so.0
#5 0x00002b61af7b0043 ing_signal_emit() from/usr/lib64/libgobject-2.0.so.0#6 0x00002b61ae31bada in ?? () from/usr/lib64/libgtk-x11-2.0.so.0#7 0x00002b61ae3225de in ?? () from/usr/lib64/libgtk-x11-2.0.so.0#8 0x00002b61ae22dbbf in ?? () from/usr/lib64/libgtk-x11-2.0.so.0#9 0x00002b61af79bd2f ing_closure_invoke()
from/usr/lib64/libgobject-2.0.so.0
#100x00002b61af7ae5f6in ?? () from/usr/lib64/libgobject-2.0.so.0#110x00002b61af7af989ing_signal_emit_valist()
from/usr/lib64/libgobject-2.0.so.0
#120x00002b61af7b0043ing_signal_emit() from/usr/lib64/libgobject-2.0.so.0#130x00002b61ae334ff5in ?? () from/usr/lib64/libgtk-x11-2.0.so.0#140x00002b61ae226ef2ingtk_propagate_event()
from/usr/lib64/libgtk-x11-2.0.so.0
#150x00002b61ae227e95ingtk_main_do_event()
from/usr/lib64/libgtk-x11-2.0.so.0
#160x00002b61aea307bcin ?? () from/usr/lib64/libgdk-x11-2.0.so.0#170x00002b61afe0c064ing_main_context_dispatch()
from/usr/lib64/libglib-2.0.so.0
#180x00002b61afe0f35din ?? () from/usr/lib64/libglib-2.0.so.0#190x00002b61afe0f657ing_main_loop_run() from/usr/lib64/libglib-2.0.so.0#200x00002b61ae228263ingtk_main() from/usr/lib64/libgtk-x11-2.0.so.0#210x000000000040a7c5in main (ac=2, av=0x7ffffd048228)
at /local/linsrc/tmp/linux-2.6.29-rc6-git5/scripts/kconfig/gconf.c:1609--
~Randy
Signature · 2 lines
Cheng Renquan (程任全), from Shenzhen, China Groucho Marx - "I have had a perfectly wonderful evening, but this wasn't it."
Cheng Renquan wrote:
[snip]
Quoted 3 lines
Maybe you can try to "make gconfig" from a vanilla linux-2.6.29-rc6-git5 kernel, without these kbuild patches, to check if your system can configure kernel with gconfig?
I had already reported that gconfig without this patch series works fine.
Quoted 7 lines
Alternatively, you can use this to compile gconfig,
gcc -Wall -Wl,--as-needed -Wstrict-prototypes -O2 -fomit-frame-pointer -D
LKC_DIRECT_LINKpkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0-oscripts/kconfig/gconfscripts/kconfig/gconf.cscripts/kconfig/kconfig_load.cscripts/kconfig/zconf.tab.c-lncursespkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0
OK, did that.
Quoted 3 lines
this will build a smaller
scripts/kconfig/gconf, with less library dependencies, or try "-O2" to "-O0", "-ggdb" to compute more debuging information, thanks,
With -O0 -ggdb, this is the backtrace:
(gdb) bt
#0 0x000000000041a6ab in get_symbol_str (r=0x7fff41724130, sym=0x0)
at scripts/kconfig/menu.c:497
#1 0x000000000041a87c in menu_get_ext_help (menu=0xd82370,
help=0x7fff41724130) at scripts/kconfig/menu.c:531
#2 0x0000000000408dc3 in text_insert_help (menu=0xd82370)
at scripts/kconfig/gconf.c:461
#3 0x000000000040a5f4 in on_treeview2_cursor_changed (treeview=0x6d03b0,
user_data=0x0) at scripts/kconfig/gconf.c:1102#4 0x00002aef6a22dd2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#5 0x00002aef6a2401fd in ?? () from /usr/lib64/libgobject-2.0.so.0 #6 0x00002aef6a241c55 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#7 0x00002aef6a242043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #8 0x00002aef699f3ada in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #9 0x00002aef699fa5de in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#10 0x00002aef69905bbf in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #11 0x00002aef6a22dd2f in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#12 0x00002aef6a2405f6 in ?? () from /usr/lib64/libgobject-2.0.so.0 #13 0x00002aef6a241989 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#14 0x00002aef6a242043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0 #15 0x00002aef69a0cff5 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #16 0x00002aef698feef2 in gtk_propagate_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#17 0x00002aef698ffe95 in gtk_main_do_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#18 0x00002aef69db87bc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0 #19 0x00002aef6a69a064 in g_main_context_dispatch ()
from /usr/lib64/libglib-2.0.so.0
#20 0x00002aef6a69d35d in ?? () from /usr/lib64/libglib-2.0.so.0 #21 0x00002aef6a69d657 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 #22 0x00002aef69900263 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #23 0x000000000040b846 in main (ac=2, av=0x7fff41725408)
at scripts/kconfig/gconf.c:1609
Signature · 1 line
~Randy