Skip to contentSkip to conversation

sandbox_defconfig fails to build with origin/master dadc1e38306b1c3

BUG Heinrich Schuchardt 2 participants 6 messages Oct 17, 2020

lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
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?

Best regards

Heinrich

#1 lore raw
Quoted 34 lines · Heinrich Schuchardt

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

(quoted diff) +0 -10
-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 <[email protected]>
Date:   Sat Sep 12 11:13:34 2020 -0600
Quoted 9 lines

log: Allow LOG_DEBUG to always enable log output

@Tom:
Why are such build failures not detected before merging?

Best regards

Heinrich

Cf.
[PATCH 1/1] test: fix build failure for syslog_test
https://lists.denx.de/pipermail/u-boot/2020-October/429766.html

#2 lore raw
In reply to Heinrich Schuchardt
Quoted 31 lines · Heinrich Schuchardt

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

(quoted diff) +0 -10
-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

Quoted 7 lines
Author: Simon Glass <[email protected]>
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. I'll pick up the fix for this today.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201017/bf314410/attachment.sig>
#3 lore raw
Quoted 35 lines · Tom Rini
Quoted 34 lines · Heinrich Schuchardt

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

(quoted diff) +0 -10
-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 <[email protected]>
Date:   Sat Sep 12 11:13:34 2020 -0600
Quoted 6 lines
Quoted 4 lines

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

Quoted 1 line

I'll pick up the fix for this today.

Thanks.

Best regards

Heinrich

#4 lore raw
Quoted 64 lines · Heinrich Schuchardt
Quoted 35 lines · Tom Rini
Quoted 34 lines · Heinrich Schuchardt

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

(quoted diff) +0 -10
-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 <[email protected]>
Date:   Sat Sep 12 11:13:34 2020 -0600
Quoted 6 lines
Quoted 4 lines

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

(quoted diff) +0 -2
-I../arch/sandbox/include -include ../include/linux/kconfig.h
-I../test/log -Itest/log -D__KERNEL__ -D__UBOOT__ -Wall

Review

Quoted 10 lines
(quoted diff) +0 -9
-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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201017/b2d6306c/attachment.sig>
#5 lore raw
Quoted 71 lines · Tom Rini
Quoted 70 lines · Heinrich Schuchardt
Quoted 35 lines · Tom Rini
Quoted 34 lines · Heinrich Schuchardt

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

(quoted diff) +0 -10
-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 <[email protected]>
Date:   Sat Sep 12 11:13:34 2020 -0600
Quoted 6 lines
Quoted 4 lines

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

(quoted diff) +0 -8
-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
Quoted 9 lines

Review

Quoted 4 lines
(quoted diff) +0 -3
-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