[linux-yocto] [PATCH] scripts/kconfig: Fix menuconfig failure

He Zhe zhe.he at windriver.com
Tue Aug 14 00:59:21 PDT 2018



On 2018年08月13日 23:38, Bruce Ashfield wrote:
> Which kernel version(s) are you seeing this issue ? Just linux-yocto-dev ?

Yes, just linux-yocto-dev. The following porting for linux-yocto-dev changes a bit

from linux-yocto:

--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -4,6 +4,10 @@
 # What library to link
 ldflags()
 {
+       if [ "$CROSS_CURSES_LIB" != "" ]; then
+               echo "$CROSS_CURSES_LIB"
+               exit
+       fi
        pkg-config --libs ncursesw 2>/dev/null && exit
        pkg-config --libs ncurses 2>/dev/null && exit
        for ext in so a dll.a dylib ; do
@@ -21,6 +25,10 @@ ldflags()
 # Where is ncurses.h?
 ccflags()
 {
+       if [ x"$CROSS_CURSES_INC" != x ]; then
+               echo "$CROSS_CURSES_INC"
+               exit
+       fi

to linux-yocto-dev:

diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
index e6f9fac..557be6d 100755
--- a/scripts/kconfig/mconf-cfg.sh
+++ b/scripts/kconfig/mconf-cfg.sh
@@ -4,6 +4,14 @@
 PKG="ncursesw"
 PKG2="ncurses"
 
+if [ "$CROSS_CURSES_LIB" != "" ]; then
+       echo libs=\"$CROSS_CURSES_LIB\"
+       if [ x"$CROSS_CURSES_INC" != x ]; then
+               echo cflags=\"$CROSS_CURSES_INC\"
+       fi
+       exit 0
+fi
+


Zhe



>
> Bruce
>
> On 08/11/2018 11:11 AM, He Zhe wrote:
>> The folloing porting lacks of change log and breaks menuconfig.
>> CROSS_CURSES_LIB or CROSS_CURSES_INC contains xxx"<yyy>" which is
>> finially evaluated as "xxx"<yyy>"" in which < and > would be
>> considered as I/O redirection and cause the faliure below.
>>
>> 4ead19c77a5baaf44bfa6600b1be884e47c9d8f1
>> "menuconfig,mconf-cfg: Allow specification of ncurses location"
>>
>> scripts/kconfig/.mconf-cfg: line 2: curses.h: No such file or directory
>> ...
>> mconf.c:(.text+0x894): undefined reference to `stdscr'
>> ...
>> scripts/Makefile.host:99: recipe for target 'scripts/kconfig/mconf' failed
>>
>> This patch turns to use single quotes.
>>
>> Signed-off-by: He Zhe <zhe.he at windriver.com>
>> ---
>>   scripts/kconfig/mconf-cfg.sh | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
>> index 557be6dc1abf..3bd1f9a363e6 100755
>> --- a/scripts/kconfig/mconf-cfg.sh
>> +++ b/scripts/kconfig/mconf-cfg.sh
>> @@ -5,9 +5,9 @@ PKG="ncursesw"
>>   PKG2="ncurses"
>>     if [ "$CROSS_CURSES_LIB" != "" ]; then
>> -    echo libs=\"$CROSS_CURSES_LIB\"
>> +    echo libs=\'$CROSS_CURSES_LIB\'
>>       if [ x"$CROSS_CURSES_INC" != x ]; then
>> -        echo cflags=\"$CROSS_CURSES_INC\"
>> +        echo cflags=\'$CROSS_CURSES_INC\'
>>       fi
>>       exit 0
>>   fi
>>
>
>



More information about the linux-yocto mailing list