BR2_EXTERNAL broken, missing srctree, error Config.in
Using master, currently, the Config.in of an external package that sources the Config.in of its package is failing with the error:
"Config.in:2: can't open file "package/hello-world/Config.in"
In order to avoid this error, we need to enforce:
export srctree=/home/vjardin/dev/br/1/br_external
It can be reproduced on the master with the following steps:
git clone https://gitlab.com/buildroot.org/buildroot.git
cd buildroot
BR2_EXTERNAL=/home/vjardin/dev/br/1/br_external make qemu_aarch64_virt_defconfig
...
rm /home/vjardin/dev/br/1/buildroot/output/build/buildroot-config/zconf.tab.c
/home/vjardin/dev/br/1/br_external/Config.in:2: can't open file "package/hello-world/Config.in"
make[1]: *** [Makefile:1024: qemu_aarch64_virt_defconfig] Error 1
make: *** [Makefile:83: _all] Error 2
using the following hello-world package:
$ tree
.
├── Config.in
├── external.desc
├── external.mk
└── package
└── hello-world
├── Config.in
├── hello-world.mk
└── hello-world.sh
$ pwd
/home/vjardin/dev/br/1/br_external
$ cat Config.in
# BR2_EXTERNAL_hello_world_PATH
source "package/hello-world/Config.in"
It seems that the getenv(SRCTREE) from support/kconfig/ does not exist:
confdata.c: env = getenv(SRCTREE);
gconf.c: env = getenv(SRCTREE);
grep: patches: Is a directory
zconf.l: env = getenv(SRCTREE);
zconf.lex.c_shipped: env = getenv(SRCTREE);
but I do not understand how SRCTREE (aka "srctree") should be properly set prior to calling the kconfig. I have tried to workaround this issue using a
export srctree=/home/vjardin/dev/br/1/br_external
then it works.
Check-list
-
I did not find the issue in the existing issues -
I can reproduce the issue with unmodified Buildroot from this repository, not from a fork somewhere else -
I can reproduce the issue on the latest commit of the branch I'm using: -
master
-
Edited by Vincent JARDIN