Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 716516

Summary: sys-devel/bison-3.5.4 - lib/binary-io.h:52:10: error: 'O_BINARY' undeclared (first use in this function)
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: crabbedhaloablution, firefly_dude0k, gentoo-bz, gentoo, jarausch, jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://lists.gnu.org/archive/html/bug-bison/2020-09/msg00001.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
bison-3.7.1-fcntl-needs-O_BINARY.patch
Build log with "make -j1"
Build log with "make -j4"

Description Dennis Schridde 2020-04-07 06:25:10 UTC
Created attachment 630924 [details]
build.log

x86_64-pc-linux-gnu-gcc -DEXEEXT=\"\"   -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\"   -pipe -O2 -march=znver1 -c -o lib/libbison_a-pipe2.o `test -f 'lib/pipe2.c' || echo './'`lib/pipe2.c
In file included from lib/pipe2.c:25:
lib/binary-io.h: In function '__gl_setmode':
lib/binary-io.h:52:10: error: 'O_BINARY' undeclared (first use in this function)
   52 |   return O_BINARY;
      |          ^~~~~~~~
lib/binary-io.h:52:10: note: each undeclared identifier is reported only once for each function it appears in
lib/pipe2.c: In function 'rpl_pipe2':
lib/pipe2.c:70:43: error: 'O_BINARY' undeclared (first use in this function); did you mean 'SET_BINARY'?
   70 |   if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_BINARY | O_TEXT)) != 0)
      |                                           ^~~~~~~~
      |                                           SET_BINARY
lib/pipe2.c:70:54: error: 'O_TEXT' undeclared (first use in this function); did you mean 'F_TEST'?
   70 |   if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_BINARY | O_TEXT)) != 0)
      |                                                      ^~~~~~
      |                                                      F_TEST
make: *** [Makefile:5084: lib/libbison_a-pipe2.o] Error 1

Portage 2.3.96 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.3.0, glibc-2.30-r7, 5.5.14 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.5.14-x86_64-AMD_Ryzen_5_2400G_with_Radeon_Vega_Graphics-with-gentoo-2.7
KiB Mem:    14128300 total,   2281716 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 06 Apr 2020 12:15:01 +0000
Head commit of repository gentoo: 81d8b268a6d1d1c98ac2e1ecc001e018a176bd44
Head commit of repository flatpak-overlay: 2bcc4b030ff8288683533a84f15777680c8c883e

Head commit of repository local: 2ad3f5c5f6a5f120805d9844fb1779b935584132

sh bash 5.0_p16
ld GNU gold (Gentoo 2.34 p1 2.34.0) 1.16
ccache version 3.7.9 [disabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r2::gentoo, 3.6.10-r1::gentoo, 3.7.7-r1::gentoo, 3.8.2-r1::gentoo, 3.9.0_alpha5::gentoo
dev-util/ccache:          3.7.9::gentoo
dev-util/cmake:           3.17.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r7::gentoo
Repositories:

gentoo
    location: /var/cache/portage/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

flatpak-overlay
    location: /var/db/repos/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo

local
    location: /var/cache/portage/local
    sync-type: git
    sync-uri: https://github.com/devurandom/gentoo-overlay.git
    masters: gentoo
    priority: 1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=znver1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/grs/systems.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -O2 -march=znver1"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildsyspkg cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j6 -l4"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="7z 7zip X a52 aac aacplus aacs acl acpi activities aio alsa amd64 appindicator appstream archive audit avahi ayatana bdplus berkdb blake2 bluetooth bluray branding brotli bs2b btrfs bzip2 cairo caps cdda cddb cdio cdr celt chromaprint cjk clang cli clipboard color-management colord conntrack crypt cups d3d9 dav1d dbus declarative device-mapper dirac djvu dri drm dts dvb dvd dvdr ed25519 editorconfig egl elf emboss encode epub evdev exif faudio fax fbcon fdk ffmpeg fftw filecaps firefox firewalld fish-completion fits flac fontconfig fontforge fortran fribidi gamepad gbm gdal gdbm geoclue geolocation gif git gles2 gmp gnome-online-accounts gnupg google googledrive gpg gps graphicsmagick gstreamer gtk gtk3 gzip harfbuzz hdf5 heif http2 ibus iconv icu idn imlib inotify introspection ipv6 jemalloc jpeg jpeg2k json kde kipi kms kwallet ladspa latex lcms libatomic libglvnd libidn2 libinput libnotify libproxy libsecret libsoxr libtirpc libvirt lm-sensors lrz lv2 lvm lz4 lzma lzo mad mariadb markdown mbim mercurial mjpeg mng mobi modemmanager modplug mp3 mp4 mpeg mplayer mpris mtp multilib mysql ncurses netlink networkmanager nls nptl numa office ofx ogg openal opencl opencv openexr opengl openh264 openmax openmp opus pam pango pcap pch pcre pcre2 pdf pgo phonon pixman pkcs11 pkcs7 plasma pm-utils png policykit postscript ppds prison pulseaudio pwquality python qml qrcode qt5 raw rdp readline redfish samba sasl scanner schroedinger screencast sctp sdl sdl2 seccomp semantic-desktop share smartcard snappy sparse speech speex spell spice ssl startup-notification steamruntime stemmer svg systemd systemtap tbb tcpd teamd telepathy tga theora threads thunderbolt tiff timezone tmux truetype tslib udev udisks uinput unicode unwind upnp upnp-av upower usb utempter v4l v4l2 vaapi vdpau vkd3d vorbis vpx vulkan wasm wavpack wayland webchannel webengine webp widgets wmf woff2 wps x264 x265 xattr xcb xcomposite xinerama xkb xml xmp xrandr xscreensaver xv xvid xwayland xxhash xz yaml zeroconf zeromq zimg zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" ENLIGHTENMENT_MODULES="*" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="joystick libinput" KERNEL="linux" L10N="de de-DE en en-GB ar fa tr ja ko zh zh-CN zh-TW" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript wiki-publisher" LIRC_DEVICES="devinput" LLVM_TARGETS="AMDGPU BPF RISCV WebAssembly" LUA_TARGET="lua5-2" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 pypy pypy3" QEMU_SOFTMMU_TARGETS="riscv32 riscv64 x86_64" QEMU_USER_TARGETS="riscv32 riscv64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/bison-3.5.3::gentoo was built with the following:
USE="nls -examples -static -test" ABI_X86="(64)"
Comment 1 Matt Whitlock 2020-08-04 19:31:10 UTC
Build failure persists in sys-devel/bison-3.7.1.
Comment 2 Matt Whitlock 2020-08-05 18:02:46 UTC
Created attachment 653292 [details, diff]
bison-3.7.1-fcntl-needs-O_BINARY.patch

The attached patch fixes the build by having Autoconf require that the system <fcntl.h> defines the O_BINARY and O_TEXT constants or else generate lib/fcntl.h.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-06 06:55:43 UTC
*** Bug 735792 has been marked as a duplicate of this bug. ***
Comment 4 Claudio Calvelli 2020-08-30 11:30:08 UTC
Just had the same error on bison-3.6.4 which appears to have been marked stable recently so updating the system resulted in failure.
"Fixed" by s/O_BINARY/0/ and S/O_FREE/0/ everywhere as these are irrelevant for Linux anyway.
Any chance configure can check for these?
Comment 5 Claudio Calvelli 2020-08-30 11:32:37 UTC
(In reply to Claudio Calvelli from comment #4)
> Just had the same error on bison-3.6.4 which appears to have been marked
> stable recently so updating the system resulted in failure.
> "Fixed" by s/O_BINARY/0/ and S/O_FREE/0/ everywhere as these are irrelevant
> for Linux anyway.
> Any chance configure can check for these?

I meant O_TEXT of course, not O_FREE...
Comment 6 Matt Whitlock 2020-08-30 18:53:36 UTC
(In reply to Claudio Calvelli from comment #4)
> Any chance configure can check for these?

That's exactly what my patch in comment #2 does. Did you try it?
Comment 7 Claudio Calvelli 2020-08-30 19:20:07 UTC
(In reply to Matt Whitlock from comment #6)
> (In reply to Claudio Calvelli from comment #4)
> > Any chance configure can check for these?
> 
> That's exactly what my patch in comment #2 does. Did you try it?

That patch works - but I would expect that to be in the ebuild before it gets marked stable...
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2020-08-30 19:34:29 UTC
I don't know why you hit this but the patch is wrong -- the change was intended.

Also, see https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00003.html
Comment 9 Claudio Calvelli 2020-08-30 20:16:14 UTC
(In reply to Thomas Deutschmann from comment #8)
> I don't know why you hit this but the patch is wrong -- the change was
> intended.

After running more tests, it seems that when I tested with just "make" it built - with or without the patch.  But using "make -j4" it fails with "O_BINARY undeclared", and that seems to be fairly repeatable - "-j4" fail, no "-j" OK.
(this is starting from scratch, with no user_patches, just the ebuild as per an "emerge --sync" about 1 hour ago).
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2020-08-30 22:42:47 UTC
But this sounds like some weird parallel build issue, so MAKEOPTS=-j1 is always working for you?
Comment 11 Matt Whitlock 2020-08-31 00:49:50 UTC
I don't understand how it could possibly be a parallel build issue. The source code makes use of the O_BINARY macro, which glibc no longer defines in <fcntl.h>. The autoconf script (as shipped) doesn't test the system <fcntl.h> for a definition of O_BINARY, so the lack of such a definition doesn't prevent the build from attempting to use the system <fcntl.h>. The proper fix, a far as I can see, is to make the autoconf script test the system <fcntl.h> for a definition of O_BINARY, so that the build will use its local version of fcntl.h if the system version lacks the needed definition.

Parallel build is irrelevant to all of this.
Comment 12 Claudio Calvelli 2020-08-31 05:54:37 UTC
(In reply to Thomas Deutschmann from comment #10)
> But this sounds like some weird parallel build issue, so MAKEOPTS=-j1 is
> always working for you?

As far as I've tested, yes "-j1" always works.  But it takes some time to test, so I've only done a few times.

I've generated build logs with "-j1" (OK) and "-j4" (fail) if comparing them can help anybody.  Will attach them in a second.
Comment 13 Claudio Calvelli 2020-08-31 05:56:49 UTC
Created attachment 657590 [details]
Build log with "make -j1"
Comment 14 Claudio Calvelli 2020-08-31 05:57:20 UTC
Created attachment 657592 [details]
Build log with "make -j4"
Comment 15 Claudio Calvelli 2020-08-31 06:10:45 UTC
(In reply to Matt Whitlock from comment #11)

> Parallel build is irrelevant to all of this.

Comparing the build logs, "-j1" runs a "sed" to generate lib/fcntl.h - and "-j4" does not... so parallel build makes all the difference.

The patch does not actually work - it only seemed to work because I tested it with "make -j1".  The build still fails after applying the patch if I use "make -j4", and the difference is still the same, the Makefile does not generate lib/fcntl.h
Comment 16 Matt Whitlock 2020-08-31 06:19:01 UTC
Now I'm not able to get the build of sys-devel/bison-3.7.1 to fail, even without the patch.

Oddly, the build on my system (now) *does* generate lib/fcntl.h, even though configure says "checking for working fcntl.h... yes".

I would say that the Autoconf test is wrong/incomplete, as Bison does use the O_BINARY flag, which is no longer defined by glibc's <fcntl.h>. My patch fixes that issue by making the "checking for working fcntl.h" test fail.

Evidently whether the Bison build process generates lib/fcntl.h does not depend on whether the "checking for working fcntl.h" Autoconf test passes or fails.
Comment 17 Claudio Calvelli 2020-08-31 06:41:19 UTC
I just tried building 3.7.1, and I get the same result.  Fails with "-j4" (which is my default in make.conf) and builds OK with "-j1".
So for me the problem hasn't been fixed in 3.7.
The difference is still the same, lib/fcntl.h does not generated by the parallel build, which suggests some missing dependency somewhere.
Looking at the Makefile, nothing seem to depend on lib/fcntl.h, so that would be why "make" hasn't generated it before it's needed
And this, I feel, is the real bug - anything which relies on O_BINARY or O_TEXT needs to depend on lib/fcntl.h explicitely in the Makefile
Comment 18 Matt Whitlock 2020-08-31 14:38:25 UTC
(In reply to Claudio Calvelli from comment #17)
> Looking at the Makefile, nothing seem to depend on lib/fcntl.h

I think that's by design. The intention appears to be that lib/fcntl.h is only generated and used if the system <fcntl.h> is inadequate. It used to be the case that glibc's <fcntl.h> defined O_BINARY (to a dummy value) on Linux, so Bison didn't need to generate its own lib/fcntl.h just for the sake of referencing O_BINARY. That's no longer true since glibc dropped its definition.

So, nothing in Bison's Makefile should depend explicitly on lib/fcntl.h, as that file may not need to be generated in all cases. But there *should* be a dependency on whatever target generates all the header files in lib/.
Comment 19 Claudio Calvelli 2020-08-31 15:02:32 UTC
(In reply to Matt Whitlock from comment #18)
> (In reply to Claudio Calvelli from comment #17)
> > Looking at the Makefile, nothing seem to depend on lib/fcntl.h
> 
> I think that's by design. The intention appears to be that lib/fcntl.h is
> only generated and used if the system <fcntl.h> is inadequate. It used to be

No, the makefile generates lib/fcntl.h every time (from $(BUILT_SOURCES) which in turn is built by "make all") - but not having a dependency means that a parallel build may not generate it before it's used. As a result, gcc uses the system's fcntl.h which doesn't have the test for O_BINARY - this is also the reason why checking for that in configure makes no difference to the result.

For a non-parallel build, in the absence of explicit dependencies make builds the targets in the order it sees them in the Makefile, and then it works.  For a parallel build, it seems to decide to build some of the .o files before the fcntl.h which they do depend on logically, because the Makefile doesn't have anything to say that it is wrong to do so.

This needs to be fixed by upstream to put correct dependencies, however I see 2 possible workaround for the ebuild (and if upstream don't fix the dependencies, can please we have one of them before a newer ebuild is marked stable?)

1. force -j1 in the ebuild, or
2. do a "make lib/fcntl.h" before the "make all" to make sure things are built in the right order
Comment 20 Matt Whitlock 2020-08-31 15:32:15 UTC
(In reply to Claudio Calvelli from comment #19)
> 2. do a "make lib/fcntl.h" before the "make all" to make sure things are
> built in the right order

Wouldn't this only whack *one* mole, so to speak? We're having problems with lib/fcntl.h, but there are many other generated header files that could exhibit the same dependency ordering problem, aren't there?
Comment 21 Claudio Calvelli 2020-08-31 16:16:56 UTC
(In reply to Matt Whitlock from comment #20)
> Wouldn't this only whack *one* mole, so to speak? We're having problems with
> lib/fcntl.h, but there are many other generated header files that could
> exhibit the same dependency ordering problem, aren't there?

That is absolutely correct... I guess forcing "-j1" is the only workaround right now.
Comment 22 Matt Whitlock 2020-08-31 16:40:02 UTC
It actually seems like Automake is supposed to support exactly this scenario:

https://www.gnu.org/software/automake/manual/html_node/Sources.html

Indeed, you can see in Makefile.in:

all: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) all-recursive

So everything listed in $(BUILT_SOURCES) should be made *strictly before* beginning to make the all-recursive target.

And we can see that lib/fcntl.h is added to BUILT_SOURCES in lib/gnulib.mk, which is included by lib/local.mk, which is included by the top-level Makefile.am. And we can see that lib/fcntl.h is listed in BUILT_SOURCES in the top-level Makefile.in that Automake generates.

So the upshot is that lib/fcntl.h is a dependency of the top-level "all" target.

It might be revealing to run a 'make -p' in a prepared Bison build directory just to verify that the 'all' target does in fact depend on lib/fcntl.h.
Comment 23 Claudio Calvelli 2020-09-01 13:06:48 UTC
Right, since 3.7.1 was just marked stable and duly failed to build...

Seems that the exact combination of switches "make -j4 -l2" (which just happens to be my default) results in the error.  Every single time on the system where I had the error the other day.

Obviously, the result of the load check will differ on other systems, the same exact combination compiled correctly on another (faster) system, however on there I could get the same error (repeatably) with "make -j4 -l0.5".

I note from the OP's build log that they were using "-j6 -l4" which presumably is the precise combination to trigger the error on their system.

This would make the bug rather difficult to replicate without borrowing one of the systems where it's been noticed.  However I wonder if the package maintainer could be able to replicate the bug with this information.

I also wonder if this is actually some weird bug with "make".
Comment 24 Thomas Deutschmann (RETIRED) gentoo-dev 2020-09-01 13:18:06 UTC
Oh, I forgot to post to this bug:

I was able to reproduce 

> LC_ALL=C tests/bison --version >doc/bison.help.tmp
> make: *** [Makefile:10025: doc/bison.help] Error 139

failure with USE=static and version 3.6.4.

It is working in 3.7.1 for me.

I tried to bisect but even 3.6.4 when built from git sources works for me so I gave up given that 3.7.1 release tarball was working for me.

If you are still running into problems please report upstream. Maybe they can help you to find to root cause.
Comment 25 Claudio Calvelli 2020-09-05 17:22:24 UTC
(In reply to Thomas Deutschmann from comment #24)

> If you are still running into problems please report upstream. Maybe they
> can help you to find to root cause.

FYI - I did report it upstream and it's been fixed in 3.7.2 (just released).
Comment 26 Thomas Deutschmann (RETIRED) gentoo-dev 2020-09-05 17:36:01 UTC
Thank you very much!
Comment 27 Larry the Git Cow gentoo-dev 2020-09-05 17:58:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=332d144e99865ec163da64f97f50ebf3a107c5d1

commit 332d144e99865ec163da64f97f50ebf3a107c5d1
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-09-05 17:37:06 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-09-05 17:58:25 +0000

    sys-devel/bison: bump to v3.7.2
    
    Closes: https://bugs.gentoo.org/716516
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-devel/bison/Manifest           |  2 +
 sys-devel/bison/bison-3.7.2.ebuild | 92 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)