| Summary: | grub-efi-native fails to build because of trampolines | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Martin Jansa <Martin.Jansa> |
| Component: | core | Assignee: | Bill Randle <bill.randle> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | bill.randle, meta.mr.watcher, meta.watcher, raj.khem, ross.burton |
| Version: | unspecified | ||
| Target Milestone: | 2.1 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Khem, would you be able to have a look at this? Whilst no major distro is shipping gcc 5.3 now, it looks like Ubuntu 16.04 will ship with gcc 5.3 at about the same time as we release 2.1. Using Debian's gcc-5 package (gcc version 5.3.1 20160224 (Debian 5.3.1-10)) grub-efi-native builds fine with no warnings. Martin, can you still replicate this? (pretty sure this is the first time I've seen Debian testing be ahead of Gentoo in a compiler!) Yes still reproducible with latest oe-core: http://errors.yoctoproject.org/Errors/Build/13790/ I'm using minimalist gentoo chroot, in worst case you can download it here: http://git.shr-project.org/git/?p=shr-chroot.git;a=summary Using Fedora 23's gcc (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2)), I also can build qemux86_64, including grub-efi, from master with no errors. I'll do some digging into what's going on with Gentoo. (In reply to comment #1) > Khem, would you be able to have a look at this? Whilst no major distro is > shipping gcc 5.3 now, it looks like Ubuntu 16.04 will ship with gcc 5.3 at > about the same time as we release 2.1. gentoo enables -Wtrampolines by default, thats why you see it. Disabling the warning for native builds is the right fix here. As it's gentoo explicitly adding that flag should we WONTFIX this as a gentoo issue and tell gentoo users to BUILD_CFLAGS_append = " -Wno-error-trampolines", or add something that like globally? (In reply to comment #7) > As it's gentoo explicitly adding that flag should we WONTFIX this as a > gentoo issue and tell gentoo users to BUILD_CFLAGS_append = " > -Wno-error-trampolines", or add something that like globally? We dont lose much by enabling this option in metadata. It is a harder sell to change gentoo's defaults. I would suggest to add it to concerned recipe and only for native case. So its surgical. Sounds good to me. Bill, can you handle this please. I've set up a copy of the reporter's build environment, so I can go through and find all the trampoline warnings in his build and update the appropriate native recipes. is it lot of packages ? I thought it was just grub-efi. If its many, then I think, we should just suggest that gentoo user's set this option globally and leave it at that. I was thinking there was another package also, but I don't see it now, so maybe it was just grub-efi. I will verify when I do a test build of shr. Only grub is failing like this, because of default -Werror. I've sent the patch I'm using: http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119141.html because IIRC just adding -Wno-error-trampolines wasn't enough to solve this. (In reply to comment #13) > Only grub is failing like this, because of default -Werror. > > I've sent the patch I'm using: > http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119141. > html > > because IIRC just adding -Wno-error-trampolines wasn't enough to solve this. did you try -Wno-error=trampolines According to git reflog I was testing: +# bsdlabel.c:161:7: error: trampoline generated for nested function 'check_msdos' [-Werror=trampolines] +CFLAGS_append_class-native = " -Wno-error=trampolines" Using -Wno-error=trampolines solves the problem, in my testing. Patch submitted to the mailing list. Merged in oe-core c2450e4fd01487aaf5bb37a4c70a5397650ba5f8. |
There are +- 30 places where gcc 5.3 generates error like this: ../grub-2.00/util/grub-script-check.c:99:14: error: trampoline generated for nested function 'get_config_line' [-Werror=trampolines] grub_err_t get_config_line (char **line, int cont __attribute__ ((unused))) ^ and fails, adding -Wno-error=trampolines helps, but I'm not sure if it's right work around or why I'm (possibly) the only one seeing this issue. OE @ ~/build/oe-core/tmp-glibc/work/x86_64-linux/grub-efi-native/2.00-r3/build $ gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmpfs/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.3.0 p1.0, pie-0.6.5' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-lto --without-isl --enable-libsanitizer Thread model: posix gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5) Also there is unused 0001-Fix-build-with-glibc-2.20.patch file, which was removed from SRC_URI in: commit a290429c8415042cb8c2f4258e76a3cc6815a172 Author: Khem Raj <raj.khem@gmail.com> Date: Tue Jan 12 23:43:13 2016 +0000 grub: Backport fix for largefile detection/use