Bug 209881 - Input: build error due to unmet dependency for IIO_BUFFER_CB by TOUCHSCREEN_ADC
Summary: Input: build error due to unmet dependency for IIO_BUFFER_CB by TOUCHSCREEN_ADC
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-26 20:10 UTC by Necip Fazil Yildiran
Modified: 2020-10-26 20:12 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.9-rc10
Subsystem:
Regression: No
Bisected commit-id:


Attachments
reproduce.tar.gz (101.14 KB, application/gzip)
2020-10-26 20:10 UTC, Necip Fazil Yildiran
Details

Description Necip Fazil Yildiran 2020-10-26 20:10:51 UTC
Created attachment 293227 [details]
reproduce.tar.gz

Attachment (reproduce.tar.gz) content:
 - sample.config: Config file to reproduce the bug.
 - build_out.txt: Output of Kbuild including the error messages.

When IIO_BUFFER_CB is enabled and IIO_BUFFER is disabled, it results in the
following Kbuild warning:

WARNING: unmet direct dependencies detected for IIO_BUFFER_CB
  Depends on [n]: IIO [=y] && IIO_BUFFER [=n]
  Selected by [y]:
  - TOUCHSCREEN_ADC [=y] && !UML && INPUT [=y] && INPUT_TOUCHSCREEN [=y] && IIO [=y]

Building the kernel fails due to this unmet direct dependency issue as follows:

[...]
drivers/iio/buffer/industrialio-buffer-cb.c:15:20: error: field ‘buffer’ has incomplete type
  struct iio_buffer buffer;
                    ^~~~~~
[...]
cc1: some warnings being treated as errors
  AR      drivers/iio/common/ms_sensors/built-in.a
scripts/Makefile.build:265: recipe for target 'drivers/iio/buffer/industrialio-buffer-cb.o' failed
make[3]: *** [drivers/iio/buffer/industrialio-buffer-cb.o] Error 1
scripts/Makefile.build:509: recipe for target 'drivers/iio/buffer' failed
make[2]: *** [drivers/iio/buffer] Error 2
[...]

Steps to reproduce the bug for v5.4.4:
  1. wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
  2. chmod +x ~/bin/make.cross
  3. tar -xvf reproduce.tar.gz # sample.config and build_out.txt
  4. cp sample.config path/to/linux-source-v5.4.4/.config
  5. cd path/to/linux-source-v5.4.4/
  6. ~/bin/make.cross ARCH=x86_64 clean
  7. ~/bin/make.cross ARCH=x86_64 olddefconfig # unmet direct dependency warning
  8. ~/bin/make.cross ARCH=x86_64 # should have a build error

The output for the steps [6-8] can be found in build_out.txt.

The bug is reproducible for v5.10-rc1 as well with the same steps.

Kernel successfully builds when the unmet direct dependencies are resolved
by enabling them in the configuration. Depending on instead of selecting
the symbols, or selecting the dependencies of the selected symbols as well
should fix the bug.

Thanks,
Necip

Note You need to log in before you can comment on or make changes to this bug.