All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MAINTAINERS: new kbuild maintainer
@ 2009-12-08 12:52 Michal Marek
  2009-12-08 13:18 ` Sam Ravnborg
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Marek @ 2009-12-08 12:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Sam Ravnborg, linux-kbuild, linux-kernel

Sam was fine with handing over kbuild maintainership to me. The git
trees are already in linux-next, a merge request will follow shortly.

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 MAINTAINERS |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4f96ac8..9206e04 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3015,8 +3015,11 @@ S:	Maintained
 F:	fs/autofs4/
 
 KERNEL BUILD
+M:	Michal Marek <mmarek@suse.cz>
+T:	git git://repo.or.cz/linux-kbuild.git for-next
+T:	git git://repo.or.cz/linux-kbuild.git for-linus
 L:	linux-kbuild@vger.kernel.org
-S:	Orphan
+S:	Maintained
 F:	Documentation/kbuild/
 F:	Makefile
 F:	scripts/Makefile.*
-- 
1.6.5.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 12:52 [PATCH] MAINTAINERS: new kbuild maintainer Michal Marek
@ 2009-12-08 13:18 ` Sam Ravnborg
  2009-12-08 15:11   ` Arkadiusz Miskiewicz
  0 siblings, 1 reply; 10+ messages in thread
From: Sam Ravnborg @ 2009-12-08 13:18 UTC (permalink / raw)
  To: Michal Marek; +Cc: Linus Torvalds, Andrew Morton, linux-kbuild, linux-kernel

On Tue, Dec 08, 2009 at 01:52:31PM +0100, Michal Marek wrote:
> Sam was fine with handing over kbuild maintainership to me. The git
> trees are already in linux-next, a merge request will follow shortly.

Yep - thanks for taken over this. Glad to see this is maintained properly.

	Sam


> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 13:18 ` Sam Ravnborg
@ 2009-12-08 15:11   ` Arkadiusz Miskiewicz
  2009-12-08 19:56     ` Michal Marek
  0 siblings, 1 reply; 10+ messages in thread
From: Arkadiusz Miskiewicz @ 2009-12-08 15:11 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild; +Cc: Michal Marek

On Tuesday 08 of December 2009, Sam Ravnborg wrote:
> On Tue, Dec 08, 2009 at 01:52:31PM +0100, Michal Marek wrote:
> > Sam was fine with handing over kbuild maintainership to me. The git
> > trees are already in linux-next, a merge request will follow shortly.
> 
> Yep - thanks for taken over this. Glad to see this is maintained properly.

Maybe we can get colors back in menuconfig then? ;-)
http://bugzilla.kernel.org/show_bug.cgi?id=13677

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 15:11   ` Arkadiusz Miskiewicz
@ 2009-12-08 19:56     ` Michal Marek
  2009-12-08 20:07       ` Arkadiusz Miskiewicz
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Marek @ 2009-12-08 19:56 UTC (permalink / raw)
  To: Arkadiusz Miskiewicz; +Cc: linux-kernel, linux-kbuild

Arkadiusz Miskiewicz napsal(a):
> On Tuesday 08 of December 2009, Sam Ravnborg wrote:
>> On Tue, Dec 08, 2009 at 01:52:31PM +0100, Michal Marek wrote:
>>> Sam was fine with handing over kbuild maintainership to me. The git
>>> trees are already in linux-next, a merge request will follow shortly.
>> Yep - thanks for taken over this. Glad to see this is maintained properly.
> 
> Maybe we can get colors back in menuconfig then? ;-)
> http://bugzilla.kernel.org/show_bug.cgi?id=13677

Does it also happen with Nir's nconfig
(http://lkml.org/lkml/2009/11/25/119)?

Michal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 19:56     ` Michal Marek
@ 2009-12-08 20:07       ` Arkadiusz Miskiewicz
  2009-12-08 20:24         ` Michal Marek
  0 siblings, 1 reply; 10+ messages in thread
From: Arkadiusz Miskiewicz @ 2009-12-08 20:07 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-kbuild

On Tuesday 08 of December 2009, Michal Marek wrote:
> Arkadiusz Miskiewicz napsal(a):
> > On Tuesday 08 of December 2009, Sam Ravnborg wrote:
> >> On Tue, Dec 08, 2009 at 01:52:31PM +0100, Michal Marek wrote:
> >>> Sam was fine with handing over kbuild maintainership to me. The git
> >>> trees are already in linux-next, a merge request will follow shortly.
> >>
> >> Yep - thanks for taken over this. Glad to see this is maintained
> >> properly.
> >
> > Maybe we can get colors back in menuconfig then? ;-)
> > http://bugzilla.kernel.org/show_bug.cgi?id=13677
> 
> Does it also happen with Nir's nconfig
> (http://lkml.org/lkml/2009/11/25/119)?

Yes, it does happen, I have non-color menus. That's because nconfig also mixes 
wide ncurses library with non wide ncurses headers.

  gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes -Wstrict-
prototypes -O2 -fomit-frame-pointer   -I/usr/include/ncurses -
DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/nconf.o 
scripts/kconfig/nconf.c

/usr/include/ncurses is non wide version of ncurses headers (but on other 
distros it could be done differently aka /usr/include/ncures being wide 
version)

  gcc  -o scripts/kconfig/nconf scripts/kconfig/nconf.o 
scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lncursesw -lmenu -
lpanel -lncurses

and here it's linked to non wide version of library (also to wide, too due to 
scripts/kconfig/lxdialog/check-lxdialog.sh putting it here)

Anyway way to solve this is:
- detect if ncurses header is wide or non-wide
- link with proper ncurses library based on detected header

> Michal

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 20:07       ` Arkadiusz Miskiewicz
@ 2009-12-08 20:24         ` Michal Marek
  2009-12-08 20:31           ` Arkadiusz Miskiewicz
  2009-12-09  6:22           ` Nir Tzachar
  0 siblings, 2 replies; 10+ messages in thread
From: Michal Marek @ 2009-12-08 20:24 UTC (permalink / raw)
  To: Arkadiusz Miskiewicz, Nir Tzachar; +Cc: linux-kernel, linux-kbuild

Arkadiusz Miskiewicz napsal(a):
> On Tuesday 08 of December 2009, Michal Marek wrote:
>> Arkadiusz Miskiewicz napsal(a):
>>> Maybe we can get colors back in menuconfig then? ;-)
>>> http://bugzilla.kernel.org/show_bug.cgi?id=13677
>> Does it also happen with Nir's nconfig
>> (http://lkml.org/lkml/2009/11/25/119)?
> 
> Yes, it does happen, I have non-color menus. That's because nconfig also mixes 
> wide ncurses library with non wide ncurses headers.
> 
>   gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes -Wstrict-
> prototypes -O2 -fomit-frame-pointer   -I/usr/include/ncurses -
> DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/nconf.o 
> scripts/kconfig/nconf.c
> 
> /usr/include/ncurses is non wide version of ncurses headers (but on other 
> distros it could be done differently aka /usr/include/ncures being wide 
> version)
> 
>   gcc  -o scripts/kconfig/nconf scripts/kconfig/nconf.o 
> scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lncursesw -lmenu -
> lpanel -lncurses
> 
> and here it's linked to non wide version of library (also to wide, too due to 
> scripts/kconfig/lxdialog/check-lxdialog.sh putting it here)
> 
> Anyway way to solve this is:
> - detect if ncurses header is wide or non-wide
> - link with proper ncurses library based on detected header

Nir, you surely know ncurses better than me :). Could you look into
this?   Arkadiusz, which distribution are you using?

Michal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 20:24         ` Michal Marek
@ 2009-12-08 20:31           ` Arkadiusz Miskiewicz
  2009-12-09  6:22           ` Nir Tzachar
  1 sibling, 0 replies; 10+ messages in thread
From: Arkadiusz Miskiewicz @ 2009-12-08 20:31 UTC (permalink / raw)
  To: Michal Marek; +Cc: Nir Tzachar, linux-kernel, linux-kbuild

On Tuesday 08 of December 2009, Michal Marek wrote:
> Arkadiusz Miskiewicz napsal(a):
> > On Tuesday 08 of December 2009, Michal Marek wrote:
> >> Arkadiusz Miskiewicz napsal(a):
> >>> Maybe we can get colors back in menuconfig then? ;-)
> >>> http://bugzilla.kernel.org/show_bug.cgi?id=13677
> >>
> >> Does it also happen with Nir's nconfig
> >> (http://lkml.org/lkml/2009/11/25/119)?
> >
> > Yes, it does happen, I have non-color menus. That's because nconfig also
> > mixes wide ncurses library with non wide ncurses headers.
> >
> >   gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes
> > -Wstrict- prototypes -O2 -fomit-frame-pointer   -I/usr/include/ncurses -
> > DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/nconf.o
> > scripts/kconfig/nconf.c
> >
> > /usr/include/ncurses is non wide version of ncurses headers (but on other
> > distros it could be done differently aka /usr/include/ncures being wide
> > version)
> >
> >   gcc  -o scripts/kconfig/nconf scripts/kconfig/nconf.o
> > scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lncursesw -lmenu
> > - lpanel -lncurses
> >
> > and here it's linked to non wide version of library (also to wide, too
> > due to scripts/kconfig/lxdialog/check-lxdialog.sh putting it here)
> >
> > Anyway way to solve this is:
> > - detect if ncurses header is wide or non-wide
> > - link with proper ncurses library based on detected header
> 
> Nir, you surely know ncurses better than me :). Could you look into
> this?   Arkadiusz, which distribution are you using?

PLD/Linux

> Michal

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-08 20:24         ` Michal Marek
  2009-12-08 20:31           ` Arkadiusz Miskiewicz
@ 2009-12-09  6:22           ` Nir Tzachar
  2009-12-09  6:28             ` Arkadiusz Miskiewicz
  1 sibling, 1 reply; 10+ messages in thread
From: Nir Tzachar @ 2009-12-09  6:22 UTC (permalink / raw)
  To: Michal Marek; +Cc: Arkadiusz Miskiewicz, linux-kernel, linux-kbuild

Hello.

On Tue, Dec 8, 2009 at 10:24 PM, Michal Marek <mmarek@suse.cz> wrote:
> Arkadiusz Miskiewicz napsal(a):
>> On Tuesday 08 of December 2009, Michal Marek wrote:
>>> Arkadiusz Miskiewicz napsal(a):
>>>> Maybe we can get colors back in menuconfig then? ;-)
>>>> http://bugzilla.kernel.org/show_bug.cgi?id=13677
>>> Does it also happen with Nir's nconfig
>>> (http://lkml.org/lkml/2009/11/25/119)?
>>
>> Yes, it does happen, I have non-color menus. That's because nconfig also mixes
>> wide ncurses library with non wide ncurses headers.
>>
>>   gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes -Wstrict-
>> prototypes -O2 -fomit-frame-pointer   -I/usr/include/ncurses -
>> DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/nconf.o
>> scripts/kconfig/nconf.c
>>
>> /usr/include/ncurses is non wide version of ncurses headers (but on other
>> distros it could be done differently aka /usr/include/ncures being wide
>> version)
>>
>>   gcc  -o scripts/kconfig/nconf scripts/kconfig/nconf.o
>> scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lncursesw -lmenu -
>> lpanel -lncurses
>>
>> and here it's linked to non wide version of library (also to wide, too due to
>> scripts/kconfig/lxdialog/check-lxdialog.sh putting it here)
>>
>> Anyway way to solve this is:
>> - detect if ncurses header is wide or non-wide
>> - link with proper ncurses library based on detected header
>
> Nir, you surely know ncurses better than me :). Could you look into
> this?   Arkadiusz, which distribution are you using?
>
> Michal
>

Well, I see the problem, but it does not manifest on my machines.
The thing is that lxdialog/check-lxdialog.sh always adds ncursesw to
the library path, even if the narrow version exists. I believe this is
set so that if there is only an installation of ncursesw everything
will work fine. However, it does not take into account that on most
systems (at least those I have seen) both of the versions are
installed.

As nconfig does not use any wide version function, and I believe
lxdialog does not also, I think we can remove ncursesw from the
libraries.

Arkadiusz, do the patch below help?

diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh
b/scripts/kconfig/lxdialog/check-lxdialog.sh
index fcef0f5..5596d0c 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -5,7 +5,7 @@
 ldflags()
 {
        for ext in so a dylib ; do
-               for lib in ncursesw ncurses curses ; do
+               for lib in ncurses curses ; do
                        $cc -print-file-name=lib${lib}.${ext} | grep -q /
                        if [ $? -eq 0 ]; then
                                echo "-l${lib}"


Moreover, currently nconfig does not use this check. It should be made
common to both mconf and nconf, and we need to make sure adding the
appropriate libraries only to the targets which need them (currently,
-lncurses is added to all targets in scripts/kbuild ...) Below is a
very hackish patch which does this. However, having a proper Makefile
for lxdialog would be much better.

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 6d69c7c..e0c7714 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -23,6 +23,9 @@ menuconfig: $(obj)/mconf
 config: $(obj)/conf
 	$< $(Kconfig)

+nconfig: $(obj)/nconf
+	$< $(Kconfig)
+
 oldconfig: $(obj)/conf
 	$< -o $(Kconfig)

@@ -109,6 +112,7 @@ endif
 # Help text used by make help
 help:
 	@echo  '  config	  - Update current config utilising a line-oriented program'
+	@echo  '  nconfig         - Update current config utilising a
ncurses menu based program'
 	@echo  '  menuconfig	  - Update current config utilising a menu based program'
 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
@@ -127,8 +131,8 @@ check-lxdialog  :=
$(srctree)/$(src)/lxdialog/check-lxdialog.sh

 # Use recursively expanded variables so we do not call gcc unless
 # we really need to do so. (Do not call gcc as part of make mrproper)
-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
-HOST_LOADLIBES   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags
$(HOSTCC))
+NCURSESCFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
+NCURSESLIBS   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))

 HOST_EXTRACFLAGS += -DLOCALE

@@ -136,6 +140,8 @@ HOST_EXTRACFLAGS += -DLOCALE
 # ===========================================================================
 # Shared Makefile for the various kconfig executables:
 # conf:	  Used for defconfig, oldconfig and related targets
+# nconf:  Used for the nconfig target.
+#         Utilizes ncurses
 # mconf:  Used for the menuconfig target
 #         Utilizes the lxdialog package
 # qconf:  Used for the xconfig target
@@ -147,12 +153,30 @@ HOST_EXTRACFLAGS += -DLOCALE
 lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
 lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o

+HOSTCFLAGS_checklist.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_util.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_inputbox.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_textbox.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_yesno.o  = $(NCURSESCFLAGS)
+HOSTCFLAGS_menubox.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_mconf.o = $(NCURSESCFLAGS)
+
+HOSTCFLAGS_nconf.gui.o = $(NCURSESCFLAGS)
+HOSTCFLAGS_nconf.o = $(NCURSESCFLAGS)
+
+HOSTLOADLIBES_mconf = $(NCURSESLIBS)
+
 conf-objs	:= conf.o  zconf.tab.o
-mconf-objs	:= mconf.o zconf.tab.o $(lxdialog)
+mconf-objs     := mconf.o zconf.tab.o $(lxdialog)
+nconf-objs     := nconf.o zconf.tab.o nconf.gui.o
 kxgettext-objs	:= kxgettext.o zconf.tab.o

 hostprogs-y := conf qconf gconf kxgettext

+ifeq ($(MAKECMDGOALS),nconfig)
+	hostprogs-y += nconf
+endif
+
 ifeq ($(MAKECMDGOALS),menuconfig)
 	hostprogs-y += mconf
 endif
@@ -176,14 +200,14 @@ endif

 clean-files	:= lkc_defs.h qconf.moc .tmp_qtcheck \
 		   .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
-clean-files     += mconf qconf gconf
+clean-files     += mconf qconf gconf nconf
 clean-files     += config.pot linux.pot

 # Check that we have the required ncurses stuff installed for
lxdialog (menuconfig)
 PHONY += $(obj)/dochecklxdialog
 $(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
 $(obj)/dochecklxdialog:
-	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC)
$(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
+	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC)
$(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $(NCURSESCFLAGS) $(NCURSESLIBS)

 always := dochecklxdialog

@@ -201,6 +225,7 @@ HOSTLOADLIBES_gconf	= `pkg-config --libs gtk+-2.0
gmodule-2.0 libglade-2.0`
 HOSTCFLAGS_gconf.o	= `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
                           -D LKC_DIRECT_LINK

+HOSTLOADLIBES_nconf	= -lmenu -lpanel $(NCURSESLIBS)
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck

 ifeq ($(qconf-target),1)

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-09  6:22           ` Nir Tzachar
@ 2009-12-09  6:28             ` Arkadiusz Miskiewicz
  2009-12-10 12:04               ` Nir Tzachar
  0 siblings, 1 reply; 10+ messages in thread
From: Arkadiusz Miskiewicz @ 2009-12-09  6:28 UTC (permalink / raw)
  To: Nir Tzachar; +Cc: Michal Marek, linux-kernel, linux-kbuild

On Wednesday 09 of December 2009, Nir Tzachar wrote:
> Hello.
> 
> On Tue, Dec 8, 2009 at 10:24 PM, Michal Marek <mmarek@suse.cz> wrote:
> > Arkadiusz Miskiewicz napsal(a):
> >> On Tuesday 08 of December 2009, Michal Marek wrote:
> >>> Arkadiusz Miskiewicz napsal(a):
> >>>> Maybe we can get colors back in menuconfig then? ;-)
> >>>> http://bugzilla.kernel.org/show_bug.cgi?id=13677
> >>>
> >>> Does it also happen with Nir's nconfig
> >>> (http://lkml.org/lkml/2009/11/25/119)?
> >>
> >> Yes, it does happen, I have non-color menus. That's because nconfig also
> >> mixes wide ncurses library with non wide ncurses headers.
> >>
> >>   gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes
> >> -Wstrict- prototypes -O2 -fomit-frame-pointer   -I/usr/include/ncurses -
> >> DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/nconf.o
> >> scripts/kconfig/nconf.c
> >>
> >> /usr/include/ncurses is non wide version of ncurses headers (but on
> >> other distros it could be done differently aka /usr/include/ncures being
> >> wide version)
> >>
> >>   gcc  -o scripts/kconfig/nconf scripts/kconfig/nconf.o
> >> scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lncursesw
> >> -lmenu - lpanel -lncurses
> >>
> >> and here it's linked to non wide version of library (also to wide, too
> >> due to scripts/kconfig/lxdialog/check-lxdialog.sh putting it here)
> >>
> >> Anyway way to solve this is:
> >> - detect if ncurses header is wide or non-wide
> >> - link with proper ncurses library based on detected header
> >
> > Nir, you surely know ncurses better than me :). Could you look into
> > this?   Arkadiusz, which distribution are you using?
> >
> > Michal
> 
> Well, I see the problem, but it does not manifest on my machines.
> The thing is that lxdialog/check-lxdialog.sh always adds ncursesw to
> the library path, even if the narrow version exists. I believe this is
> set so that if there is only an installation of ncursesw everything
> will work fine. However, it does not take into account that on most
> systems (at least those I have seen) both of the versions are
> installed.
> 
> As nconfig does not use any wide version function, and I believe
> lxdialog does not also, I think we can remove ncursesw from the
> libraries.
> 
> Arkadiusz, do the patch below help?
> 
> diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh
> b/scripts/kconfig/lxdialog/check-lxdialog.sh
> index fcef0f5..5596d0c 100644
> --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> @@ -5,7 +5,7 @@
>  ldflags()
>  {
>         for ext in so a dylib ; do
> -               for lib in ncursesw ncurses curses ; do
> +               for lib in ncurses curses ; do
>                         $cc -print-file-name=lib${lib}.${ext} | grep -q /
>                         if [ $? -eq 0 ]; then
>                                 echo "-l${lib}"
> 

On my disto it works but it won't on a distro where /usr/include/ncurses 
contains wide version of headers.

> 
> Moreover, currently nconfig does not use this check.

I was testing on linus git and this flags from this check were used in nconfig 
build, too (that's why there were ncurses and ncursesw at the same time in 
linking command).

> It should be made
> common to both mconf and nconf, and we need to make sure adding the
> appropriate libraries only to the targets which need them (currently,
> -lncurses is added to all targets in scripts/kbuild ...) Below is a
> very hackish patch which does this. However, having a proper Makefile
> for lxdialog would be much better.
> 
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 6d69c7c..e0c7714 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -23,6 +23,9 @@ menuconfig: $(obj)/mconf
>  config: $(obj)/conf
>  	$< $(Kconfig)
> 
> +nconfig: $(obj)/nconf
> +	$< $(Kconfig)
> +
>  oldconfig: $(obj)/conf
>  	$< -o $(Kconfig)
> 
> @@ -109,6 +112,7 @@ endif
>  # Help text used by make help
>  help:
>  	@echo  '  config	  - Update current config utilising a line-oriented
>  program' +	@echo  '  nconfig         - Update current config utilising a
> ncurses menu based program'
>  	@echo  '  menuconfig	  - Update current config utilising a menu based
>  program' @echo  '  xconfig	  - Update current config utilising a QT based
>  front-end' @echo  '  gconfig	  - Update current config utilising a GTK
>  based front-end' @@ -127,8 +131,8 @@ check-lxdialog  :=
> $(srctree)/$(src)/lxdialog/check-lxdialog.sh
> 
>  # Use recursively expanded variables so we do not call gcc unless
>  # we really need to do so. (Do not call gcc as part of make mrproper)
> -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
> -HOST_LOADLIBES   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags
> $(HOSTCC))
> +NCURSESCFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
> +NCURSESLIBS   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags
>  $(HOSTCC))
> 
>  HOST_EXTRACFLAGS += -DLOCALE
> 
> @@ -136,6 +140,8 @@ HOST_EXTRACFLAGS += -DLOCALE
>  #
>  ==========================================================================
> = # Shared Makefile for the various kconfig executables:
>  # conf:	  Used for defconfig, oldconfig and related targets
> +# nconf:  Used for the nconfig target.
> +#         Utilizes ncurses
>  # mconf:  Used for the menuconfig target
>  #         Utilizes the lxdialog package
>  # qconf:  Used for the xconfig target
> @@ -147,12 +153,30 @@ HOST_EXTRACFLAGS += -DLOCALE
>  lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
>  lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
> 
> +HOSTCFLAGS_checklist.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_util.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_inputbox.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_textbox.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_yesno.o  = $(NCURSESCFLAGS)
> +HOSTCFLAGS_menubox.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_mconf.o = $(NCURSESCFLAGS)
> +
> +HOSTCFLAGS_nconf.gui.o = $(NCURSESCFLAGS)
> +HOSTCFLAGS_nconf.o = $(NCURSESCFLAGS)
> +
> +HOSTLOADLIBES_mconf = $(NCURSESLIBS)
> +
>  conf-objs	:= conf.o  zconf.tab.o
> -mconf-objs	:= mconf.o zconf.tab.o $(lxdialog)
> +mconf-objs     := mconf.o zconf.tab.o $(lxdialog)
> +nconf-objs     := nconf.o zconf.tab.o nconf.gui.o
>  kxgettext-objs	:= kxgettext.o zconf.tab.o
> 
>  hostprogs-y := conf qconf gconf kxgettext
> 
> +ifeq ($(MAKECMDGOALS),nconfig)
> +	hostprogs-y += nconf
> +endif
> +
>  ifeq ($(MAKECMDGOALS),menuconfig)
>  	hostprogs-y += mconf
>  endif
> @@ -176,14 +200,14 @@ endif
> 
>  clean-files	:= lkc_defs.h qconf.moc .tmp_qtcheck \
>  		   .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
> -clean-files     += mconf qconf gconf
> +clean-files     += mconf qconf gconf nconf
>  clean-files     += config.pot linux.pot
> 
>  # Check that we have the required ncurses stuff installed for
> lxdialog (menuconfig)
>  PHONY += $(obj)/dochecklxdialog
>  $(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
>  $(obj)/dochecklxdialog:
> -	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC)
> $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
> +	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC)
> $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $(NCURSESCFLAGS) $(NCURSESLIBS)
> 
>  always := dochecklxdialog
> 
> @@ -201,6 +225,7 @@ HOSTLOADLIBES_gconf	= `pkg-config --libs gtk+-2.0
> gmodule-2.0 libglade-2.0`
>  HOSTCFLAGS_gconf.o	= `pkg-config --cflags gtk+-2.0 gmodule-2.0
>  libglade-2.0` \ -D LKC_DIRECT_LINK
> 
> +HOSTLOADLIBES_nconf	= -lmenu -lpanel $(NCURSESLIBS)
>  $(obj)/qconf.o: $(obj)/.tmp_qtcheck
> 
>  ifeq ($(qconf-target),1)
> 


-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] MAINTAINERS: new kbuild maintainer
  2009-12-09  6:28             ` Arkadiusz Miskiewicz
@ 2009-12-10 12:04               ` Nir Tzachar
  0 siblings, 0 replies; 10+ messages in thread
From: Nir Tzachar @ 2009-12-10 12:04 UTC (permalink / raw)
  To: Arkadiusz Miskiewicz; +Cc: Michal Marek, linux-kernel, linux-kbuild

>
> On my disto it works but it won't on a distro where /usr/include/ncurses
> contains wide version of headers.

ncurses does not support a proper pkg-config scheme, hence the
difficulty with finding the correct flags. Regarding the wideness of
the library, I would presume that any distro which mismatches
/usr/include/ncurses.h and libncurses.so is in itself broken. Taking
this into consideration, I think that including /usr/include/ncurses.h
and linking against -lncurses should work. We should entirely ignore
the wide version of the library, and use the default installation
provided.

>
>>
>> Moreover, currently nconfig does not use this check.
>
> I was testing on linus git and this flags from this check were used in nconfig
> build, too (that's why there were ncurses and ncursesw at the same time in
> linking command).

Well, I do not know why, by the check changed the flags for _all_
targets in the scripts/kconfig dir, such that even qconfig got copiled
with -lncursesw. Strange. The change I made in the Makefile in the
previous mail fixes that.

Cheers,
Nir.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-10 12:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-08 12:52 [PATCH] MAINTAINERS: new kbuild maintainer Michal Marek
2009-12-08 13:18 ` Sam Ravnborg
2009-12-08 15:11   ` Arkadiusz Miskiewicz
2009-12-08 19:56     ` Michal Marek
2009-12-08 20:07       ` Arkadiusz Miskiewicz
2009-12-08 20:24         ` Michal Marek
2009-12-08 20:31           ` Arkadiusz Miskiewicz
2009-12-09  6:22           ` Nir Tzachar
2009-12-09  6:28             ` Arkadiusz Miskiewicz
2009-12-10 12:04               ` Nir Tzachar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.