Bug 15116 - glibc compile error with qemuppc
Summary: glibc compile error with qemuppc
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 4.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.0
Assignee: Deepthi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-05-11 13:52 UTC by Randy MacLeod
Modified: 2023-05-15 14:09 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
glibc--poky--fa72b850b1--log.do_compile (272.80 KB, text/plain)
2023-05-12 23:37 UTC, Randy MacLeod
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy MacLeod 2023-05-11 13:52:17 UTC
When upgrading vim on poky/master, I noticed that qemuppc compilation failed with an error shown below.
I bisected the failure and the offending commit was found to be:
   fa72b850b1 gcc: upgrade 11.3 -> 12.1
from April 2022!

The error is:

| make[2]: *** [/.../tmp/work/ppc7400-poky-linux/glibc/2.35-r0/build-powerpc-poky-linux/sysd-rules:553: /.../
tmp/work/ppc7400-poky-linux/glibc/2.35-r0/build-powerpc-poky-linux/math/s_trunc.o] Error 1                                                                                                                         | In file included from ../sysdeps/powerpc/fpu/fenv_private.h:23,                          
|                  from ../sysdeps/powerpc/fpu/round_to_integer.h:22,                                                                                                                                              |                  from ../sysdeps/powerpc/fpu/s_ceilf.c:22:                               
| ../sysdeps/powerpc/fpu/fenv_libc.h: In function '__fesetround_inline_nocheck':                                                                                                                                   | ../sysdeps/powerpc/fpu/fenv_libc.h:187:5: warning: 'asm' operand 0 probably does not match constraints
|   187 |     asm volatile ("mtfsfi 7,%0" : : "n" (round));                                                                                                                                                        |       |     ^~~                                                                                        
| ../sysdeps/powerpc/fpu/fenv_libc.h:187:5: error: impossible constraint in 'asm'                                                                                                                                  | ../sysdeps/ieee754/flt-32/s_log1pf.c: In function '__log1pf':                            
| ../sysdeps/ieee754/flt-32/s_log1pf.c:113:57: warning: 'c' may be used uninitialized [-Wmaybe-uninitialized]                            
|   113 |                                           + (k * ln2_lo + c))) - f);
|       |                                             ~~~~~~~~~~~~^~~~                                                                                                                                             
| ../sysdeps/ieee754/flt-32/s_log1pf.c:39:22: note: 'c' was declared here
|    39 |         float hfsq,f,c,s,z,R,u;
|       |                      ^                                                                                                                                                                                   
| In file included from ../sysdeps/powerpc/fpu/fenv_private.h:23,
|                  from ../sysdeps/powerpc/fpu/round_to_integer.h:22,                                                                                                                                              
|                  from ../sysdeps/powerpc/fpu/s_floorf.c:22:                                                                                                                                                      
| ../sysdeps/powerpc/fpu/fenv_libc.h: In function '__fesetround_inline_nocheck':                                                                                                                                   
| ../sysdeps/powerpc/fpu/fenv_libc.h:187:5: warning: 'asm' operand 0 probably does not match constraints                                                                                                           
|   187 |     asm volatile ("mtfsfi 7,%0" : : "n" (round));                                                                                                                                                        
|       |     ^~~                                                                                                                                                                                                  
| ../sysdeps/powerpc/fpu/fenv_libc.h:187:5: error: impossible constraint in 'asm'
Comment 1 Randy MacLeod 2023-05-11 13:54:31 UTC
So that no on spends time looking at other targets, here's the build summary (qemuppc/musl is PASS):

❯ cat vim-buildall.log 
BUILDALL-QEMU LOG FOR vim
START TIME: 2023-05-08_17:41:29
HOSTNAME: ala-lpggp3
HOST OS: Ubuntu 22.04.1 LTS
HOST KERNEL: 5.15.0-56-generic
===============
BUILD RESULTS:
[glibc]
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemumips
PASS: qemux86-64
PASS: qemuarm64
PASS: qemumips64
PASS: qemuarm
FAIL: qemuppc
PASS: qemuriscv64
PASS: qemuppc64
PASS: qemux86
FAIL: qemuloongarch64
[musl]
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemumips
PASS: qemux86-64
PASS: qemuarm64
PASS: qemumips64
PASS: qemuarm
PASS: qemuppc
PASS: qemuriscv64
PASS: qemuppc64
PASS: qemux86
FAIL: qemuloongarch64
===============
PASSED: 20
FAILED: 4
Comment 2 Randy MacLeod 2023-05-11 14:37:05 UTC
Sundeep, if this is an easy fix, go for it but it's not worth days or weeks of effort for qemuppc.
Comment 3 Randy MacLeod 2023-05-11 15:04:32 UTC
Sundeep, Perhaps this would be a good bug for Deepthi to learn about the internal of the gcc. I've CCed her here.
Comment 4 Ross Burton 2023-05-11 16:09:28 UTC
Is this with the vim in master, or only with the upgrade?  Because vim just built for me with qemuppc in current master...
Comment 5 Randy MacLeod 2023-05-12 23:34:06 UTC
Ross it's actually glibc and on master and back to that gcc uprev. 

The full bisect history:
❯ git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [10b42adf56af94c281b491c6ac57e14242f7dd3b] run-postinsts: Set dependency for ldconfig to avoid boot issues
git bisect bad 10b42adf56af94c281b491c6ac57e14242f7dd3b
# status: waiting for good commit(s), bad commit known
# bad: [ac5948736432355e30288ad6f7109821eadf04f5] oeqa rtc.py: skip if read-only-rootfs
git bisect bad ac5948736432355e30288ad6f7109821eadf04f5
# status: waiting for good commit(s), bad commit known
# bad: [25248acfdf92465b360ca464725b679ac5200d8d] initscripts: run umountnfs as a KILL script
git bisect bad 25248acfdf92465b360ca464725b679ac5200d8d
# status: waiting for good commit(s), bad commit known
# bad: [38f3d1749b762bebad3a04d2d324ac2b3b064315] vim: 8.2.5083 -> 9.0.0005
git bisect bad 38f3d1749b762bebad3a04d2d324ac2b3b064315
# status: waiting for good commit(s), bad commit known
# good: [5c073c52ed6fa2d59141a1507c8b04c5b6290b4f] vala: upgrade 0.54.3 -> 0.54.4
git bisect good 5c073c52ed6fa2d59141a1507c8b04c5b6290b4f
# skip: [f920fa55e5e936a304cebfa9e059199078f7c909] py3o: Rename to python_py3o
git bisect skip f920fa55e5e936a304cebfa9e059199078f7c909
# skip: [62a9e5d4a40e01cda7bf9c08d4e2be294cd374aa] vulkan: upgrade 1.3.204.0 -> 1.3.204.1
git bisect skip 62a9e5d4a40e01cda7bf9c08d4e2be294cd374aa
# good: [bedb3444e14693902f9f5eb089810a762f083460] kernel.bbclass: Allow initramfs to be built from a separate multiconfig
git bisect good bedb3444e14693902f9f5eb089810a762f083460
# skip: [c0ff6c75eedea6e0f472b45456aed238073ac157] bitbake: cooker: Simplify parser init function handling
git bisect skip c0ff6c75eedea6e0f472b45456aed238073ac157
# good: [b48c0f0317907cf8c5df71b5fcaf8892c62016aa] poky-tiny: enable qemuarmv5/qemuarm64 and cleanups
git bisect good b48c0f0317907cf8c5df71b5fcaf8892c62016aa
# bad: [ea1d902f97af6ae2264922eed45be8e586741e3c] gstreamer1.0-plugins-bad: upgrade 1.20.1 -> 1.20.2
git bisect bad ea1d902f97af6ae2264922eed45be8e586741e3c
# good: [c9ad977a0b57ebcae603293b91fcb810c2dc3ddf] curl: Update to 7.83.0
git bisect good c9ad977a0b57ebcae603293b91fcb810c2dc3ddf
# good: [092e092ee590ae268d1ebf34c09621fc826a6e10] qemu: update 6.2.0 -> 7.0.0
git bisect good 092e092ee590ae268d1ebf34c09621fc826a6e10
# bad: [d4739e930fd66d047fe4ae6fe127364b918ccab6] image.bbclass: allow overriding dependency on virtual/kernel:do_deploy
git bisect bad d4739e930fd66d047fe4ae6fe127364b918ccab6
# good: [e97e69c71605bef6c3cdad0e51975bd9f8c51256] liberror-perl: Update sstate/equiv versions to clean cache
git bisect good e97e69c71605bef6c3cdad0e51975bd9f8c51256
# good: [e3d64415eddb7c0a5c13a2a91611204c8abfbedb] doc/Makefile: fix epub and latexpdf targets
git bisect good e3d64415eddb7c0a5c13a2a91611204c8abfbedb
# good: [cee443ae75fe8160b1c5051895747b20781916b9] manuals: add quoting to references to bitbake.conf
git bisect good cee443ae75fe8160b1c5051895747b20781916b9
# bad: [ce65ac2dd1d78ff0498e7ad84be833df81935380] overlayfs: add docs about skipping QA check & service dependencies
git bisect bad ce65ac2dd1d78ff0498e7ad84be833df81935380
# bad: [21053b2d37e9b5b151dc98d41d83a8ee34fc5154] yocto-bsps: update to v5.10.113
git bisect bad 21053b2d37e9b5b151dc98d41d83a8ee34fc5154
# bad: [fa72b850b1b1cdb87b186dc5deee0ca1b266272c] gcc: upgrade 11.3 -> 12.1
git bisect bad fa72b850b1b1cdb87b186dc5deee0ca1b266272c
# first bad commit: [fa72b850b1b1cdb87b186dc5deee0ca1b266272c] gcc: upgrade 11.3 -> 12.1
Comment 6 Randy MacLeod 2023-05-12 23:37:50 UTC
Created attachment 4954 [details]
glibc--poky--fa72b850b1--log.do_compile
Comment 7 Randy MacLeod 2023-05-12 23:39:07 UTC
Deepthi, can you reproduce this on poky/master and/or poky/ fa72b850b1 ?
Comment 8 Randy MacLeod 2023-05-14 00:29:09 UTC
That's odd... I can't reproduce the error now that I've done a full, clean build. 
Sstate-cache contamination maybe?

I tried: 
poky/master -> bitbake glibc -> works
poky/mickledore -> bitbake glibc -> works

all without sstate-cache.

I'm check a few more commits from my bisect and trying to build vim to reproduce the issue I saw when running buildall-qemu so stay tuned.
Comment 9 Randy MacLeod 2023-05-15 14:09:49 UTC
I confirmed that with a build without my sstate-cache using:
    bad commit: [fa72b850b1b1cdb87b186dc5deee0ca1b266272c] gcc: upgrade 11.3
    and master: 35e5d29a7d populate_sdk_base.bbclass: 
                           respect MLPREFIX for ptest-pkgs's ptest-runner
the error is not reproducible. 

For bonus points, I did a clean buildall-qemu vim thinking that perhaps the musl or other target builds were causing the problem somehow. The qemuppc failure didn't happen this time.

BUILDALL-QEMU LOG FOR vim
START TIME: 2023-05-14_09:44:57
HOSTNAME: ala-lpggp3
HOST OS: Ubuntu 22.04.1 LTS
HOST KERNEL: 5.15.0-56-generic
===============
BUILD RESULTS:
[glibc]
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemumips
PASS: qemux86-64
PASS: qemuarm64
PASS: qemumips64
PASS: qemuarm
PASS: qemuppc
PASS: qemuriscv64
PASS: qemuppc64
PASS: qemux86
FAIL: qemuloongarch64
[musl]
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemumips
PASS: qemux86-64
PASS: qemuarm64
PASS: qemumips64
PASS: qemuarm
PASS: qemuppc
PASS: qemuriscv64
PASS: qemuppc64
PASS: qemux86
FAIL: qemuloongarch64
===============
PASSED: 21
FAILED: 3

Please re-open if you see this bug again and try to figure out what's different about your build.