Skip to contentSkip to conversation

rust/helpers/sound.c:74:undefined reference to `snd_pcm_hw_rule_add'

PATCH kernel test robot 1 participant 1 message Nov 6

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/sound-rust-v7.3
head:   070444a8abf14da700680a5331d0a95cd11e578b
commit: 6a450838191295e224845ae206d9594315682abc [24/56] ALSA: rust: pcm: Add hw_rule_add and hw_constraint_minmax abstractions
config: um-randconfig-2200-20261105 (https://download.01.org/0day-ci/archive/20261106/[email protected]/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261106/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

/usr/lib/gcc/i686-linux-gnu/14/../../../../i686-linux-gnu/bin/ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions /usr/lib/gcc/i686-linux-gnu/14/../../../../i686-linux-gnu/bin/ld: rust/helpers/helpers.o: in function `snd_devm_alloc_pages':
include/sound/memalloc.h:110:(.text+0x9212): undefined reference to snd_devm_alloc_dir_pages' /usr/lib/gcc/i686-linux-gnu/14/../../../../i686-linux-gnu/bin/ld: rust/helpers/helpers.o: in function rust_helper_snd_pcm_hw_rule_add':

>> rust/helpers/sound.c:74:(.text+0x94aa): undefined reference to `snd_pcm_hw_rule_add'

clang: error: linker command failed with exit code 1 (use -v to see invocation)

vim +74 rust/helpers/sound.c

    64	
    65	/*
    66	 * snd_pcm_hw_rule_add is variadic; provide a fixed 4-dep wrapper.
    67	 * Pass -1 for unused dep slots.
    68	 */
    69	__rust_helper int rust_helper_snd_pcm_hw_rule_add(
    70		struct snd_pcm_runtime *runtime, unsigned int cond, int var,
    71		snd_pcm_hw_rule_func_t func, void *private,
    72		int dep0, int dep1, int dep2, int dep3)
    73	{
  > 74		return snd_pcm_hw_rule_add(runtime, cond, var, func, private,

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