dev-libs/klibc-2.0.4 in build against Linux 3.12, at that time there is no GCC 5 support in Linux kernel. CC kernel/bounds.s In file included from include/linux/compiler.h:54:0, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from /mnt/vm/compile/portage/dev-libs/klibc-2.0.4/work/linux-3.12/include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/page-flags.h:8, from kernel/bounds.c:9: include/linux/compiler-gcc.h:103:30: fatal error: linux/compiler-gcc5.h: No such file or directory compilation terminated. Add "include/linux/compiler-gcc5.h" from the patch below can fix the issue: http://lists.denx.de/pipermail/u-boot/2015-February/204332.html
just hacked KV_MAJOR="4" KV_SUB="1" to build klibc against Linux 4.1 and it works fine.
+1. This should really be handled as a request to upgrade the kernel source that the package pulls in during the build. I ran into the same problem with gcc-5 not building this package so I updated the klibc ebuild to pull in Linux kernel 4.2.3 source instead - and klibc built fine for me as well (with gcc-5). Please let me know if this request is best handled in this ticket or if I should open another bugzilla and link it to this one.
Can someone please push that fix?
I confirm that klibc compiled fine with a modified ebuild using: KV_MAJOR="4" KV_SUB="1" This ebuild need to be modified to ensure that kernel have gcc5 header (from 3.18 series I think). A temporary fix is to create in your own local overlay a dev-libs/klibc-2.0.4-r1 with KV_MAJOR="4" and KV_SUB="1". For people that need a quick and dirty fix: - edit /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild - set KV_MAJOR="4" and KV_SUB="1" at line 26 - cd /usr/portage/dev-libs/klibc/ && ebuild klibc-2.0.4.ebuild digest - emerge -av1 klibc It's quick and dirty because next portage sync will remove the hack.
While you're at it, maybe also fix this * Applying klibc-2.0.3-kernel-uapi.patch ... [ ok ] /var/tmp/portage/dev-libs/klibc-2.0.4/temp/environment: line 2383: /var/tmp/portage/dev-libs/klibc-2.0.4/work/klibc-2.0.4/debian/patches/series: No such file or directory
solution worked perfectly for me after upgrading to gcc 5
Created attachment 432148 [details] emerge-info.txt still fails here\n\n from include/linux/page-flags.h:8, from kernel/bounds.c:9: include/linux/compiler-gcc.h:103:30: fatal error: linux/compiler-gcc5.h: No such file or directory compilation terminated. /var/tmp/portage/dev-libs/klibc-2.0.4/work/linux-3.12/./Kbuild:35: recipe for target 'kernel/bounds.s' failed make[1]: *** [kernel/bounds.s] Error 1
Created attachment 432150 [details] dev-libs:klibc-2.0.4:20160426-132919.log
Created attachment 432152 [details] emerge-history.txt
Created attachment 432154 [details] environment
GCC5 working with >=kernel-3.18. (Somebody say 3.16, but it is not work). I was copy klibc.ebuild to my local overlay, change KV_SUB=18, then klibc build normally. I used ~gcc-5.4.0 for build ~klibc-2.0.4.
Created attachment 438484 [details] new ebuild
does anyone want to proxy maintain this? https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
I'd like to maintain this by proxy, please? I need this for the Unity overlay, in combination with the nvidia-drivers
Sure, CCing proxy maintainers
File linux/compiler-gcc5.h present only in: linux-3.18/include/linux/compiler-gcc5.h linux-3.19/include/linux/compiler-gcc5.h linux-4.0/include/linux/compiler-gcc5.h linux-4.1/include/linux/compiler-gcc5.h But /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild for ~amd64 use linux-3.12, in which file include/linux/compiler-gcc5.h absent.
May be just apply the same workaround https://bugs.gentoo.org/attachment.cgi?id=446966&action=diff ?
Bug https://bugs.gentoo.org/show_bug.cgi?id=473512 depends on this one.
commit ee53fa7bdd32ed0585fa739c7bc61947e32ac5ab Author: Andreas Sturmlechner <asturm@gentoo.org> Date: Sun Jan 8 22:31:48 2017 +0100 dev-libs/klibc: Bump to EAPI 6, 2.0.4-9 Deb-, linux-4.4 tars; GCC-5 fix
Emerging dev-libs/klibc-2.0.4-r1, with gcc version 5.4.0 (Gentoo 5.4.0 p1.0, pie-0.6.5) ends with an error: >>> Install klibc-2.0.4-r1 into /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/ category dev-libs make -j3 EXTRA_KLIBCAFLAGS=-Wa,--noexecstack 'EXTRA_KLIBCLDFLAGS=-z noexecstack' 'HOSTLDFLAGS=-z noexecstack' KLIBCOPTFLAGS=-nostdlib HOSTCC=x86_64-pc-linux-gnu-gcc CC=x86_64-pc-linux-gnu-gcc HOSTLD=x86_64-pc-linux-gnu-ld LD=x86_64-pc-linux-gnu-ld INSTALLDIR=/usr/lib64/klibc INSTALLROOT=/var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/ KLIBCARCH=x86_64 KLIBCASMARCH=x86 SHLIBDIR=/lib64 libdir=/usr/lib64 mandir=/usr/share/man T=/var/tmp/portage/dev-libs/klibc-2.0.4-r1/temp 'SKIP_HOSTCFLAGS=-march=native -mtune=native -O2 -pipe -nostdlib' 'SKIP_HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed -z noexecstack' 'SKIP_KLIBCOPTFLAGS=-march=native -mtune=native -O2 -pipe -nostdlib' install INSTALL headers + man pages to /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc INSTALL binaries to /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc/bin INSTALL usr/gzip/gzip usr/gzip/gunzip usr/gzip/zcat INSTALL usr/kinit/fstype/shared/fstype INSTALL usr/dash/sh.shared INSTALL usr/kinit/ipconfig/shared/ipconfig INSTALL usr/kinit/nfsmount/shared/nfsmount INSTALL usr/kinit/resume/shared/resume INSTALL usr/utils/shared/chroot usr/utils/shared/dd usr/utils/shared/mkdir usr/utils/shared/mkfifo usr/utils/shared/mknod usr/utils/shared/mount usr/utils/shared/pivot_root usr/utils/shared/umount usr/utils/shared/true usr/utils/shared/false usr/utils/shared/sleep usr/utils/shared/ln usr/utils/shared/mv usr/utils/shared/nuke usr/utils/shared/minips usr/utils/shared/cat usr/utils/shared/ls usr/utils/shared/losetup usr/utils/shared/uname usr/utils/shared/halt usr/utils/shared/kill usr/utils/shared/readlink usr/utils/shared/cpio usr/utils/shared/sync usr/utils/shared/dmesg usr/utils/shared/reboot usr/utils/shared/poweroff INSTALL klibc to /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc/lib INSTALL usr/kinit/run-init/shared/run-init INSTALL usr/kinit/kinit usr/kinit/kinit.shared * ACCESS DENIED: fchmodat: /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/usr/lib64/klibc/include/asm-generic chmod: changing permissions of '/var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc/include/asm-generic': Permission denied * ACCESS DENIED: fchmodat: /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/usr/lib64/klibc/include/asm chmod: changing permissions of '/var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc/include/asm': Permission denied * ACCESS DENIED: fchmodat: /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/usr/lib64/klibc/include/linux chmod: changing permissions of '/var/tmp/portage/dev-libs/klibc-2.0.4-r1/image//usr/lib64/klibc/include/linux': Permission denied >>> Completed installing klibc-2.0.4-r1 into /var/tmp/portage/dev-libs/klibc-2.0.4-r1/image/ * Final size of build directory: 731312 KiB * Final size of installed tree: 2640 KiB * --------------------------- ACCESS VIOLATION SUMMARY --------------------------- * LOG FILE: "/var/log/sandbox/sandbox-19444.log" *
Created attachment 459528 [details] klibc-2.0.4-r1 build log
Created attachment 459530 [details] klibc-2.0.4-r1 sandbox log
(In reply to Kanogin Alexander from comment #20) > Emerging dev-libs/klibc-2.0.4-r1, with gcc version 5.4.0 (Gentoo 5.4.0 p1.0, > pie-0.6.5) ends with an error: This is already the topic of bug #605180, this bug is about 2.0.4
(In reply to Kobboi from comment #23) > (In reply to Kanogin Alexander from comment #20) > > Emerging dev-libs/klibc-2.0.4-r1, with gcc version 5.4.0 (Gentoo 5.4.0 p1.0, > > pie-0.6.5) ends with an error: > > This is already the topic of bug #605180, this bug is about 2.0.4 Ebuild for dev-libs/klibc-2.0.4, not updated: # ls -la /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild -rw-r--r-- 1 portage portage 9382 Aug 25 19:13 /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild And, also, ebuild dev-libs/klibc-2.0.4 not emerging.
(In reply to Kanogin Alexander from comment #24) > (In reply to Kobboi from comment #23) > > (In reply to Kanogin Alexander from comment #20) > > > Emerging dev-libs/klibc-2.0.4-r1, with gcc version 5.4.0 (Gentoo 5.4.0 p1.0, > > > pie-0.6.5) ends with an error: > > > > This is already the topic of bug #605180, this bug is about 2.0.4 > > Ebuild for dev-libs/klibc-2.0.4, not updated: > # ls -la /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild > -rw-r--r-- 1 portage portage 9382 Aug 25 19:13 > /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild > > And, also, ebuild dev-libs/klibc-2.0.4 not emerging. Attach build log for klibc-2.0.4 then
Ebuild dev-libs/klibc-2.0.4 not emerging: # ls -la /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild -rw-r--r-- 1 portage portage 9382 Aug 25 19:13 /usr/portage/dev-libs/klibc/klibc-2.0.4.ebuild please, see attahcments.
Created attachment 459740 [details] Output emerge dev-libs/klibc
Created attachment 459742 [details] dev-libs/klibc build log
(In reply to Kanogin Alexander from comment #27) > Created attachment 459740 [details] > Output emerge dev-libs/klibc That bug is fixed in dev-libs/klibc-2.0.4-r1.
I have installed sys-kernel / linux-headers-4.4, and displays an collisions error, with emerging: * /usr/lib64/klibc/include/asm-generic/auxvec.h * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * sys-kernel/linux-headers-4.4:0::gentoo * /usr/include/asm/sigcontext32.h * /usr/include/asm/siginfo.h Please see attachment.
Created attachment 460074 [details] klibc-2.0.4-r1 build log (ebuild from current attachments)