Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* ld.lld: error: undefined symbol: sysfs_format_mac
@ 2023-09-03  2:39 kernel test robot
  2023-09-03  4:32 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-09-03  2:39 UTC (permalink / raw)
  To: David Thompson
  Cc: llvm, oe-kbuild-all, linux-kernel, Hans de Goede,
	Shravan Kumar Ramani

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92901222f83d988617aee37680cb29e1a743b5e4
commit: 7e38a7422f128e7d7ba24b444e957d585dbb272f mlxbf-bootctl: Support sysfs entries for MFG fields
date:   10 days ago
config: arm64-randconfig-r024-20230902 (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309031058.JvwNDBKt-lkp@intel.com/

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: sysfs_format_mac
   >>> referenced by xarray.c
   >>>               vmlinux.o:(oob_mac_show)

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: ld.lld: error: undefined symbol: sysfs_format_mac
  2023-09-03  2:39 ld.lld: error: undefined symbol: sysfs_format_mac kernel test robot
@ 2023-09-03  4:32 ` Randy Dunlap
  2023-09-03 12:06   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2023-09-03  4:32 UTC (permalink / raw)
  To: kernel test robot, David Thompson, open list:X86 PLATFORM DRIVERS
  Cc: llvm, oe-kbuild-all, linux-kernel, Hans de Goede,
	Shravan Kumar Ramani



On 9/2/23 19:39, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   92901222f83d988617aee37680cb29e1a743b5e4
> commit: 7e38a7422f128e7d7ba24b444e957d585dbb272f mlxbf-bootctl: Support sysfs entries for MFG fields
> date:   10 days ago
> config: arm64-randconfig-r024-20230902 (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309031058.JvwNDBKt-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>>> ld.lld: error: undefined symbol: sysfs_format_mac
>    >>> referenced by xarray.c

I don't see what xarray.c has to do with this.

This happens when CONFIG_NET is not enabled.

>    >>>               vmlinux.o:(oob_mac_show)
> 

-- 
~Randy

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

* Re: ld.lld: error: undefined symbol: sysfs_format_mac
  2023-09-03  4:32 ` Randy Dunlap
@ 2023-09-03 12:06   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-09-03 12:06 UTC (permalink / raw)
  To: Randy Dunlap, kernel test robot, David Thompson,
	open list:X86 PLATFORM DRIVERS, Vadim Pasternak
  Cc: llvm, oe-kbuild-all, linux-kernel, Shravan Kumar Ramani

Hi,

On 9/3/23 06:32, Randy Dunlap wrote:
> 
> 
> On 9/2/23 19:39, kernel test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   92901222f83d988617aee37680cb29e1a743b5e4
>> commit: 7e38a7422f128e7d7ba24b444e957d585dbb272f mlxbf-bootctl: Support sysfs entries for MFG fields
>> date:   10 days ago
>> config: arm64-randconfig-r024-20230902 (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/config)
>> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230903/202309031058.JvwNDBKt-lkp@intel.com/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202309031058.JvwNDBKt-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>>>> ld.lld: error: undefined symbol: sysfs_format_mac
>>    >>> referenced by xarray.c
> 
> I don't see what xarray.c has to do with this.
> 
> This happens when CONFIG_NET is not enabled.

Right, so this suggests that config MLXBF_BOOTCTL in
drivers/platform/mellanox/Kconfig needs a:

	depends on NET

David, Vadim, can one of you submit a patch for this?

Then I'll get that queued up as a 6.6 fix.

Regards,

Hans


p.s.

I wonder if it would not be better to just turn into
a static inline helper instead of an exported symbol.

It is really just a small wrapper around sysfs_emit():

ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len)
{
        return sysfs_emit(buf, "%*phC\n", len, addr);
}
EXPORT_SYMBOL(sysfs_format_mac);

Making this a static inline thus should not grow the code
size, while removing a symbol from the exported symbol list.

Regards,

Hans




>>    >>>               vmlinux.o:(oob_mac_show)
>>
> 


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

end of thread, other threads:[~2023-09-03 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03  2:39 ld.lld: error: undefined symbol: sysfs_format_mac kernel test robot
2023-09-03  4:32 ` Randy Dunlap
2023-09-03 12:06   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox