kBuild: Linking kmk_append kBuild: Linking kmk_cat /var/tmp/portage/dev-util/kbuild-0.1.9998.3149/work/kbuild-0.1.9998.3149/out/linux.amd64/release/obj/kash/arith.c:160:10: fatal error: arith.tab.h: No such file or directory 160 | #include "arith.tab.h" | ^~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_gnome_systemd-libressl-20200727-131833 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-10.2.0 * clang version 10.0.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/10/bin /usr/lib/llvm/10 10.0.1 Available Python interpreters, in order of preference: [1] python3.7 [2] python3.9 (fallback) [3] python3.8 (fallback) [4] python2.7 (fallback) Available Ruby profiles: [1] ruby25 (with Rubygems) * The following VMs are available for generation-2: *) AdoptOpenJDK 8.262_p10 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm The Glorious Glasgow Haskell Compilation System, version 8.0.2 timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Wed Jul 29 01:35:22 AM UTC 2020 /var/db/repos/libressl Fri Jul 24 09:42:51 PM UTC 2020 emerge -qpvO dev-util/kbuild [ebuild N ] dev-util/kbuild-0.1.9998.3149
Created attachment 651362 [details] emerge-info.txt
Created attachment 651364 [details] dev-util:kbuild-0.1.9998.3149:20200729-032222.log
Created attachment 651366 [details] emerge-history.txt
Created attachment 651368 [details] environment
Created attachment 651370 [details] etc.portage.tbz2
Created attachment 651372 [details] logs.tbz2
Created attachment 651374 [details] temp.tbz2
I had the same problem while installing on a new machine. After installing dev-util/yacc and removing sys-devel/bison, the merge of kbuild went through just fine. No idea whether bison must be removed, though. When emerging yacc, I had the message: -------- * Detected file collision(s): * * /usr/bin/yacc * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * None of the installed packages claim the file(s). * * Package 'dev-util/yacc-1.9.1-r6' merged despite file collisions. If * necessary, refer to your elog messages for the whole content of the * above message. -------- So it might be, that the /usr/bin/yacc (From stage tarball?) just had to be replaced.
(In reply to Sven Eden from comment #8) > No idea whether bison must be removed, though. Answer: It does not need to be removed. So unfortunately virtual/yacc doesn't cut it. dev-util/kbuild has to depend directly on dev-util/yacc it seems.
This is a >=bison-3.7 regression... dunno if this was introduced by accident or intentionally...
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d73a70b1e1ca620d9301361ebef944bbbffddeb5 commit d73a70b1e1ca620d9301361ebef944bbbffddeb5 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2020-08-11 11:20:41 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-08-11 11:20:54 +0000 dev-util/kbuild: Bump to version 0.1.9998.3407 Don't depend on virtual/yacc until bug #734354 has been fixed. Bug: https://bugs.gentoo.org/734354 Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-util/kbuild/Manifest | 1 + .../kbuild/files/kbuild-0.1.9998.3407-gold.patch | 11 ++++ ...build-0.1.9998.3407-unknown_configure_opt.patch | 20 +++++++ dev-util/kbuild/kbuild-0.1.9998.3407.ebuild | 70 ++++++++++++++++++++++ 4 files changed, 102 insertions(+)
To fix I just ran - emerge --oneshot dev-util/yacc After that broken emerge finishes fine - emerge --resume
can we go stable with kbuild-0.1.9998.3407? the older stable doesn't compile anymore, since bison 3.7.1 went stable a few days ago.
I had the same problem installing app-emulation/virtualbox. Reading this bugtrack I decide to unmask kbuild-0.1.9998.3407 using ~amd64 keyword. Running emerge --resume, I saw that the dev-util/byacc package was added to the dependency list, and the compilation and installation of vbox finished without a problem.
I'm having what I suspect is the same problem but with a manual kernel compilation (linux-5.4.66-gentoo) and sys-devel/bison-3.7.1-r1: aicasm_gram.tab.c:204:10: fatal error: aicasm_gram.tab.h: No such file or direct ory compilation terminated. CC drivers/scsi/aic94xx/aic94xx_init.o aicasm_macro_gram.tab.c:167:10: fatal error: aicasm_macro_gram.tab.h: No such fi le or directory I've tried installing each of { dev-util/yacc, dev-util/byacc }, but neither of these packages fixes the problem for me. I wonder if sys-devel/bison needs to be removed entirely from the system? I think the problem there is that several other packages are depending on it directly rather than virtual/yacc.
Finally found a workaround. I masked =sys-devel/bison-3.7.1-r1 forcing a downgrade to 3.1, and now the kernel compiles. Before going the downgrade route I also tried unmasking the newer version, 3.7.2, but it has the same issue. This seems to be a problem with some of the upstream kernel drivers not being compatible with newer versions of bison.
I am having the same problem as James during kernel compilation. It has been blocking me from a kernel upgrade for a while, I have been procrastinating on trying to fix the issue until now. aicasm_gram.tab.c:204:10: fatal error: aicasm_gram.tab.h: No such file or directory compilation terminated. AR drivers/net/ethernet/cadence/built-in.a AR drivers/ata/built-in.a aicasm_macro_gram.tab.c:167:10: fatal error: aicasm_macro_gram.tab.h: No such file or directory compilation terminated. I tried downgrading to Bison 3.1 as James suggested but that did not change the outcome. I also tried re-emerging dev-util/byacc, that made no difference. I also tried emerging dev-util/yacc. It was not previously installed, and when emerging it I encountered the same warning as Sven about the file collision. But this also made no difference. Actually, in reviewing the issue comments a little closer, I am wondering how James' issue relates to the OP?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4afce4f330a0ea9eded0dda8dbba28da040b321 commit b4afce4f330a0ea9eded0dda8dbba28da040b321 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-09 05:03:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-20 01:45:49 +0000 dev-util/kbuild: workaround build failure with Bison 3.7 Force usage of either byacc or yacc or older-not-in-tree Bison (< 3.7); it's not enough to just depend on these because we can't really be sure what kbuild will try to use, especially if a newer Bison is installed (it'll just try to use it and die). We choose byacc > yacc > older Bison but allow the user to override it via the environment if they wish. Right now, manual intervention seems to be required for people to install this if, as is likely, users have modern Bison installed (they'd need to unmerge (ugh!) Bison and then install byacc or yacc & hope the build system picks it up). Bug: https://bugs.gentoo.org/734354 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/22522 Signed-off-by: Sam James <sam@gentoo.org> dev-util/kbuild/kbuild-0.1.9998.3499.ebuild | 21 ++++++++++++++++++++- dev-util/kbuild/kbuild-9999.ebuild | 22 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f991589ceb5b3596bab7a2c52cd47f4f6d94ca8a commit f991589ceb5b3596bab7a2c52cd47f4f6d94ca8a Author: Viorel Munteanu <ceamac@gentoo.org> AuthorDate: 2022-11-13 08:15:40 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2022-11-20 08:30:36 +0000 dev-util/kbuild: fix lto, cflags, dependencies Fix compilation with bison, lto and custom cflags Closes: https://bugs.gentoo.org/734354 Closes: https://bugs.gentoo.org/448862 Closes: https://bugs.gentoo.org/858386 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> dev-util/kbuild/kbuild-0.1.9998.3499.ebuild | 41 +++++++-------------------- dev-util/kbuild/kbuild-9999.ebuild | 43 ++++++++--------------------- 2 files changed, 21 insertions(+), 63 deletions(-)