Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734354 - dev-util/kbuild-0.1.9998.3149 with >=sys-devel/bison-3.7: /.../arith.c: fatal error: arith.tab.h: No such file or directory
Summary: dev-util/kbuild-0.1.9998.3149 with >=sys-devel/bison-3.7: /.../arith.c: fatal...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: bison-3.7
  Show dependency tree
 
Reported: 2020-07-29 07:50 UTC by Toralf Förster
Modified: 2023-10-20 14:33 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.20 KB, text/plain)
2020-07-29 07:50 UTC, Toralf Förster
Details
dev-util:kbuild-0.1.9998.3149:20200729-032222.log (dev-util:kbuild-0.1.9998.3149:20200729-032222.log,275.92 KB, text/plain)
2020-07-29 07:50 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,57.43 KB, text/plain)
2020-07-29 07:50 UTC, Toralf Förster
Details
environment (environment,64.10 KB, text/plain)
2020-07-29 07:51 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,18.14 KB, application/x-bzip)
2020-07-29 07:51 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,17.39 KB, application/x-bzip)
2020-07-29 07:51 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,29.96 KB, application/x-bzip)
2020-07-29 07:51 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-07-29 07:50:46 UTC
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
Comment 1 Toralf Förster gentoo-dev 2020-07-29 07:50:50 UTC
Created attachment 651362 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-07-29 07:50:54 UTC
Created attachment 651364 [details]
dev-util:kbuild-0.1.9998.3149:20200729-032222.log
Comment 3 Toralf Förster gentoo-dev 2020-07-29 07:50:58 UTC
Created attachment 651366 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-07-29 07:51:00 UTC
Created attachment 651368 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-07-29 07:51:03 UTC
Created attachment 651370 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-07-29 07:51:06 UTC
Created attachment 651372 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-07-29 07:51:08 UTC
Created attachment 651374 [details]
temp.tbz2
Comment 8 Sven Eden 2020-08-05 08:08:40 UTC
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.
Comment 9 Sven Eden 2020-08-05 08:44:30 UTC
(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.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-08-11 11:03:54 UTC
This is a >=bison-3.7 regression... dunno if this was introduced by accident or intentionally...
Comment 11 Larry the Git Cow gentoo-dev 2020-08-11 11:20:58 UTC
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(+)
Comment 12 Nebrit 2020-09-02 01:02:08 UTC
To fix I just ran -
emerge --oneshot dev-util/yacc
After that broken emerge finishes fine -
emerge --resume
Comment 13 tt_1 2020-09-07 09:09:29 UTC
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.
Comment 14 Masoch Von Sade 2020-09-19 18:55:57 UTC
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.
Comment 15 James Baldassari 2020-09-24 17:18:19 UTC
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.
Comment 16 James Baldassari 2020-09-24 17:49:28 UTC
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.
Comment 17 _e 2021-01-03 19:33:54 UTC
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?
Comment 18 Larry the Git Cow gentoo-dev 2021-10-20 01:51:30 UTC
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(-)
Comment 19 Larry the Git Cow gentoo-dev 2022-11-20 08:31:49 UTC
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(-)