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

Previous Next

Package: automake;

Reported by: Sam James <sam <at> gentoo.org>

Date: Mon, 14 Mar 2022 17:35:01 UTC

Severity: normal

Tags: notabug

Full log


View this message in rfc822 format

From: Sam James <sam <at> gentoo.org>
To: 54390 <at> debbugs.gnu.org
Subject: bug#54390: YACC rules don't check DESTDIR existence for VPATH builds
Date: Mon, 14 Mar 2022 17:21:58 +0000
[Message part 1 (text/plain, inline)]
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/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-aux/ylwrap: 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=\
	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
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 154 days ago.

Previous Next


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