[BUG] sandbox_defconfig fails to build with origin/master dadc1e38306b1c3

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Oct 17 18:45:58 CEST 2020


On 10/17/20 2:57 PM, Tom Rini wrote:
> On Sat, Oct 17, 2020 at 02:46:27PM +0200, Heinrich Schuchardt wrote:
>> On 10/17/20 2:15 PM, Tom Rini wrote:
>>> On Sat, Oct 17, 2020 at 01:43:25PM +0200, Heinrich Schuchardt wrote:
>>>> Hello Tom, hello Simon,
>>>>
>>>> make sandbox_defconfig
>>>> make V=1
>>>>
>>>> yields:
>>>>
>>>> make -f ./scripts/Makefile.build obj=test/log
>>>>   gcc -Wp,-MD,test/log/.syslog_test.o.d -nostdinc -isystem
>>>> /usr/lib/gcc/x86_64-linux-gnu/10/include -Iinclude
>>>> -I./arch/sandbox/include -include ./include/linux/kconfig.h -D__KERNEL__
>>>> -D__UBOOT__ -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin
>>>> -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE
>>>> -Os -fno-stack-protector -fno-delete-null-pointer-checks
>>>> -Wno-stringop-truncation -Wno-maybe-uninitialized -fmacro-prefix-map=./=
>>>> -g -fstack-usage -Wno-format-nonliteral -Wno-address-of-packed-member
>>>> -Wno-unused-but-set-variable -Werror=date-time -Werror -D__SANDBOX__
>>>> -U_FORTIFY_SOURCE -DCONFIG_ARCH_MAP_SYSMEM -fPIC -I/usr/include/SDL2
>>>> -D_REENTRANT -pipe    -DKBUILD_BASENAME='"syslog_test"'
>>>> -DKBUILD_MODNAME='"syslog_test"' -c -o test/log/syslog_test.o
>>>> test/log/syslog_test.c
>>>> test/log/syslog_test.c:21:10: fatal error: syslog_test.h: No such file
>>>> or directory
>>>>    21 | #include <syslog_test.h>
>>>>       |          ^~~~~~~~~~~~~~~
>>>> compilation terminated.
>>>>
>>>> git bisect:
>>>>
>>>> 52d3df7fefe30b05677db9055e68c666a071d89a is the first bad commit
>>>> commit 52d3df7fefe30b05677db9055e68c666a071d89a
>>>> Author: Simon Glass <sjg at chromium.org>
>>>> Date:   Sat Sep 12 11:13:34 2020 -0600
>>>>
>>>>     log: Allow LOG_DEBUG to always enable log output
>>>>
>>>> @Tom:
>>>> Why are such build failures not detected before merging?
>>>
>>> I think because we have no tests for building in the source directory.
>>
>> You are right
>>
>>    make -j8 O=build
>>
>> works while
>>
>>     make -j8
>>
>> fails.
>>
>> Why do we generate
>>
>>     -I../test/log -Itest/log
>>
>> as gcc parameters when building out of source? If we avoid this, we will
>> get consistent test results.
>>
>>   gcc -Wp,-MD,test/log/.syslog_test.o.d -nostdinc -isystem
>> /usr/lib/gcc/x86_64-linux-gnu/10/include -Iinclude  -I../include
>> -I../arch/sandbox/include -include ../include/linux/kconfig.h
>> -I../test/log -Itest/log -D__KERNEL__ -D__UBOOT__ -Wall
>> -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding
>> -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os
>> -fno-stack-protector -fno-delete-null-pointer-checks
>> -Wno-stringop-truncation -Wno-maybe-uninitialized
>> -fmacro-prefix-map=../= -g -fstack-usage -Wno-format-nonliteral
>> -Wno-address-of-packed-member -Wno-unused-but-set-variable
>> -Werror=date-time -Werror -D__SANDBOX__ -U_FORTIFY_SOURCE
>> -DCONFIG_ARCH_MAP_SYSMEM -fPIC  -I/usr/include/SDL2 -D_REENTRANT -pipe
>>   -DKBUILD_BASENAME='"syslog_test"'  -DKBUILD_MODNAME='"syslog_test"' -c
>> -o test/log/syslog_test.o ../test/log/syslog_test.c
>
> A quick poke around and I don't see us doing anything special for CFLAGS
> there, so that's how kbuild as of our last sync with the Linux kernel
> works is I suppose the answer.
>

Cf.
[PATCH 1/1] Makefile: consistent include path for out of tree build
https://lists.denx.de/pipermail/u-boot/2020-October/429780.html

Best regards

Heinrich


More information about the U-Boot mailing list