Re: [kbuild-all] [tip:x86/platform 1/1] platform_bt.c:undefined reference to `gpiod_add_lookup_table'

From: Fengguang Wu
Date: Mon Apr 03 2017 - 06:53:44 EST


On Mon, Apr 03, 2017 at 12:36:25PM +0300, Andy Shevchenko wrote:
On Mon, Apr 3, 2017 at 12:31 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
On Mon, Apr 3, 2017 at 10:13 AM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
On Mon, Apr 3, 2017 at 2:23 AM, kbuild test robot
<fengguang.wu@xxxxxxxxx> wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/platform
head: d4d969909bef4c1e103eec0fc2c820773811fb72
commit: d4d969909bef4c1e103eec0fc2c820773811fb72 [1/1] x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
config: x86_64-randconfig-s4-04030434 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout d4d969909bef4c1e103eec0fc2c820773811fb72
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

arch/x86/built-in.o: In function `tng_bt_sfi_setup':
platform_bt.c:(.init.text+0x13a30): undefined reference to `gpiod_add_lookup_table'

I'd guess it's a missing dependency on GPIOLIB

Apparently not this one.

The module is purely built whenever HCIUART_BCM is defined which is a
consumer of GPIO.
And that one does not have a dependency.

Fengguang, this is second semi-false positive report. Can we do
something about such?

Andy, I didn't look into the logical side of this problem, however I
can reproduce the issue in commit d4d969909. While its parent commit
succeeded in producing the kernel:

=============== commit d4d969909 ===============
/home/wfg/linux
HEAD is now at d4d9699... x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
/home/wfg/linux/obj-compiletest

make ARCH=x86_64

!!! BUILD ERROR !!!
cat /tmp/build-err-d4d969909bef4c1e103eec0fc2c820773811fb72-wfg
arch/x86/built-in.o: In function `tng_bt_sfi_setup':
platform_bt.c:(.init.text+0x13a3a): undefined reference to `gpiod_add_lookup_table'
make[1]: *** [vmlinux] Error 1
make[1]: Target '_all' not remade because of errors.
make: *** [sub-make] Error 2

=============== PREV commit 2f2a033fb5819c393d65da9b6233e095f3690f15 ===============
/home/wfg/linux
Previous HEAD position was d4d9699... x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
HEAD is now at 2f2a033... x86/platform/uv/BAU: Implement uv4_wait_completion with read_status
/home/wfg/linux/obj-compiletest

make ARCH=x86_64

cat /tmp/build-err-2f2a033fb5819c393d65da9b6233e095f3690f15-wfg

Thanks,
Fengguang