Subject: bug#50085: fatal error: parse-datetime.tab.h: No such file or directory

From: softwarebugreports <[email-masked]>
Date: Tue, 17 Aug 2021 23:48:08 +0000

Thank you for the help! I tried using 8002ca7b56acb46b42eeac4a343e112a8ee283cf and the latest commits from master and received the following errors while running bootstrap now:
#10 154.1 Copying file m4/stdint_h.m4
#10 154.2 Copying file m4/threadlib.m4
#10 154.2 Copying file m4/uintmax_t.m4
#10 154.2 Copying file m4/visibility.m4
#10 154.2 Copying file m4/wchar_t.m4
#10 154.3 Copying file m4/wint_t.m4
#10 154.3 Copying file m4/xsize.m4
#10 154.3 Copying file po/Makefile.in.in
#10 154.3 Copying file po/Makevars.template
#10 154.4 Copying file po/Rules-quot
#10 154.4 Copying file po/boldquot.sed
#10 154.4 Copying file po/[email-masked]
#10 154.5 Copying file po/[email-masked]
#10 154.5 Copying file po/insert-header.sin
#10 154.5 Copying file po/quot.sed
#10 154.5 Copying file po/remove-potcdate.sin
#10 156.1 ./bootstrap: gnulib/gnulib-tool    --no-changelog   --aux-dir=build-aux   --doc-base=doc   --lib=libcoreutils   --m4-base=m4/   --source-base=lib/   --tests-base=tests   --local-dir=gl   --tests-base=gnulib-tests --with-tests --symlink --makefile-name=gnulib.mk
#10 156.1    --import ...
#10 159.5 gnulib-tool: warning: module diacrit doesn't exist
#10 169.0 1 out of 1 hunk FAILED -- saving rejects to file /tmp/glgMTDiu/tempname.rej
#10 169.0 gnulib/gnulib-tool: *** patch file gl/modules/tempname.diff didn't apply cleanly
#10 169.0 gnulib/gnulib-tool: *** Stop.
#10 169.1 1 out of 1 hunk FAILED -- saving rejects to file /tmp/glgMTDiu/tempname.rej
#10 169.1 gnulib/gnulib-tool: *** patch file gl/modules/tempname.diff didn't apply cleanly
#10 169.1 gnulib/gnulib-tool: *** Stop.
#10 177.2 1 out of 1 hunk FAILED -- saving rejects to file /tmp/glgMTDiu/tempname.rej
#10 177.2 gnulib/gnulib-tool: *** patch file gl/modules/tempname.diff didn't apply cleanly
#10 177.2 gnulib/gnulib-tool: *** Stop.
#10 177.2 ./bootstrap: gnulib-tool failed
#10 ERROR: executor failed running [/bin/sh -c git clone --branch v8.32 --single-branch https://git.savannah.gnu.org/git/coreutils.git     && cd coreutils     && git clone https://git.savannah.gnu.org/git/gnulib.git     && export FORCE_UNSAFE_CONFIGURE=1     && ./bootstrap --gnulib-srcdir=gnulib --no-git     && ./configure     --disable-gcc-warnings     --disable-nls     --enable-install-program=hostname     --enable-single-binary=symlinks     --without-gmp     && make]: exit code: 1
------
> [6/6] RUN git clone --branch v8.32 --single-branch https://git.savannah.gnu.org/git/coreutils.git     && cd coreutils     && git clone https://git.savannah.gnu.org/git/gnulib.git     && export FORCE_UNSAFE_CONFIGURE=1     && ./bootstrap --gnulib-srcdir=gnulib --no-git     && ./configure     --disable-gcc-warnings     --disable-nls     --enable-install-program=hostname     --enable-single-binary=symlinks     --without-gmp     && make:
------
executor failed running [/bin/sh -c git clone --branch v8.32 --single-branch https://git.savannah.gnu.org/git/coreutils.git     && cd coreutils     && git clone https://git.savannah.gnu.org/git/gnulib.git     && export FORCE_UNSAFE_CONFIGURE=1     && ./bootstrap --gnulib-srcdir=gnulib --no-git     && ./configure     --disable-gcc-warnings     --disable-nls     --enable-install-program=hostname     --enable-single-binary=symlinks     --without-gmp     && make]: exit code: 1
make: *** [Makefile:9: build-coreutils] Error 1

My Dockerfile has the following content:
...
RUN git clone --branch v8.32 --single-branch https://git.savannah.gnu.org/git/coreutils.git \
    && cd coreutils \
    && git clone https://git.savannah.gnu.org/git/gnulib.git \
    && export FORCE_UNSAFE_CONFIGURE=1 \
    && ./bootstrap --gnulib-srcdir=gnulib --no-git \
    && ./configure \
    --disable-gcc-warnings \
    --disable-nls \
    --enable-install-program=hostname \
    --enable-single-binary=symlinks \
    --without-gmp \
    && make

Am I running bootstrap with improper flags or without necessary environment variables?

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, August 17th, 2021 at 11:32 AM, Pádraig Brady <[email-masked]> wrote:

> On 17/08/2021 16:16, Pádraig Brady wrote:
>
> > On 17/08/2021 02:32, softwarebugreports via GNU coreutils Bug Reports wrote:
> >
> > > I receive the following error when using make with coreutils in a alpine based docker container:
>
> > > > #10 304.5 parse-datetime.tab.c:658:10: fatal error: parse-datetime.tab.h: No such file or directory
>
> > > > RUN git clone --branch v8.32 --single-branch https://git.savannah.gnu.org/git/coreutils.git \
> > > >
> > > > && cd coreutils \
> > > >
> > > > && export FORCE_UNSAFE_CONFIGURE=1 \
> > > >
> > > > && ./bootstrap \
> > > >
> > > > && ./configure \
> > > >
> > > > --disable-gcc-warnings \
> > > >
> > > > --disable-nls \
> > > >
> > > > --enable-install-program=hostname \
> > > >
> > > > --enable-single-binary=symlinks \
> > > >
> > > > --without-gmp \
> > > >
> > > > && make
> > >
> > > Is there something I can try to correct this error?
> >
> > Seems this is related bison >= 3.7 which Bruno fixed in:
> >
> > https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00178.html
> >
> > That would have to be integrated as a patch against your coreutils sources.
>
> Actually there were a few more fixes in that file,
>
> so it's best base adjustments off this version:
>
> https://github.com/coreutils/gnulib/blob/8002ca7b/modules/parse-datetime
>
> cheers,
>
> Pádraig