GNU bug report logs - #54390
YACC rules don't check DESTDIR existence for VPATH builds

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Reported by: Sam James <sam@HIDDEN>; Keywords: notabug; dated Mon, 14 Mar 2022 17:35:01 UTC; Maintainer for automake is bug-automake@HIDDEN.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 08:45:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 03:45:26 2023
Received: from localhost ([127.0.0.1]:49513 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGFgk-0001oD-3S
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 03:45:26 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:56384
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam@HIDDEN>) id 1pGFgh-0001nz-VU
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 03:45:24 -0500
Content-Type: multipart/signed;
 boundary="Apple-Mail=_B3B054A9-C39B-481F-AB62-D273F46FDC6B";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\))
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
From: Sam James <sam@HIDDEN>
In-Reply-To: <Y8EZzZo5o47cZQzh@vapier>
Date: Fri, 13 Jan 2023 08:45:04 +0000
Message-Id: <51F76F83-CDF8-41D2-8E2A-8137A81CBC96@HIDDEN>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier> <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
 <Y8EB4R/9XV7EOwXG@vapier> <94654BE3-11F1-43AF-95A9-51E30753C2F6@HIDDEN>
 <Y8EZzZo5o47cZQzh@vapier>
To: Mike Frysinger <vapier@HIDDEN>
X-Mailer: Apple Mail (2.3731.300.101.1.3)
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Apple-Mail=_B3B054A9-C39B-481F-AB62-D273F46FDC6B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On 13 Jan 2023, at 08:43, Mike Frysinger <vapier@HIDDEN> wrote:
>=20
> On 13 Jan 2023 07:07, Sam James wrote:
>> $ /tmp/libaacs/configure YACC=3Dbison LEX=3Dflex
>=20
> the problem is you're forcing `YACC=3Dbison`.  Automake defaults to =
`bison -y`
> which tells bison to operate in POSIX-yacc-compatible mode because =
Automake's
> rules target POSIX.  the end result is that you've forced a non-POSIX =
mode,
> and bison is writing files to the cwd which is not what Automake =
expects.
> it isn't that the src/file/ directory doesn't exist -- you can see =
from your
> log that files have been generated in src/file/ before the failure.

thanks, duh. That makes sense.

--Apple-Mail=_B3B054A9-C39B-481F-AB62-D273F46FDC6B
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY8EaEF8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB
NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R
kAm3AQDy3i4eSjrIXxn//uKfam+WzAiRNgIdqaymgrQ/Y7avRQEAqMG01on7o9nI
SuuymwrV9CMiKdlkOt019pMY7PMDSQ4=
=9VyQ
-----END PGP SIGNATURE-----

--Apple-Mail=_B3B054A9-C39B-481F-AB62-D273F46FDC6B--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 08:44:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 03:44:07 2023
Received: from localhost ([127.0.0.1]:49509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGFfS-0001lx-OM
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 03:44:06 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:56244
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vapier@HIDDEN>) id 1pGFfR-0001lM-9O
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 03:44:05 -0500
Received: by smtp.gentoo.org (Postfix, from userid 559)
 id 085AE33BE68; Fri, 13 Jan 2023 08:43:59 +0000 (UTC)
Date: Fri, 13 Jan 2023 03:43:57 -0500
From: Mike Frysinger <vapier@HIDDEN>
To: Sam James <sam@HIDDEN>
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
Message-ID: <Y8EZzZo5o47cZQzh@vapier>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier>
 <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
 <Y8EB4R/9XV7EOwXG@vapier>
 <94654BE3-11F1-43AF-95A9-51E30753C2F6@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="Q/wQt+dmWnGIkEnN"
Content-Disposition: inline
In-Reply-To: <94654BE3-11F1-43AF-95A9-51E30753C2F6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Q/wQt+dmWnGIkEnN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

On 13 Jan 2023 07:07, Sam James wrote:
> $ /tmp/libaacs/configure YACC=bison LEX=flex

the problem is you're forcing `YACC=bison`.  Automake defaults to `bison -y`
which tells bison to operate in POSIX-yacc-compatible mode because Automake's
rules target POSIX.  the end result is that you've forced a non-POSIX mode,
and bison is writing files to the cwd which is not what Automake expects.
it isn't that the src/file/ directory doesn't exist -- you can see from your
log that files have been generated in src/file/ before the failure.
-mike

--Q/wQt+dmWnGIkEnN
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPBGc0ACgkQQWM7n+g3
9YFgbg/+J3NZTcDicxV49tnEckgJZXAwO+nDvedM8Wdbe1U9I6UcsALsedYychRr
0zcb4qD2ebgz3l7Ztlf96z3Z7G6WQo/3OOkV9YvhL2REMtSMTRg0v6OoYmgftvw/
r3oXj0AOBnjh3XUAcAt1rohsqyX8bMTDUbYU50hUgWvIZMHPqv5f08tMp/n+V4G7
GHRLl33ypagi1Xhu1rNTPBsoMcKSzLIvpQfALZfnnhpmrpP0TyLdOlnV1lPx1xQk
5gwcSk4XpMOQZVLZYQ0kjoh1wP3oeeA5WwmL2+iyozZbCAMmC3qF/ApIMoleKhcB
eA4KQWQql/1OEUMuu98ijdvN8IWxqvUyUpRi/Vl2roNtLop7gWrxW4o8F+6sbvQ8
IjUNfxvNuz7335O7l7xdZlZPxOMKgE0Ct9IaXKoG6Y/DW80ijyWRJjk/c9AV54df
1ZUMQur4HLqhjwQxDWZZpJKyBe1fIR2uZ0hJUtaVfzrQV17ju5BFWDGn46wlmTjl
s7UHVTZgenllTRXA2Vb3CIUB7kxyyg6rReGAWZhT7FtD6CwID6zB2qQBq7uxa/JF
e/UoVi/8lKnsTB/9h4a7KFhVq5TxcF+JtkDP4pdHoAkGMWpPs+ngU9PqFOLMywcq
RweUV/qOa8+pzmsEL2Bd287TZXj768g8UB7mkPNgyuVH1tkk+AM=
=GxMW
-----END PGP SIGNATURE-----

--Q/wQt+dmWnGIkEnN--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 07:08:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 02:08:00 2023
Received: from localhost ([127.0.0.1]:49391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGEAS-0007aq-3M
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 02:08:00 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:46548
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam@HIDDEN>) id 1pGEAQ-0007aa-Uv
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 02:07:59 -0500
Content-Type: multipart/signed;
 boundary="Apple-Mail=_E298C910-1BEF-413E-9BA9-593E5CCABA8F";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\))
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
From: Sam James <sam@HIDDEN>
In-Reply-To: <Y8EB4R/9XV7EOwXG@vapier>
Date: Fri, 13 Jan 2023 07:07:39 +0000
Message-Id: <94654BE3-11F1-43AF-95A9-51E30753C2F6@HIDDEN>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier> <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
 <Y8EB4R/9XV7EOwXG@vapier>
To: Mike Frysinger <vapier@HIDDEN>
X-Mailer: Apple Mail (2.3731.300.101.1.3)
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Apple-Mail=_E298C910-1BEF-413E-9BA9-593E5CCABA8F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On 13 Jan 2023, at 07:01, Mike Frysinger <vapier@HIDDEN> wrote:
>=20
> On 13 Jan 2023 06:29, Sam James wrote:
>>> On 13 Jan 2023, at 06:13, Mike Frysinger <vapier@HIDDEN> wrote:
>>> On 14 Mar 2022 17:21, Sam James wrote:
>>>> It appears that YACC rules don't check for whether the destination =
directory exists before executing ylwrap.
>>>>=20
>>>> When trying to package libaacs =
(https://code.videolan.org/videolan/libaacs) with an out-of-source =
build, I hit an unexpected build failure:
>>>> ```
>>>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/file/ke=
ydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option =
'--update'. [-Wother]
>>>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-aux/y=
lwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory =
nonexistent
>>>> updating src/file/keydbcfg-parser.h
>>>> mv: cannot move 'tmp-keydbcfg-parser.h' to =
'../src/file/keydbcfg-parser.h': No such file or directory
>>>> make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
>>>> ```
>>>>=20
>>>> I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` =
to ensure that the necessary directory exists within the build directory =
beforehand, but
>>>> it feels like I shouldn't have to.
>>>>=20
>>>> Their Makefile.am can be found here: =
https://code.videolan.org/videolan/libaacs/-/blob/master/Makefile.am. =
Snippet:
>>>> ```
>>>> libaacs_la_SOURCES=3D\
>>>> src/libaacs/aacs.h \
>>>> [...]
>>>> src/file/dirs.h \
>>>> src/file/file.h \
>>>> src/file/file.c \
>>>> src/file/filesystem.h \
>>>> src/file/filesystem.c \
>>>> src/file/keydbcfg.c \
>>>> src/file/keydbcfg.h \
>>>> src/file/keydb.h \
>>>> src/file/keydbcfg-parser.y \
>>>> src/file/keydbcfg-lexer.l \
>>>> src/file/mmc_device.h \
>>>> [...]
>>>> ```
>>>>=20
>>>> While src/libaacs exists within the build dir, src/file/ doesn't =
exist at all, hence the failure.
>>>>=20
>>>> automake yacc rules should mkdir -p the needed directories within =
the build dir for VPATH builds before running ylwrap/yacc.
>>>=20
>>> i think there's more to it.  if you're using a release tarball for =
this project
>>> created by `make dist`, then you shouldn't be running yacc in the =
first place.
>>>=20
>>> =
https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
>>=20
>> Curiosity got the better of me (see previous reply) so:
>> ```
>> $ cd /tmp
>> $ git clone https://code.videolan.org/videolan/libaacs/
>> $(cd libaacs && ./bootstrap.sh)
>> $mkdir libaacs-oos && cd libaacs
>=20
> guessing you meant `cd libaacs-oos`
>=20
>> $ /tmp/libaacs/configure YACC=3Dbison LEX=3Dflex
>> $ make
>> $ make
>>  YACC     src/file/keydbcfg-parser.c
>> keydbcfg-parser.tab.c is unchanged
>> keydbcfg-parser.tab.h is unchanged
>> make[1]: Entering directory '/tmp/libaacs-oos'
>>  YACC     src/file/keydbcfg-parser.c
>> keydbcfg-parser.tab.c is unchanged
>> keydbcfg-parser.tab.h is unchanged
>> make[1]: Leaving directory '/tmp/libaacs-oos'
>> make  all-am
>> make[1]: Entering directory '/tmp/libaacs-oos'
>>  YACC     src/file/keydbcfg-parser.c
>> keydbcfg-parser.tab.c is unchanged
>> keydbcfg-parser.tab.h is unchanged
>>  CC       src/file/keydbcfg-parser.lo
>> cc1: fatal error: src/file/keydbcfg-parser.c: No such file or =
directory
>> compilation terminated.
>> make[1]: *** [Makefile:1009: src/file/keydbcfg-parser.lo] Error 1
>> make[1]: Leaving directory '/tmp/libaacs-oos'
>> make: *** [Makefile:638: all] Error 2
>> ```
>>=20
>> so it's still looking in the source rather than the build directory =
for the generated file?
>=20
> i'm not sure what you're trying to show here.  that running make twice =
in a
> row produces weird/inconsistent results ?  if that's the case, that's =
not
> the behavior i'm seeing over here.
>=20
No, that was just an error in copying stuff into email. It happens with =
running make once,
so it should be:
```
$ cd /tmp
$ git clone https://code.videolan.org/videolan/libaacs/
$ (cd libaacs && ./bootstrap)
$ mkdir libaacs-oos && cd libaacs-oos
$ /tmp/libaacs/configure YACC=3Dbison LEX=3Dflex
$ make
  YACC     src/file/keydbcfg-parser.c
updating keydbcfg-parser.tab.c
updating keydbcfg-parser.tab.h
make[1]: Entering directory '/tmp/libaacs-oos'
  YACC     src/file/keydbcfg-parser.c
keydbcfg-parser.tab.c is unchanged
keydbcfg-parser.tab.h is unchanged
make[1]: Leaving directory '/tmp/libaacs-oos'
  LEX      src/file/keydbcfg-lexer.c
make  all-am
make[1]: Entering directory '/tmp/libaacs-oos'
  CC       src/examples/aacs_info-aacs_info.o
  CC       src/libaacs/aacs.lo
  CC       src/libaacs/cci.lo
  CC       src/libaacs/content_cert.lo
  CC       src/libaacs/crypto.lo
  CC       src/libaacs/mkb.lo
  CC       src/libaacs/mmc.lo
  CC       src/libaacs/unit_key.lo
  CC       src/file/file.lo
  CC       src/file/filesystem.lo
  CC       src/file/keydbcfg.lo
  YACC     src/file/keydbcfg-parser.c
keydbcfg-parser.tab.c is unchanged
keydbcfg-parser.tab.h is unchanged
  CC       src/file/keydbcfg-parser.lo
cc1: fatal error: src/file/keydbcfg-parser.c: No such file or directory
compilation terminated.
make[1]: *** [Makefile:1009: src/file/keydbcfg-parser.lo] Error 1
make[1]: Leaving directory '/tmp/libaacs-oos'
make: *** [Makefile:638: all] Error 2
```

You can't reproduce the build failure?

> i'll note that the default configure+make works because dependency =
tracking
> is enabled which prepopulates the directory tree.  it's failing for =
you in
> Gentoo because econf automatically adds --disable-dependency-tracking =
which
> turns all that logic off, and the directory tree doesn't exist.

I'm not sure how that corresponds with when I run configure manually as =
above?

What am I missing, or am I misunderstanding?

Thanks.


--Apple-Mail=_E298C910-1BEF-413E-9BA9-593E5CCABA8F
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY8EDO18UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB
NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R
kMXsAP9a3PbifpD0aFHB9YGhm6fVUjpq0ycLYuVizskgEU/yBwEA27Ha8l8d7dav
2TmXCnNnHstiG4VsolJsj8Y6e38OxQ0=
=bNV+
-----END PGP SIGNATURE-----

--Apple-Mail=_E298C910-1BEF-413E-9BA9-593E5CCABA8F--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 07:02:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 02:02:03 2023
Received: from localhost ([127.0.0.1]:49386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGE4h-0007RO-22
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 02:02:03 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:45862
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vapier@HIDDEN>) id 1pGE4e-0007Qq-Ga
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 02:02:01 -0500
Received: by smtp.gentoo.org (Postfix, from userid 559)
 id D83343408DD; Fri, 13 Jan 2023 07:01:54 +0000 (UTC)
Date: Fri, 13 Jan 2023 02:01:53 -0500
From: Mike Frysinger <vapier@HIDDEN>
To: Sam James <sam@HIDDEN>
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
Message-ID: <Y8EB4R/9XV7EOwXG@vapier>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier>
 <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="wrusJiKEqHi8YIov"
Content-Disposition: inline
In-Reply-To: <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--wrusJiKEqHi8YIov
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 13 Jan 2023 06:29, Sam James wrote:
> > On 13 Jan 2023, at 06:13, Mike Frysinger <vapier@HIDDEN> wrote:
> > On 14 Mar 2022 17:21, Sam James wrote:
> >> It appears that YACC rules don't check for whether the destination dir=
ectory exists before executing ylwrap.
> >>=20
> >> When trying to package libaacs (https://code.videolan.org/videolan/lib=
aacs) with an out-of-source build, I hit an unexpected build failure:
> >> ```
> >> /var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/fil=
e/keydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option '-=
-update'. [-Wother]
> >> /var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-a=
ux/ylwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory none=
xistent
> >> updating src/file/keydbcfg-parser.h
> >> mv: cannot move 'tmp-keydbcfg-parser.h' to '../src/file/keydbcfg-parse=
r.h': No such file or directory
> >> make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
> >> ```
> >>=20
> >> I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` to e=
nsure that the necessary directory exists within the build directory before=
hand, but
> >> it feels like I shouldn't have to.
> >>=20
> >> Their Makefile.am can be found here: https://code.videolan.org/videola=
n/libaacs/-/blob/master/Makefile.am. Snippet:
> >> ```
> >> libaacs_la_SOURCES=3D\
> >> src/libaacs/aacs.h \
> >> [...]
> >> src/file/dirs.h \
> >> src/file/file.h \
> >> src/file/file.c \
> >> src/file/filesystem.h \
> >> src/file/filesystem.c \
> >> src/file/keydbcfg.c \
> >> src/file/keydbcfg.h \
> >> src/file/keydb.h \
> >> src/file/keydbcfg-parser.y \
> >> src/file/keydbcfg-lexer.l \
> >> src/file/mmc_device.h \
> >> [...]
> >> ```
> >>=20
> >> While src/libaacs exists within the build dir, src/file/ doesn't exist=
 at all, hence the failure.
> >>=20
> >> automake yacc rules should mkdir -p the needed directories within the =
build dir for VPATH builds before running ylwrap/yacc.
> >=20
> > i think there's more to it.  if you're using a release tarball for this=
 project
> > created by `make dist`, then you shouldn't be running yacc in the first=
 place.
> >=20
> > https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
>=20
> Curiosity got the better of me (see previous reply) so:
> ```
> $ cd /tmp
> $ git clone https://code.videolan.org/videolan/libaacs/
> $(cd libaacs && ./bootstrap.sh)
> $mkdir libaacs-oos && cd libaacs

guessing you meant `cd libaacs-oos`

> $ /tmp/libaacs/configure YACC=3Dbison LEX=3Dflex
> $ make
> $ make
>   YACC     src/file/keydbcfg-parser.c
> keydbcfg-parser.tab.c is unchanged
> keydbcfg-parser.tab.h is unchanged
> make[1]: Entering directory '/tmp/libaacs-oos'
>   YACC     src/file/keydbcfg-parser.c
> keydbcfg-parser.tab.c is unchanged
> keydbcfg-parser.tab.h is unchanged
> make[1]: Leaving directory '/tmp/libaacs-oos'
> make  all-am
> make[1]: Entering directory '/tmp/libaacs-oos'
>   YACC     src/file/keydbcfg-parser.c
> keydbcfg-parser.tab.c is unchanged
> keydbcfg-parser.tab.h is unchanged
>   CC       src/file/keydbcfg-parser.lo
> cc1: fatal error: src/file/keydbcfg-parser.c: No such file or directory
> compilation terminated.
> make[1]: *** [Makefile:1009: src/file/keydbcfg-parser.lo] Error 1
> make[1]: Leaving directory '/tmp/libaacs-oos'
> make: *** [Makefile:638: all] Error 2
> ```
>=20
> so it's still looking in the source rather than the build directory for t=
he generated file?

i'm not sure what you're trying to show here.  that running make twice in a
row produces weird/inconsistent results ?  if that's the case, that's not
the behavior i'm seeing over here.

i'll note that the default configure+make works because dependency tracking
is enabled which prepopulates the directory tree.  it's failing for you in
Gentoo because econf automatically adds --disable-dependency-tracking which
turns all that logic off, and the directory tree doesn't exist.

Automake is VPATH-ing the source file.  we prob should change that to use an
explicit $(srcdir) prefix when nodist is not utilized.  then it would always
write the generated .c/.h to the source tree.
-mike

--wrusJiKEqHi8YIov
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPBAeEACgkQQWM7n+g3
9YHUlg/8C+wobIFIV3/pd5Bgl0KLRrmWDWaW13ZHREHAevXz/sR05y9jHnA0CdGk
poE7q/5kkp7OgDkJD7UebPLeMavXJLx0/wBBmVncNTqZ4eZcjPHSxw3Qey+R1yYa
grX2yzuU4bdkfoJfr1mjSt1y9yJVrgCkPsX9gcUkgF57Y6WelBCMtndyu8v4d193
zVNveatX28J7V2m3cENNwsUGddZ4ofGD4E9il/fYr3979Hk74GubZgJFX6gf7IzX
bfkOQbNXnvJT3ImyK67etWNHrCE0pXD/hYeXZe6xZ3KK6c6ScZNvZkcsboohIR7a
H4ZcJFZZzFSFdGdWQCRQjmUI0qo4RMuU6VjG/w9O6r+dud5fm9+XgAniG7jrtvNL
ea2NLCTihOB164DKYJNzlNhGw9NJ+8KVtkQ9UPBwqdhkEfOLNDqUMEXc2XKy1A6U
a4E+8bsuYqzVcIHg/5vVlaGXdU9bX7EsoY/kO6N2dG4rTVSoA1KmUwnXxuE7qkLe
kH/K2p0aQUcYG7/G6FfoxwM4AwsOApIdoaZWW5kpXTPr0VTqCMb6o8/UV6MEG+fK
N1mR0nVLCRz/Meu3z6lvT7RSaxYTDyfNZzfnwns5xNHfjq59KG+VQI78fKazJ3el
JA2g2szr2elLcI0PSwBbtoYvRQFOS1pmjolhEWakzO9vgSR0bHE=
=gepH
-----END PGP SIGNATURE-----

--wrusJiKEqHi8YIov--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 06:30:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 01:30:18 2023
Received: from localhost ([127.0.0.1]:49305 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGDZx-0002dd-Lb
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:30:18 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:42934
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam@HIDDEN>) id 1pGDZv-0002Dt-Tf
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:30:17 -0500
Content-Type: multipart/signed;
 boundary="Apple-Mail=_370DE771-1796-4AF5-858A-A1B63B230FA9";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\))
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
From: Sam James <sam@HIDDEN>
In-Reply-To: <Y8D2ou17RmQu+rhY@vapier>
Date: Fri, 13 Jan 2023 06:29:56 +0000
Message-Id: <906C5A7C-2D9C-46F4-8971-87E0E8E7DF97@HIDDEN>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier>
To: Mike Frysinger <vapier@HIDDEN>
X-Mailer: Apple Mail (2.3731.300.101.1.3)
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Apple-Mail=_370DE771-1796-4AF5-858A-A1B63B230FA9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On 13 Jan 2023, at 06:13, Mike Frysinger <vapier@HIDDEN> wrote:
>=20
> On 14 Mar 2022 17:21, Sam James wrote:
>> It appears that YACC rules don't check for whether the destination =
directory exists before executing ylwrap.
>>=20
>> When trying to package libaacs =
(https://code.videolan.org/videolan/libaacs) with an out-of-source =
build, I hit an unexpected build failure:
>> ```
>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/file/ke=
ydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option =
'--update'. [-Wother]
>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-aux/y=
lwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory =
nonexistent
>> updating src/file/keydbcfg-parser.h
>> mv: cannot move 'tmp-keydbcfg-parser.h' to =
'../src/file/keydbcfg-parser.h': No such file or directory
>> make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
>> ```
>>=20
>> I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` to =
ensure that the necessary directory exists within the build directory =
beforehand, but
>> it feels like I shouldn't have to.
>>=20
>> Their Makefile.am can be found here: =
https://code.videolan.org/videolan/libaacs/-/blob/master/Makefile.am. =
Snippet:
>> ```
>> libaacs_la_SOURCES=3D\
>> src/libaacs/aacs.h \
>> [...]
>> src/file/dirs.h \
>> src/file/file.h \
>> src/file/file.c \
>> src/file/filesystem.h \
>> src/file/filesystem.c \
>> src/file/keydbcfg.c \
>> src/file/keydbcfg.h \
>> src/file/keydb.h \
>> src/file/keydbcfg-parser.y \
>> src/file/keydbcfg-lexer.l \
>> src/file/mmc_device.h \
>> [...]
>> ```
>>=20
>> While src/libaacs exists within the build dir, src/file/ doesn't =
exist at all, hence the failure.
>>=20
>> automake yacc rules should mkdir -p the needed directories within the =
build dir for VPATH builds before running ylwrap/yacc.
>=20
> i think there's more to it.  if you're using a release tarball for =
this project
> created by `make dist`, then you shouldn't be running yacc in the =
first place.
>=20
> =
https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html

Curiosity got the better of me (see previous reply) so:
```
$ cd /tmp
$ git clone https://code.videolan.org/videolan/libaacs/
$(cd libaacs && ./bootstrap.sh)
$mkdir libaacs-oos && cd libaacs
$ /tmp/libaacs/configure YACC=3Dbison LEX=3Dflex
$ make
$ make
  YACC     src/file/keydbcfg-parser.c
keydbcfg-parser.tab.c is unchanged
keydbcfg-parser.tab.h is unchanged
make[1]: Entering directory '/tmp/libaacs-oos'
  YACC     src/file/keydbcfg-parser.c
keydbcfg-parser.tab.c is unchanged
keydbcfg-parser.tab.h is unchanged
make[1]: Leaving directory '/tmp/libaacs-oos'
make  all-am
make[1]: Entering directory '/tmp/libaacs-oos'
  YACC     src/file/keydbcfg-parser.c
keydbcfg-parser.tab.c is unchanged
keydbcfg-parser.tab.h is unchanged
  CC       src/file/keydbcfg-parser.lo
cc1: fatal error: src/file/keydbcfg-parser.c: No such file or directory
compilation terminated.
make[1]: *** [Makefile:1009: src/file/keydbcfg-parser.lo] Error 1
make[1]: Leaving directory '/tmp/libaacs-oos'
make: *** [Makefile:638: all] Error 2
```

so it's still looking in the source rather than the build directory for =
the generated file?

--Apple-Mail=_370DE771-1796-4AF5-858A-A1B63B230FA9
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY8D6ZV8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB
NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R
kJINAQCxzNV6Fm5w86pB8xu8Hn9rioV7aumTh/jWJv6KxidmRgD+IyW8I4jSFrST
HekWuMZccgQ7Kv67NF5YZpWHgGyprAw=
=Ko5N
-----END PGP SIGNATURE-----

--Apple-Mail=_370DE771-1796-4AF5-858A-A1B63B230FA9--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 06:22:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 01:22:53 2023
Received: from localhost ([127.0.0.1]:49289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGDSn-0001Vt-7O
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:22:53 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:42292
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam@HIDDEN>) id 1pGDSl-0001Vc-BX
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:22:51 -0500
Content-Type: multipart/signed;
 boundary="Apple-Mail=_C511B064-8D13-494E-A486-93303C53F603";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\))
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
From: Sam James <sam@HIDDEN>
In-Reply-To: <Y8D2ou17RmQu+rhY@vapier>
Date: Fri, 13 Jan 2023 06:22:30 +0000
Message-Id: <E08046E8-71A9-49BC-A358-21B8B39EC302@HIDDEN>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
 <Y8D2ou17RmQu+rhY@vapier>
To: Mike Frysinger <vapier@HIDDEN>
X-Mailer: Apple Mail (2.3731.300.101.1.3)
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Apple-Mail=_C511B064-8D13-494E-A486-93303C53F603
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 13 Jan 2023, at 06:13, Mike Frysinger <vapier@HIDDEN> wrote:
>=20
> On 14 Mar 2022 17:21, Sam James wrote:
>> It appears that YACC rules don't check for whether the destination =
directory exists before executing ylwrap.
>>=20
>> When trying to package libaacs =
(https://code.videolan.org/videolan/libaacs) with an out-of-source =
build, I hit an unexpected build failure:
>> ```
>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/file/ke=
ydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option =
'--update'. [-Wother]
>> =
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-aux/y=
lwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory =
nonexistent
>> updating src/file/keydbcfg-parser.h
>> mv: cannot move 'tmp-keydbcfg-parser.h' to =
'../src/file/keydbcfg-parser.h': No such file or directory
>> make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
>> ```
>>=20
>> I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` to =
ensure that the necessary directory exists within the build directory =
beforehand, but
>> it feels like I shouldn't have to.
>>=20
>> Their Makefile.am can be found here: =
https://code.videolan.org/videolan/libaacs/-/blob/master/Makefile.am. =
Snippet:
>> ```
>> libaacs_la_SOURCES=3D\
>> src/libaacs/aacs.h \
>> [...]
>> src/file/dirs.h \
>> src/file/file.h \
>> src/file/file.c \
>> src/file/filesystem.h \
>> src/file/filesystem.c \
>> src/file/keydbcfg.c \
>> src/file/keydbcfg.h \
>> src/file/keydb.h \
>> src/file/keydbcfg-parser.y \
>> src/file/keydbcfg-lexer.l \
>> src/file/mmc_device.h \
>> [...]
>> ```
>>=20
>> While src/libaacs exists within the build dir, src/file/ doesn't =
exist at all, hence the failure.
>>=20
>> automake yacc rules should mkdir -p the needed directories within the =
build dir for VPATH builds before running ylwrap/yacc.
>=20
> i think there's more to it.  if you're using a release tarball for =
this project
> created by `make dist`, then you shouldn't be running yacc in the =
first place.
>=20
> =
https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
>> The intermediate files generated by yacc (or lex) will be included in =
any
>> distribution that is made. That way the user doesn=E2=80=99t need to =
have yacc or lex.
>=20
> cloning that repo and running `make dist` shows the file is generated, =
and it's
> listed in am__DIST_COMMON, but it still doesn't make it into the =
tarball.  oh,
> it looks like this is self-inflicted:
> =
https://code.videolan.org/videolan/libaacs/-/blob/0.11.1/Makefile.am#L88
> =
https://code.videolan.org/videolan/libaacs/-/commit/f60f46da1dc5e87f70b6ed=
c965a8909d3f21c247
>=20
> that makes no sense.  file a bug with them.

Thanks - IIRC I hit this when running from git too, which is why I filed =
the bug, but that's definitely
wrong on their side anyway, and I can't say I want to bother trying to =
build it again from git.

I'll report it over there.


--Apple-Mail=_C511B064-8D13-494E-A486-93303C53F603
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY8D4p18UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB
NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R
kHBLAP0cCKcjWr777v+iByts+DOTPl85gaIVWAePXbScCx0vuQD8CX2o9QGd/dXU
TZJtMKI3ZM5C9gbfzcqUikKODCfYFws=
=yO84
-----END PGP SIGNATURE-----

--Apple-Mail=_C511B064-8D13-494E-A486-93303C53F603--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.
Added tag(s) notabug. Request was from Mike Frysinger <vapier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 54390 <at> debbugs.gnu.org:


Received: (at 54390) by debbugs.gnu.org; 13 Jan 2023 06:14:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 13 01:14:03 2023
Received: from localhost ([127.0.0.1]:49270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pGDKF-0001H6-8B
	for submit <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:14:03 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:41448
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vapier@HIDDEN>) id 1pGDKD-0001GW-RF
 for 54390 <at> debbugs.gnu.org; Fri, 13 Jan 2023 01:14:02 -0500
Received: by smtp.gentoo.org (Postfix, from userid 559)
 id 4023B340441; Fri, 13 Jan 2023 06:13:56 +0000 (UTC)
Date: Fri, 13 Jan 2023 01:13:54 -0500
From: Mike Frysinger <vapier@HIDDEN>
To: Sam James <sam@HIDDEN>
Subject: Re: bug#54390: YACC rules don't check DESTDIR existence for VPATH
 builds
Message-ID: <Y8D2ou17RmQu+rhY@vapier>
References: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="HguK3SCBmGfvoo7q"
Content-Disposition: inline
In-Reply-To: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54390
Cc: 54390 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--HguK3SCBmGfvoo7q
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 14 Mar 2022 17:21, Sam James wrote:
> It appears that YACC rules don't check for whether the destination direct=
ory exists before executing ylwrap.
>=20
> When trying to package libaacs (https://code.videolan.org/videolan/libaac=
s) with an out-of-source build, I hit an unexpected build failure:
> ```
> /var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/file/k=
eydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option '--up=
date'. [-Wother]
> /var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-aux/=
ylwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory nonexis=
tent
> updating src/file/keydbcfg-parser.h
> mv: cannot move 'tmp-keydbcfg-parser.h' to '../src/file/keydbcfg-parser.h=
': No such file or directory
> make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
> ```
>=20
> I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` to ensu=
re that the necessary directory exists within the build directory beforehan=
d, but
> it feels like I shouldn't have to.
>=20
> Their Makefile.am can be found here: https://code.videolan.org/videolan/l=
ibaacs/-/blob/master/Makefile.am. Snippet:
> ```
> libaacs_la_SOURCES=3D\
> 	src/libaacs/aacs.h \
> [...]
> 	src/file/dirs.h \
> 	src/file/file.h \
> 	src/file/file.c \
> 	src/file/filesystem.h \
> 	src/file/filesystem.c \
> 	src/file/keydbcfg.c \
> 	src/file/keydbcfg.h \
> 	src/file/keydb.h \
> 	src/file/keydbcfg-parser.y \
> 	src/file/keydbcfg-lexer.l \
> 	src/file/mmc_device.h \
> [...]
> ```
>=20
> While src/libaacs exists within the build dir, src/file/ doesn't exist at=
 all, hence the failure.
>=20
> automake yacc rules should mkdir -p the needed directories within the bui=
ld dir for VPATH builds before running ylwrap/yacc.

i think there's more to it.  if you're using a release tarball for this pro=
ject
created by `make dist`, then you shouldn't be running yacc in the first pla=
ce.

https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
> The intermediate files generated by yacc (or lex) will be included in any
> distribution that is made. That way the user doesn=E2=80=99t need to have=
 yacc or lex.

cloning that repo and running `make dist` shows the file is generated, and =
it's
listed in am__DIST_COMMON, but it still doesn't make it into the tarball.  =
oh,
it looks like this is self-inflicted:
https://code.videolan.org/videolan/libaacs/-/blob/0.11.1/Makefile.am#L88
https://code.videolan.org/videolan/libaacs/-/commit/f60f46da1dc5e87f70b6edc=
965a8909d3f21c247

that makes no sense.  file a bug with them.
-mike

--HguK3SCBmGfvoo7q
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPA9p0ACgkQQWM7n+g3
9YGErQ//b/xG0LUloZPT+A1I6YBl7XpOmZNu+/e2YqRSLYpEeJm6ymJC6V7a7Qsq
QYLIa+l50YRsbIzfrQJxdfODoGXymLqYXv7rBGz5JA6Xv++BxyukaSiHN+5tlWo3
cBiEtNMfvXUO2+PaokN4ii9boTVmWGF1oinD/cY0nhUUBaIgnYwRzxsVsBneRTyU
1qRGDQMtFpXCzlQrb8M2CSQFfMfA3wGfR9ctEGSBQnD0wG+/34EjEJLl3Br9IO5f
/8TjnUQwo1zj65jgVtmufzRXizHGY4ul1q+0MShtyHSgezKM2hDesQwNCT/iY8ID
dkEzZp9/W//pObycMv9n027IlhMEPgZtmWqHS0+0bYBEJ/clLJY+XCw1x+4P/sfy
uvsoJny+4kUCaGRuR6dKEaCdvvlvR16YeNo/P3SmSfIJudKXVO9VOEmYwgzkZD8v
Im39CnMvYiDlzMDENTFA31JdbX2jnTwZ5j048Gp9MakeSewuonHPtbbfyiTThynG
4LX5uPUCbZK3oaaIF3tr1ECG2ZGqSOviNmMe6PL6hzVJBWvYnxQ3G+mp9oDjy/q/
I6uba9SqXw95TcezF+MKLOB1UjMQ+JJENLL9XlcK6FiQEnQs614MEMcpgZhor2Vy
hsTvgVgnp9RJ1GC0lv19Le+1c9MvjZgPRgZLeyynbDYkXxsX1u8=
=SVoD
-----END PGP SIGNATURE-----

--HguK3SCBmGfvoo7q--




Information forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Mar 2022 17:34:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 14 13:34:29 2022
Received: from localhost ([127.0.0.1]:46220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nToaS-0001zT-Nb
	for submit <at> debbugs.gnu.org; Mon, 14 Mar 2022 13:34:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:54290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam@HIDDEN>) id 1nToaQ-0001zL-6P
 for submit <at> debbugs.gnu.org; Mon, 14 Mar 2022 13:34:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38508)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sam@HIDDEN>) id 1nToaQ-0005YC-02
 for bug-automake@HIDDEN; Mon, 14 Mar 2022 13:34:26 -0400
Received: from woodpecker.gentoo.org ([140.211.166.183]:53586
 helo=smtp.gentoo.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <sam@HIDDEN>) id 1nToaM-0007Ly-9Q
 for bug-automake@HIDDEN; Mon, 14 Mar 2022 13:34:24 -0400
From: Sam James <sam@HIDDEN>
Content-Type: multipart/signed;
 boundary="Apple-Mail=_514B1C6D-BA69-4A7A-91BB-D583CEEF1195";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\))
Subject: YACC rules don't check DESTDIR existence for VPATH builds
Message-Id: <5D3EB010-35AF-4D10-811E-981AA1EF45AB@HIDDEN>
Date: Mon, 14 Mar 2022 17:21:58 +0000
To: bug-automake@HIDDEN
X-Mailer: Apple Mail (2.3693.60.0.1.1)
Received-SPF: pass client-ip=140.211.166.183; envelope-from=sam@HIDDEN;
 helo=smtp.gentoo.org
X-Spam_score_int: -68
X-Spam_score: -6.9
X-Spam_bar: ------
X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--Apple-Mail=_514B1C6D-BA69-4A7A-91BB-D583CEEF1195
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

It appears that YACC rules don't check for whether the destination =
directory exists before executing ylwrap.

When trying to package libaacs =
(https://code.videolan.org/videolan/libaacs) with an out-of-source =
build, I hit an unexpected build failure:
```
=
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/src/file/ke=
ydbcfg-parser.y: warning: fix-its can be applied.  Rerun with option =
'--update'. [-Wother]
=
/var/tmp/portage/media-libs/libaacs-0.11.1/work/libaacs-0.11.1/build-aux/y=
lwrap: 206: cannot create ../src/file/keydbcfg-parser.c: Directory =
nonexistent
updating src/file/keydbcfg-parser.h
mv: cannot move 'tmp-keydbcfg-parser.h' to =
'../src/file/keydbcfg-parser.h': No such file or directory
make: *** [Makefile:1150: src/file/keydbcfg-parser.c] Error 2
```

I can workaround this by running `mkdir -p ${BUILD_DIR}/src/file` to =
ensure that the necessary directory exists within the build directory =
beforehand, but
it feels like I shouldn't have to.

Their Makefile.am can be found here: =
https://code.videolan.org/videolan/libaacs/-/blob/master/Makefile.am. =
Snippet:
```
libaacs_la_SOURCES=3D\
	src/libaacs/aacs.h \
[...]
	src/file/dirs.h \
	src/file/file.h \
	src/file/file.c \
	src/file/filesystem.h \
	src/file/filesystem.c \
	src/file/keydbcfg.c \
	src/file/keydbcfg.h \
	src/file/keydb.h \
	src/file/keydbcfg-parser.y \
	src/file/keydbcfg-lexer.l \
	src/file/mmc_device.h \
[...]
```

While src/libaacs exists within the build dir, src/file/ doesn't exist =
at all, hence the failure.

automake yacc rules should mkdir -p the needed directories within the =
build dir for VPATH builds before running ylwrap/yacc.

Best,
sam

--Apple-Mail=_514B1C6D-BA69-4A7A-91BB-D583CEEF1195
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEEYOpPv/uDUzOcqtTy9JIoEO6gSDsFAmIvebZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYw
RUE0RkJGRkI4MzUzMzM5Q0FBRDRGMkY0OTIyODEwRUVBMDQ4M0IACgkQ9JIoEO6g
SDt1lgf/XDwyu37lrATMDKyIRHPbTVEaaQpQ1983ltKWhtlCFUk5MQI1qkqdxXfe
NTHj1Vi3FSNYwJbGkEagn061arIP/W00O5nvIOfap5Q/Rfo94eKyDsxmpvVHPhmm
P1DGN7SqOOLuBWf+MP/hiTWYKyCZ8e5IdlW6XIU6tnkrsplETUn5uWhWX0AUybq/
jftbaxRwzTz71UxIbFLy+fffqJXy6x9egiIDDTEHTW5zVwLECly2W/HI/W+nxkIl
932L1A4KzVKA17FsLtUADmoVgladL8ubiqfOXz8vAzrnD08hyglVNPaZ/YUo8a6h
Tu9iqLuVgIRp37vL2nWFdFoeKx+9TA==
=MfX9
-----END PGP SIGNATURE-----

--Apple-Mail=_514B1C6D-BA69-4A7A-91BB-D583CEEF1195--




Acknowledgement sent to Sam James <sam@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#54390; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 13 Jan 2023 09:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.