Skip to contentSkip to conversation

include/linux/dynamic_debug.h:76:14: error: 'KBUILD_MODNAME' undeclared

PATCH [email protected] 2 participants 3 messages Nov 16, 2017 – Nov 17, 2017 1 message not in the archive Kbuild

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 36 lines

-----Original Message-----
From: kbuild test robot [mailto:[email protected]]
Sent: Thursday, November 16, 2017 2:29 PM
To: Cao jin <[email protected]>
Cc: [email protected]; [email protected]; Yamada, Masahiro/ 山田 真弘 <[email protected]>
Subject: [kbuild:kbuild 28/31] include/linux/dynamic_debug.h:76:14:
error: 'KBUILD_MODNAME' undeclared

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
.git kbuild

head:   ea15c8cd3601640e202828e3b563653a8b3c76cd
commit: 1ac0408bbb3f47ef2411976fbd2bf758d747bbee [28/31] kbuild: fix

modname for composite modules
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:

        git checkout 1ac0408bbb3f47ef2411976fbd2bf758d747bbee
        # save the attached .config to linux build tree
        make ARCH=x86_64

All error/warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13, from include/linux/list.h:8,
from include/linux/timer.h:4,
from include/linux/netdevice.h:28, from
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:18:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function
'octeon_unmap_pci_barx':

Quoted 1 line
Quoted 1 line

include/linux/dynamic_debug.h:76:14: error: 'KBUILD_MODNAME'

Quoted 8 lines

undeclared (first use in this function)

      .modname = KBUILD_MODNAME,   \
                 ^
   include/linux/dynamic_debug.h:98:2: note: in expansion of macro
'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
     DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

include/linux/dynamic_debug.h:132:2: note: in expansion of macro

[snip lots of errors]

Quoted 6 lines

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

OK.
Looks like this potential issue has been hidden.

I plan to insert the following patch before Cao's one:
https://patchwork.kernel.org/patch/10060825/

We should better to take time for testing by 0day bot, though.

#2 lore raw
Quoted 54 lines · On 11/16/2017 03:59 PM, [email protected] wrote:
Quoted 36 lines

-----Original Message-----
From: kbuild test robot [mailto:[email protected]]
Sent: Thursday, November 16, 2017 2:29 PM
To: Cao jin <[email protected]>
Cc: [email protected]; [email protected]; Yamada, Masahiro/ 山田 真弘 <[email protected]>
Subject: [kbuild:kbuild 28/31] include/linux/dynamic_debug.h:76:14:
error: 'KBUILD_MODNAME' undeclared

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
.git kbuild

head:   ea15c8cd3601640e202828e3b563653a8b3c76cd
commit: 1ac0408bbb3f47ef2411976fbd2bf758d747bbee [28/31] kbuild: fix

modname for composite modules
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:

        git checkout 1ac0408bbb3f47ef2411976fbd2bf758d747bbee
        # save the attached .config to linux build tree
        make ARCH=x86_64

All error/warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13, from include/linux/list.h:8,
from include/linux/timer.h:4,
from include/linux/netdevice.h:28, from
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:18:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function
'octeon_unmap_pci_barx':

Quoted 1 line
Quoted 1 line

include/linux/dynamic_debug.h:76:14: error: 'KBUILD_MODNAME'

Quoted 8 lines

undeclared (first use in this function)

      .modname = KBUILD_MODNAME,   \
                 ^
   include/linux/dynamic_debug.h:98:2: note: in expansion of macro
'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
     DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

include/linux/dynamic_debug.h:132:2: note: in expansion of macro

[snip lots of errors]

Quoted 6 lines

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

Quoted 9 lines

OK.
Looks like this potential issue has been hidden.

I plan to insert the following patch before Cao's one:
https://patchwork.kernel.org/patch/10060825/

We should better to take time for testing by 0day bot, though.

It is weird that I didn't receive the Original Message From: kbuild test robot.

Thanks for fixing it, Masahiro-san, I will take a look.

Signature · 2 lines
Sincerely,
Cao jin
#3 lore raw
In reply to [email protected]
Quoted 54 lines · On 11/16/2017 03:59 PM, [email protected] wrote:
Quoted 36 lines

-----Original Message-----
From: kbuild test robot [mailto:[email protected]]
Sent: Thursday, November 16, 2017 2:29 PM
To: Cao jin <[email protected]>
Cc: [email protected]; [email protected]; Yamada, Masahiro/ 山田 真弘 <[email protected]>
Subject: [kbuild:kbuild 28/31] include/linux/dynamic_debug.h:76:14:
error: 'KBUILD_MODNAME' undeclared

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
.git kbuild

head:   ea15c8cd3601640e202828e3b563653a8b3c76cd
commit: 1ac0408bbb3f47ef2411976fbd2bf758d747bbee [28/31] kbuild: fix

modname for composite modules
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:

        git checkout 1ac0408bbb3f47ef2411976fbd2bf758d747bbee
        # save the attached .config to linux build tree
        make ARCH=x86_64

All error/warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13, from include/linux/list.h:8,
from include/linux/timer.h:4,
from include/linux/netdevice.h:28, from
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:18:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function
'octeon_unmap_pci_barx':

Quoted 1 line
Quoted 1 line

include/linux/dynamic_debug.h:76:14: error: 'KBUILD_MODNAME'

Quoted 8 lines

undeclared (first use in this function)

      .modname = KBUILD_MODNAME,   \
                 ^
   include/linux/dynamic_debug.h:98:2: note: in expansion of macro
'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
     DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

include/linux/dynamic_debug.h:132:2: note: in expansion of macro

[snip lots of errors]

Quoted 6 lines

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

Quoted 8 lines

OK.
Looks like this potential issue has been hidden.

I plan to insert the following patch before Cao's one:
https://patchwork.kernel.org/patch/10060825/

We should better to take time for testing by 0day bot, though.

It took me a while to figure out why the build is ok before my patch.

before my patch, the liquidio-m belongs to $(real-objs-m), so there is:

    modname = $(basetarget)

after my patch, liquidio-m belongs to $(multi-objs-m), so there is:

    modname = $(modname-multi)

And, these files both belong to liquidio-m & liquidio_vf-m, so modname-multi has 2 words, and so modname is null, and build fail.

Signature · 2 lines
Sincerely,
Cao jin