AnsweredAssumed Answered

linux add in build fails when kernel source location is an absolute path

Question asked by GrahamNewton on Oct 31, 2017
Latest reply on Nov 10, 2017 by GrahamNewton

When the kernel source path (BR2_LINUX_KERNEL_CUSTOM_OVERRIDE_PATH) is specified as an absolute path component libmcapi-HEAD/libmcapi-2.0 fails to build with the error:

./include/mcapi_dev_impl.h:4:17: fatal error: icc.h: No such file or directory

The generated makefile (buildroot/output/build/libmcapi-HEAD/libmcapi-2.0/Makefile) has setup the include directories such that the absolute path is appended to the buildroot path.

i.e.

CFLAGS =

-I/opt/analog/cces-linux-add-in/1.2.0/buildroot-sc5xx-.2.0/src/buildroot/<absolute-kernel-directory>/drivers/staging/icc/include

-I/opt/analog/cces-linux-add-in/1.2.0/buildroot-sc5xx-1.2.0/src/buildroot/<absolute-kernel-directory>/arch/blackfin/include

 

Manually correcting the error removing the buildroot path enables a successful build.

 

Is there a way to fix this that doesn't involve editing the Makefile on each clean build?

Outcomes