Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-24 Thread Masahiro Yamada
Randy,

2018-05-20 7:42 GMT+09:00 Randy Dunlap :
> On 05/17/18 22:10, Masahiro Yamada wrote:
>> Hi Randy,
>>
>> 2018-04-07 6:37 GMT+09:00 Randy Dunlap :
>>> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
> From: Randy Dunlap 
>
> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
> that other required files are present, but none of these check that
> pkg-config itself is present.  Add a check for all 4 of these targets.
>
> Fixes kernel bugzilla #77511:
> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>
> Signed-off-by: Randy Dunlap 
> ---
> v2: use 'command -v' instead of 'which'
>
> I'm also OK with just documenting the pkg-config requirement in
> Documentation/Changes (= Documentation/process/changes.rst).
>
>  scripts/kconfig/Makefile   |   15 ++-
>  scripts/kconfig/check-pkgconfig.sh |   12 
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
> +++ lnx-416-rc3/scripts/kconfig/Makefile
> @@ -160,6 +160,9 @@ help:
> @echo  '  xenconfig   - Enable additional options for xen 
> dom0 and guest kernel support'
> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>
> +# pkg-config check
> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
> +
>  # lxdialog stuff
>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>
> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>  $(obj)/dochecklxdialog:
> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>
> -always := dochecklxdialog
> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
> +PHONY += $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
> +
> +$(obj)/docheckpkgconfig:
> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
> +
> +always := docheckpkgconfig dochecklxdialog


 I did not test this patch, but does this check work as expected?

 Probably we want to run 'docheckpkgconfig'
 before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
 But, I do not see such dependencies.


 Also, if we make 'pkg-config' mandatory,
 should we entirely drop fall-back logics like follows?

 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230


 What do you think?

>>>
>>> Hi,
>>>
>>> I'm willing to keep patching/testing on this, but both pkg-config and depmod
>>> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
>>> are basic requirements IMO, so just documenting their requirements is good
>>> enough to me, but might not be good enough for some users.
>>>
>>> Comments?
>>
>> Sorry for late comments.
>>
>> OK, I am fine with making pkg-config a requirement.
>> (and it should be documented)
>>
>> But, I'd like to clean-up scripts/kconfig/Makefile first.
>> It is already cluttered, and hesitate to add new code based on that.
>> I posted the patches.
>>
>> Could you send v3 after the cleaning work is done?
>
> Sure, I'll give it a try.


Now, I am ready to receive v3.




-- 
Best Regards
Masahiro Yamada


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-24 Thread Masahiro Yamada
Randy,

2018-05-20 7:42 GMT+09:00 Randy Dunlap :
> On 05/17/18 22:10, Masahiro Yamada wrote:
>> Hi Randy,
>>
>> 2018-04-07 6:37 GMT+09:00 Randy Dunlap :
>>> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
> From: Randy Dunlap 
>
> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
> that other required files are present, but none of these check that
> pkg-config itself is present.  Add a check for all 4 of these targets.
>
> Fixes kernel bugzilla #77511:
> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>
> Signed-off-by: Randy Dunlap 
> ---
> v2: use 'command -v' instead of 'which'
>
> I'm also OK with just documenting the pkg-config requirement in
> Documentation/Changes (= Documentation/process/changes.rst).
>
>  scripts/kconfig/Makefile   |   15 ++-
>  scripts/kconfig/check-pkgconfig.sh |   12 
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
> +++ lnx-416-rc3/scripts/kconfig/Makefile
> @@ -160,6 +160,9 @@ help:
> @echo  '  xenconfig   - Enable additional options for xen 
> dom0 and guest kernel support'
> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>
> +# pkg-config check
> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
> +
>  # lxdialog stuff
>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>
> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>  $(obj)/dochecklxdialog:
> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>
> -always := dochecklxdialog
> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
> +PHONY += $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
> +
> +$(obj)/docheckpkgconfig:
> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
> +
> +always := docheckpkgconfig dochecklxdialog


 I did not test this patch, but does this check work as expected?

 Probably we want to run 'docheckpkgconfig'
 before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
 But, I do not see such dependencies.


 Also, if we make 'pkg-config' mandatory,
 should we entirely drop fall-back logics like follows?

 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
 https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230


 What do you think?

>>>
>>> Hi,
>>>
>>> I'm willing to keep patching/testing on this, but both pkg-config and depmod
>>> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
>>> are basic requirements IMO, so just documenting their requirements is good
>>> enough to me, but might not be good enough for some users.
>>>
>>> Comments?
>>
>> Sorry for late comments.
>>
>> OK, I am fine with making pkg-config a requirement.
>> (and it should be documented)
>>
>> But, I'd like to clean-up scripts/kconfig/Makefile first.
>> It is already cluttered, and hesitate to add new code based on that.
>> I posted the patches.
>>
>> Could you send v3 after the cleaning work is done?
>
> Sure, I'll give it a try.


Now, I am ready to receive v3.




-- 
Best Regards
Masahiro Yamada


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-19 Thread Randy Dunlap
On 05/17/18 22:10, Masahiro Yamada wrote:
> Hi Randy,
> 
> 2018-04-07 6:37 GMT+09:00 Randy Dunlap :
>> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
>>> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
 From: Randy Dunlap 

 Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
 that other required files are present, but none of these check that
 pkg-config itself is present.  Add a check for all 4 of these targets.

 Fixes kernel bugzilla #77511:
 https://bugzilla.kernel.org/show_bug.cgi?id=77511

 Signed-off-by: Randy Dunlap 
 ---
 v2: use 'command -v' instead of 'which'

 I'm also OK with just documenting the pkg-config requirement in
 Documentation/Changes (= Documentation/process/changes.rst).

  scripts/kconfig/Makefile   |   15 ++-
  scripts/kconfig/check-pkgconfig.sh |   12 
  2 files changed, 26 insertions(+), 1 deletion(-)

 --- lnx-416-rc3.orig/scripts/kconfig/Makefile
 +++ lnx-416-rc3/scripts/kconfig/Makefile
 @@ -160,6 +160,9 @@ help:
 @echo  '  xenconfig   - Enable additional options for xen dom0 
 and guest kernel support'
 @echo  '  tinyconfig  - Configure the tiniest possible kernel'

 +# pkg-config check
 +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
 +
  # lxdialog stuff
  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh

 @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
  $(obj)/dochecklxdialog:
 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
 $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)

 -always := dochecklxdialog
 +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
 +PHONY += $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
 +
 +$(obj)/docheckpkgconfig:
 +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
 +
 +always := docheckpkgconfig dochecklxdialog
>>>
>>>
>>> I did not test this patch, but does this check work as expected?
>>>
>>> Probably we want to run 'docheckpkgconfig'
>>> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
>>> But, I do not see such dependencies.
>>>
>>>
>>> Also, if we make 'pkg-config' mandatory,
>>> should we entirely drop fall-back logics like follows?
>>>
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
>>>
>>>
>>> What do you think?
>>>
>>
>> Hi,
>>
>> I'm willing to keep patching/testing on this, but both pkg-config and depmod
>> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
>> are basic requirements IMO, so just documenting their requirements is good
>> enough to me, but might not be good enough for some users.
>>
>> Comments?
> 
> Sorry for late comments.
> 
> OK, I am fine with making pkg-config a requirement.
> (and it should be documented)
> 
> But, I'd like to clean-up scripts/kconfig/Makefile first.
> It is already cluttered, and hesitate to add new code based on that.
> I posted the patches.
> 
> Could you send v3 after the cleaning work is done?

Sure, I'll give it a try.

thanks.
-- 
~Randy


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-19 Thread Randy Dunlap
On 05/17/18 22:10, Masahiro Yamada wrote:
> Hi Randy,
> 
> 2018-04-07 6:37 GMT+09:00 Randy Dunlap :
>> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
>>> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
 From: Randy Dunlap 

 Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
 that other required files are present, but none of these check that
 pkg-config itself is present.  Add a check for all 4 of these targets.

 Fixes kernel bugzilla #77511:
 https://bugzilla.kernel.org/show_bug.cgi?id=77511

 Signed-off-by: Randy Dunlap 
 ---
 v2: use 'command -v' instead of 'which'

 I'm also OK with just documenting the pkg-config requirement in
 Documentation/Changes (= Documentation/process/changes.rst).

  scripts/kconfig/Makefile   |   15 ++-
  scripts/kconfig/check-pkgconfig.sh |   12 
  2 files changed, 26 insertions(+), 1 deletion(-)

 --- lnx-416-rc3.orig/scripts/kconfig/Makefile
 +++ lnx-416-rc3/scripts/kconfig/Makefile
 @@ -160,6 +160,9 @@ help:
 @echo  '  xenconfig   - Enable additional options for xen dom0 
 and guest kernel support'
 @echo  '  tinyconfig  - Configure the tiniest possible kernel'

 +# pkg-config check
 +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
 +
  # lxdialog stuff
  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh

 @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
  $(obj)/dochecklxdialog:
 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
 $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)

 -always := dochecklxdialog
 +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
 +PHONY += $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
 +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
 +
 +$(obj)/docheckpkgconfig:
 +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
 +
 +always := docheckpkgconfig dochecklxdialog
>>>
>>>
>>> I did not test this patch, but does this check work as expected?
>>>
>>> Probably we want to run 'docheckpkgconfig'
>>> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
>>> But, I do not see such dependencies.
>>>
>>>
>>> Also, if we make 'pkg-config' mandatory,
>>> should we entirely drop fall-back logics like follows?
>>>
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
>>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
>>>
>>>
>>> What do you think?
>>>
>>
>> Hi,
>>
>> I'm willing to keep patching/testing on this, but both pkg-config and depmod
>> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
>> are basic requirements IMO, so just documenting their requirements is good
>> enough to me, but might not be good enough for some users.
>>
>> Comments?
> 
> Sorry for late comments.
> 
> OK, I am fine with making pkg-config a requirement.
> (and it should be documented)
> 
> But, I'd like to clean-up scripts/kconfig/Makefile first.
> It is already cluttered, and hesitate to add new code based on that.
> I posted the patches.
> 
> Could you send v3 after the cleaning work is done?

Sure, I'll give it a try.

thanks.
-- 
~Randy


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-17 Thread Masahiro Yamada
Hi Randy,

2018-04-07 6:37 GMT+09:00 Randy Dunlap :
> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
>> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
>>> From: Randy Dunlap 
>>>
>>> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
>>> that other required files are present, but none of these check that
>>> pkg-config itself is present.  Add a check for all 4 of these targets.
>>>
>>> Fixes kernel bugzilla #77511:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>>>
>>> Signed-off-by: Randy Dunlap 
>>> ---
>>> v2: use 'command -v' instead of 'which'
>>>
>>> I'm also OK with just documenting the pkg-config requirement in
>>> Documentation/Changes (= Documentation/process/changes.rst).
>>>
>>>  scripts/kconfig/Makefile   |   15 ++-
>>>  scripts/kconfig/check-pkgconfig.sh |   12 
>>>  2 files changed, 26 insertions(+), 1 deletion(-)
>>>
>>> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
>>> +++ lnx-416-rc3/scripts/kconfig/Makefile
>>> @@ -160,6 +160,9 @@ help:
>>> @echo  '  xenconfig   - Enable additional options for xen dom0 
>>> and guest kernel support'
>>> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>>>
>>> +# pkg-config check
>>> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
>>> +
>>>  # lxdialog stuff
>>>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>>>
>>> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>>>  $(obj)/dochecklxdialog:
>>> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
>>> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>>>
>>> -always := dochecklxdialog
>>> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
>>> +PHONY += $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
>>> +
>>> +$(obj)/docheckpkgconfig:
>>> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
>>> +
>>> +always := docheckpkgconfig dochecklxdialog
>>
>>
>> I did not test this patch, but does this check work as expected?
>>
>> Probably we want to run 'docheckpkgconfig'
>> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
>> But, I do not see such dependencies.
>>
>>
>> Also, if we make 'pkg-config' mandatory,
>> should we entirely drop fall-back logics like follows?
>>
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
>>
>>
>> What do you think?
>>
>
> Hi,
>
> I'm willing to keep patching/testing on this, but both pkg-config and depmod
> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
> are basic requirements IMO, so just documenting their requirements is good
> enough to me, but might not be good enough for some users.
>
> Comments?

Sorry for late comments.

OK, I am fine with making pkg-config a requirement.
(and it should be documented)

But, I'd like to clean-up scripts/kconfig/Makefile first.
It is already cluttered, and hesitate to add new code based on that.
I posted the patches.

Could you send v3 after the cleaning work is done?

-- 
Best Regards
Masahiro Yamada


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-05-17 Thread Masahiro Yamada
Hi Randy,

2018-04-07 6:37 GMT+09:00 Randy Dunlap :
> On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
>> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
>>> From: Randy Dunlap 
>>>
>>> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
>>> that other required files are present, but none of these check that
>>> pkg-config itself is present.  Add a check for all 4 of these targets.
>>>
>>> Fixes kernel bugzilla #77511:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>>>
>>> Signed-off-by: Randy Dunlap 
>>> ---
>>> v2: use 'command -v' instead of 'which'
>>>
>>> I'm also OK with just documenting the pkg-config requirement in
>>> Documentation/Changes (= Documentation/process/changes.rst).
>>>
>>>  scripts/kconfig/Makefile   |   15 ++-
>>>  scripts/kconfig/check-pkgconfig.sh |   12 
>>>  2 files changed, 26 insertions(+), 1 deletion(-)
>>>
>>> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
>>> +++ lnx-416-rc3/scripts/kconfig/Makefile
>>> @@ -160,6 +160,9 @@ help:
>>> @echo  '  xenconfig   - Enable additional options for xen dom0 
>>> and guest kernel support'
>>> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>>>
>>> +# pkg-config check
>>> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
>>> +
>>>  # lxdialog stuff
>>>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>>>
>>> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>>>  $(obj)/dochecklxdialog:
>>> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
>>> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>>>
>>> -always := dochecklxdialog
>>> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
>>> +PHONY += $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
>>> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
>>> +
>>> +$(obj)/docheckpkgconfig:
>>> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
>>> +
>>> +always := docheckpkgconfig dochecklxdialog
>>
>>
>> I did not test this patch, but does this check work as expected?
>>
>> Probably we want to run 'docheckpkgconfig'
>> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
>> But, I do not see such dependencies.
>>
>>
>> Also, if we make 'pkg-config' mandatory,
>> should we entirely drop fall-back logics like follows?
>>
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
>> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
>>
>>
>> What do you think?
>>
>
> Hi,
>
> I'm willing to keep patching/testing on this, but both pkg-config and depmod
> (for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
> are basic requirements IMO, so just documenting their requirements is good
> enough to me, but might not be good enough for some users.
>
> Comments?

Sorry for late comments.

OK, I am fine with making pkg-config a requirement.
(and it should be documented)

But, I'd like to clean-up scripts/kconfig/Makefile first.
It is already cluttered, and hesitate to add new code based on that.
I posted the patches.

Could you send v3 after the cleaning work is done?

-- 
Best Regards
Masahiro Yamada


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-04-06 Thread Randy Dunlap
On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
>> From: Randy Dunlap 
>>
>> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
>> that other required files are present, but none of these check that
>> pkg-config itself is present.  Add a check for all 4 of these targets.
>>
>> Fixes kernel bugzilla #77511:
>> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>>
>> Signed-off-by: Randy Dunlap 
>> ---
>> v2: use 'command -v' instead of 'which'
>>
>> I'm also OK with just documenting the pkg-config requirement in
>> Documentation/Changes (= Documentation/process/changes.rst).
>>
>>  scripts/kconfig/Makefile   |   15 ++-
>>  scripts/kconfig/check-pkgconfig.sh |   12 
>>  2 files changed, 26 insertions(+), 1 deletion(-)
>>
>> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
>> +++ lnx-416-rc3/scripts/kconfig/Makefile
>> @@ -160,6 +160,9 @@ help:
>> @echo  '  xenconfig   - Enable additional options for xen dom0 
>> and guest kernel support'
>> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>>
>> +# pkg-config check
>> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
>> +
>>  # lxdialog stuff
>>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>>
>> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>>  $(obj)/dochecklxdialog:
>> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
>> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>>
>> -always := dochecklxdialog
>> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
>> +PHONY += $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
>> +
>> +$(obj)/docheckpkgconfig:
>> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
>> +
>> +always := docheckpkgconfig dochecklxdialog
> 
> 
> I did not test this patch, but does this check work as expected?
> 
> Probably we want to run 'docheckpkgconfig'
> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
> But, I do not see such dependencies.
> 
> 
> Also, if we make 'pkg-config' mandatory,
> should we entirely drop fall-back logics like follows?
> 
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
> 
> 
> What do you think?
> 

Hi,

I'm willing to keep patching/testing on this, but both pkg-config and depmod
(for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
are basic requirements IMO, so just documenting their requirements is good
enough to me, but might not be good enough for some users.

Comments?


> 
>>  # Add environment specific flags
>>  HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh 
>> $(HOSTCC) $(HOSTCFLAGS))
>> --- /dev/null
>> +++ lnx-416-rc3/scripts/kconfig/check-pkgconfig.sh
>> @@ -0,0 +1,12 @@
>> +#!/bin/sh
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Check for pkg-config presence
>> +
>> +pkgcfg=`command -v pkg-config`
>> +
>> +if [ "$pkgcfg" = "" ]; then
>> +   echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
>> +   exit 1  # error
>> +fi
>> +
>> +exit 0

thanks,
-- 
~Randy


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-04-06 Thread Randy Dunlap
On 03/14/2018 10:50 PM, Masahiro Yamada wrote:
> 2018-03-13 11:30 GMT+09:00 Randy Dunlap :
>> From: Randy Dunlap 
>>
>> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
>> that other required files are present, but none of these check that
>> pkg-config itself is present.  Add a check for all 4 of these targets.
>>
>> Fixes kernel bugzilla #77511:
>> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>>
>> Signed-off-by: Randy Dunlap 
>> ---
>> v2: use 'command -v' instead of 'which'
>>
>> I'm also OK with just documenting the pkg-config requirement in
>> Documentation/Changes (= Documentation/process/changes.rst).
>>
>>  scripts/kconfig/Makefile   |   15 ++-
>>  scripts/kconfig/check-pkgconfig.sh |   12 
>>  2 files changed, 26 insertions(+), 1 deletion(-)
>>
>> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
>> +++ lnx-416-rc3/scripts/kconfig/Makefile
>> @@ -160,6 +160,9 @@ help:
>> @echo  '  xenconfig   - Enable additional options for xen dom0 
>> and guest kernel support'
>> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>>
>> +# pkg-config check
>> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
>> +
>>  # lxdialog stuff
>>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>>
>> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>>  $(obj)/dochecklxdialog:
>> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
>> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>>
>> -always := dochecklxdialog
>> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
>> +PHONY += $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
>> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
>> +
>> +$(obj)/docheckpkgconfig:
>> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
>> +
>> +always := docheckpkgconfig dochecklxdialog
> 
> 
> I did not test this patch, but does this check work as expected?
> 
> Probably we want to run 'docheckpkgconfig'
> before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
> But, I do not see such dependencies.
> 
> 
> Also, if we make 'pkg-config' mandatory,
> should we entirely drop fall-back logics like follows?
> 
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
> https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230
> 
> 
> What do you think?
> 

Hi,

I'm willing to keep patching/testing on this, but both pkg-config and depmod
(for depmod, see: https://bugzilla.kernel.org/show_bug.cgi?id=198965)
are basic requirements IMO, so just documenting their requirements is good
enough to me, but might not be good enough for some users.

Comments?


> 
>>  # Add environment specific flags
>>  HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh 
>> $(HOSTCC) $(HOSTCFLAGS))
>> --- /dev/null
>> +++ lnx-416-rc3/scripts/kconfig/check-pkgconfig.sh
>> @@ -0,0 +1,12 @@
>> +#!/bin/sh
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Check for pkg-config presence
>> +
>> +pkgcfg=`command -v pkg-config`
>> +
>> +if [ "$pkgcfg" = "" ]; then
>> +   echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
>> +   exit 1  # error
>> +fi
>> +
>> +exit 0

thanks,
-- 
~Randy


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-03-14 Thread Masahiro Yamada
2018-03-13 11:30 GMT+09:00 Randy Dunlap :
> From: Randy Dunlap 
>
> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
> that other required files are present, but none of these check that
> pkg-config itself is present.  Add a check for all 4 of these targets.
>
> Fixes kernel bugzilla #77511:
> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>
> Signed-off-by: Randy Dunlap 
> ---
> v2: use 'command -v' instead of 'which'
>
> I'm also OK with just documenting the pkg-config requirement in
> Documentation/Changes (= Documentation/process/changes.rst).
>
>  scripts/kconfig/Makefile   |   15 ++-
>  scripts/kconfig/check-pkgconfig.sh |   12 
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
> +++ lnx-416-rc3/scripts/kconfig/Makefile
> @@ -160,6 +160,9 @@ help:
> @echo  '  xenconfig   - Enable additional options for xen dom0 
> and guest kernel support'
> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>
> +# pkg-config check
> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
> +
>  # lxdialog stuff
>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>
> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>  $(obj)/dochecklxdialog:
> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>
> -always := dochecklxdialog
> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
> +PHONY += $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
> +
> +$(obj)/docheckpkgconfig:
> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
> +
> +always := docheckpkgconfig dochecklxdialog


I did not test this patch, but does this check work as expected?

Probably we want to run 'docheckpkgconfig'
before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
But, I do not see such dependencies.


Also, if we make 'pkg-config' mandatory,
should we entirely drop fall-back logics like follows?

https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230


What do you think?


>  # Add environment specific flags
>  HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh 
> $(HOSTCC) $(HOSTCFLAGS))
> --- /dev/null
> +++ lnx-416-rc3/scripts/kconfig/check-pkgconfig.sh
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +# Check for pkg-config presence
> +
> +pkgcfg=`command -v pkg-config`
> +
> +if [ "$pkgcfg" = "" ]; then
> +   echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
> +   exit 1  # error
> +fi
> +
> +exit 0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada


Re: [PATCH v2] kbuild: check for pkg-config on make {menu,n,g,x}config

2018-03-14 Thread Masahiro Yamada
2018-03-13 11:30 GMT+09:00 Randy Dunlap :
> From: Randy Dunlap 
>
> Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
> that other required files are present, but none of these check that
> pkg-config itself is present.  Add a check for all 4 of these targets.
>
> Fixes kernel bugzilla #77511:
> https://bugzilla.kernel.org/show_bug.cgi?id=77511
>
> Signed-off-by: Randy Dunlap 
> ---
> v2: use 'command -v' instead of 'which'
>
> I'm also OK with just documenting the pkg-config requirement in
> Documentation/Changes (= Documentation/process/changes.rst).
>
>  scripts/kconfig/Makefile   |   15 ++-
>  scripts/kconfig/check-pkgconfig.sh |   12 
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
> --- lnx-416-rc3.orig/scripts/kconfig/Makefile
> +++ lnx-416-rc3/scripts/kconfig/Makefile
> @@ -160,6 +160,9 @@ help:
> @echo  '  xenconfig   - Enable additional options for xen dom0 
> and guest kernel support'
> @echo  '  tinyconfig  - Configure the tiniest possible kernel'
>
> +# pkg-config check
> +check-pkgconfig  := $(srctree)/$(src)/check-pkgconfig.sh
> +
>  # lxdialog stuff
>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
>
> @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)
>  $(obj)/dochecklxdialog:
> $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) 
> $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
>
> -always := dochecklxdialog
> +# Check that we have pkg-config (used by each of menu/n/g/xconfig)
> +PHONY += $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig
> +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig
> +
> +$(obj)/docheckpkgconfig:
> +   $(Q)$(CONFIG_SHELL) $(check-pkgconfig)
> +
> +always := docheckpkgconfig dochecklxdialog


I did not test this patch, but does this check work as expected?

Probably we want to run 'docheckpkgconfig'
before 'dochecklxdiag', '.tmp_gtkcheck', '.tmp_qtcheck', etc.
But, I do not see such dependencies.


Also, if we make 'pkg-config' mandatory,
should we entirely drop fall-back logics like follows?

https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L10
https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/lxdialog/check-lxdialog.sh#L29
https://github.com/torvalds/linux/blob/v4.16-rc5/scripts/kconfig/Makefile#L230


What do you think?


>  # Add environment specific flags
>  HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh 
> $(HOSTCC) $(HOSTCFLAGS))
> --- /dev/null
> +++ lnx-416-rc3/scripts/kconfig/check-pkgconfig.sh
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +# Check for pkg-config presence
> +
> +pkgcfg=`command -v pkg-config`
> +
> +if [ "$pkgcfg" = "" ]; then
> +   echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
> +   exit 1  # error
> +fi
> +
> +exit 0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada