Skip to contentSkip to conversation

awk: line 2: function strtonum never defined

PATCH New kbuild test robot 2 participants 7 messages Oct 3, 2017

lore
Share & tools
lore

kbuild test robot

author build bot
#0 lore raw

Hi Russell,

FYI, the error/warning still remains.

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
head:   3cef8ede5ead55fbaf2225206f00361828adc3a1
commit: 887518f5e9963a82c3fc2ad8911eedb2304f8c57 [9/11] ARM: decompressor: fix BSS size calculation
config: arm-clps711x_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 887518f5e9963a82c3fc2ad8911eedb2304f8c57
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

>> awk: line 2: function strtonum never defined
>> awk: line 2: function strtonum never defined
--
>> awk: line 2: function strtonum never defined
>> awk: line 2: function strtonum never defined

arm-linux-gnueabi-nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 12371 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171003/dca33ac4/attachment-0001.gz>

#1 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

Shall I repeat my question from the last time this was reported?

Quoted 28 lines · kbuild test robot

Hi Russell,

FYI, the error/warning still remains.

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
head:   3cef8ede5ead55fbaf2225206f00361828adc3a1
commit: 887518f5e9963a82c3fc2ad8911eedb2304f8c57 [9/11] ARM: decompressor: fix BSS size calculation
config: arm-clps711x_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 887518f5e9963a82c3fc2ad8911eedb2304f8c57
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

--

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

arm-linux-gnueabi-nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
#2 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

Hi Russell King,

Quoted 1 line · Russell King - ARM Linux

Shall I repeat my question from the last time this was reported?

Sorry I cannot find your reply in email archive. Looking at this error, the root cause should be strtonum requires gawk while what we installed is

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

We can trivially install gawk and make it the default, however is gawk a requirement for kernel compilation? Or can we make it work with mawk, too?

Regards,
Fengguang

Quoted 40 lines · kbuild test robot
Quoted 28 lines

Hi Russell,

FYI, the error/warning still remains.

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
head:   3cef8ede5ead55fbaf2225206f00361828adc3a1
commit: 887518f5e9963a82c3fc2ad8911eedb2304f8c57 [9/11] ARM: decompressor: fix BSS size calculation
config: arm-clps711x_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 887518f5e9963a82c3fc2ad8911eedb2304f8c57
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

--

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

arm-linux-gnueabi-nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Signature · 7 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
_______________________________________________
kbuild-all mailing list
kbuild-all at lists.01.org
https://lists.01.org/mailman/listinfo/kbuild-all
#3 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

Quoted 9 lines · Fengguang Wu

Hi Russell King,

Quoted 1 line · Russell King - ARM Linux

Shall I repeat my question from the last time this was reported?

Sorry I cannot find your reply in email archive. Looking at this error, the root cause should be strtonum requires gawk while what we installed is

Quoted 5 lines

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

We can trivially install gawk and make it the default, however is gawk a requirement for kernel compilation? Or can we make it work with mawk, too?

Well gawk/mawk both defined int(), however it behaves different:

wfg ~% mawk 'BEGIN{print int("0xff")}'
255
wfg ~% gawk 'BEGIN{print int("0xff")}'
0
wfg ~% gawk 'BEGIN{print strtonum("0xff")}'
255

Thanks,
Fengguang

Quoted 44 lines
Quoted 32 lines · kbuild test robot
Quoted 20 lines

Hi Russell,

FYI, the error/warning still remains.

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
head:   3cef8ede5ead55fbaf2225206f00361828adc3a1
commit: 887518f5e9963a82c3fc2ad8911eedb2304f8c57 [9/11] ARM: decompressor: fix BSS size calculation
config: arm-clps711x_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 887518f5e9963a82c3fc2ad8911eedb2304f8c57
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

Quoted 8 lines

--

Quoted 2 lines
Quoted 2 lines

awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined

arm-linux-gnueabi-nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Quoted 8 lines

--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up
_______________________________________________
kbuild-all mailing list
kbuild-all at lists.01.org
https://lists.01.org/mailman/listinfo/kbuild-all

_______________________________________________
kbuild-all mailing list
kbuild-all at lists.01.org
https://lists.01.org/mailman/listinfo/kbuild-all

#4 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

Quoted 16 lines · Fengguang Wu
Quoted 9 lines · Fengguang Wu

Hi Russell King,

Quoted 1 line · Russell King - ARM Linux

Shall I repeat my question from the last time this was reported?

Sorry I cannot find your reply in email archive. Looking at this error, the root cause should be strtonum requires gawk while what we installed is

Quoted 5 lines

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

We can trivially install gawk and make it the default, however is gawk a requirement for kernel compilation? Or can we make it work with mawk, too?

Quoted 8 lines

Well gawk/mawk both defined int(), however it behaves different:

wfg ~% mawk 'BEGIN{print int("0xff")}'
255
wfg ~% gawk 'BEGIN{print int("0xff")}'
0
wfg ~% gawk 'BEGIN{print strtonum("0xff")}'
255

So I don't think awk can be used reliably for this - there seems to be no reliable way to convert hex to an integer in awk.

Maybe the easiest solution would be to switch to using perl instead - at least perl is listed as a required tool, and perl's hex() function will always be able to parse hex!

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
#5 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

In reply to Fengguang Wu
Quoted 6 lines · Fengguang Wu

Hi Russell King,

Quoted 1 line · Russell King - ARM Linux

Shall I repeat my question from the last time this was reported?

Sorry I cannot find your reply in email archive.

Odd, because I sent a reply to your report on 29th September, and it made it to the linux-arm-kernel mailing list, and its archives:

http://archive.armlinux.org.uk/lurker/message/20170929.190625.9f5a9438.en.html

Quoted 9 lines

Looking at this
error, the root cause should be strtonum requires gawk while what we installed is

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

We can trivially install gawk and make it the default, however is gawk a requirement for kernel compilation? Or can we make it work with mawk, too?

Well, awk isn't mentioned in Documentation/Changes as a build requirement, but then neither is grep. However, kbuild itself makes use of both:

Makefile:AWK = awk

Makefile:   $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
Makefile:   $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
scripts/Makefile.build:     if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then                \
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
#6 lore raw

PATCH 9/11 awk: line 2: function strtonum never defined

Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · Fengguang Wu

Hi Russell King,

On Tue, Oct 03, 2017 at 10:06:42AM +0100, Russell King - ARM Linux wrote:

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Shall I repeat my question from the last time this was reported?

Sorry I cannot find your reply in email archive.

Odd, because I sent a reply to your report on 29th September, and it made it to the linux-arm-kernel mailing list, and its archives:

http://archive.armlinux.org.uk/lurker/message/20170929.190625.9f5a9438.en.html

Ah yes, I find that now. So I'm using mawk, which does not support gawk's strtonum..

Quoted 10 lines
Quoted 9 lines

Looking at this
error, the root cause should be strtonum requires gawk while what we installed is

mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

We can trivially install gawk and make it the default, however is gawk a requirement for kernel compilation? Or can we make it work with mawk, too?

Quoted 7 lines

Well, awk isn't mentioned in Documentation/Changes as a build requirement, but then neither is grep. However, kbuild itself makes use of both:

Makefile:AWK = awk

Makefile:   $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
Makefile:   $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
scripts/Makefile.build:     if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then                \

Right. Here gawk/mawk happen to behave different on int(), which makes awk not usable here in a portable way. As you said in the other email, perl looks a viable alternative.

Thanks,
Fengguang