Skip to contentSkip to conversation

strace: clear native sysroot references from CFLAGS_FOR_BUILD etc

PATCH In review Andre McCurdy 2 participants 3 messages Jan 13, 2016 – Jan 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 strace: clear native sysroot references from CFLAGS_FOR_BUILD etc

strace uses CC_FOR_BUILD to compile temporary utility apps to run as part of the build process. There's no need to build those utils against the native sysroot though (and things sometimes go wrong if we do), so clear CFLAGS_FOR_BUILD etc.

---
 meta/recipes-devtools/strace/strace_4.11.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/strace/strace_4.11.bb +8 -0
index d3e4aef..4506d5b 100644
@@ -15,6 +15,14 @@ SRC_URI[sha256sum] = "e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5
 
 inherit autotools ptest bluetooth
 
+# strace uses CC_FOR_BUILD to compile temporary utility apps to run as part of
+# the build process. There's no need to build those utils against the native
+# sysroot though, so clear CFLAGS_FOR_BUILD etc.
+CPPFLAGS_FOR_BUILD = ""
+CFLAGS_FOR_BUILD = ""
+CXXFLAGS_FOR_BUILD = ""
+LDFLAGS_FOR_BUILD = ""
+
 RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
 
 PACKAGECONFIG_class-target ??= "\
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Andre McCurdy

strace uses CC_FOR_BUILD to compile temporary utility apps to run as part of the build process. There's no need to build those utils against the native sysroot though (and things sometimes go wrong if we
do), so clear CFLAGS_FOR_BUILD etc.

I ran this along with the other strace patches under master-next on the autobuilder. We saw:

https://autobuilder.yoctoproject.org/main/builders/ptest-x86-64/builds/
251/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64-lsb/b
uilds/616/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64-lsb/b
uilds/616/steps/BuildImages_1/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/build
s/615/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/build
s/615/steps/BuildImages_1/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-multilib/bui
lds/611/steps/BuildImages_4/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/build-appliance/buil
ds/589/steps/BuildImages_1/logs/stdio

So there is still something not right here. I've not looked into the details of the issue.

Cheers,

Richard

#2 lore raw
Quoted 11 lines · Richard Purdie
Quoted 7 lines · Andre McCurdy

strace uses CC_FOR_BUILD to compile temporary utility apps to run as part of the build process. There's no need to build those utils against the native sysroot though (and things sometimes go wrong if we
do), so clear CFLAGS_FOR_BUILD etc.

I ran this along with the other strace patches under master-next on the autobuilder. We saw:

OK, I think I see real issue. Previous patch was OK, but it wasn't the host gcc calls seen in the log which were failing. The failure is actually coming from gcc commands being run from within the "mpers.sh" script, which don't show up directly in the do_compile log. For example, commands such as:

x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3
-mfpmath=sse --sysroot=/.../build/tmp/sysroots/qemux86-64 -DHAVE_CONFIG_H -I./linux/x86_64 -I../strace-4.11/linux/x86_64 -I./linux -I../strace-4.11/linux -I. -I../strace-4.11 -gdwarf-2 -c -m32 mpers-m32/kernel_dirent.c -o mpers-m32/kernel_dirent.o

ie the 64bit cross compiler is being used to try to generate 32bit binaries, which it doesn't support.

Adding multiarch to DISTRO_FEATURES might be a workaround.

I'll dig around a little more to see if there are better solutions.

Quoted 27 lines

https://autobuilder.yoctoproject.org/main/builders/ptest-x86-64/builds/
251/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64-lsb/b
uilds/616/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64-lsb/b
uilds/616/steps/BuildImages_1/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/build
s/615/steps/BuildImages/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/build
s/615/steps/BuildImages_1/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/nightly-multilib/bui
lds/611/steps/BuildImages_4/logs/stdio

https://autobuilder.yoctoproject.org/main/builders/build-appliance/buil
ds/589/steps/BuildImages_1/logs/stdio

So there is still something not right here. I've not looked into the details of the issue.

Cheers,

Richard