readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
hi just tried to build/install readline-8.0-alpha and found the following glitch: 8< /bin/install: cannot create regular file '/opt/stow.d/versions/readline-8.0-alpha/usr/lib64/pkgconfig/readline.pc': No such file or directory make[1]: *** [Makefile:245: install-pc] Error 1 make[1]: Leaving directory '/home/balducci/tmp/install-us-d/readline-7.0.d/readline-8.0-alpha' >8 The reason seems to be the installdirs target in Makefile.in missing to create $(DESTDIR)$(pkgconfigdir). This fixes things for me: diff -c ./Makefile.in.CREATE_PKGCONFIGDIR ./Makefile.in *** ./Makefile.in.CREATE_PKGCONFIGDIR Thu May 24 17:23:06 2018 --- ./Makefile.in Thu May 24 17:23:06 2018 *** *** 260,266 installdirs: $(srcdir)/support/mkinstalldirs -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ ! $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc --- 260,266 installdirs: $(srcdir)/support/mkinstalldirs -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ ! $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) \ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc ciao gabriele
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
On 5/24/18 11:40 AM, gabriele balducci wrote: > hi > > just tried to build/install readline-8.0-alpha and found the following > glitch: Thanks for the report. I think a better fix is to not to attempt to install readline.pc if $(pkgconfigdir) is missing. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
On 05/24/2018 01:18 PM, Chet Ramey wrote: On 5/24/18 11:40 AM, gabriele balducci wrote: hi just tried to build/install readline-8.0-alpha and found the following glitch: Thanks for the report. I think a better fix is to not to attempt to install readline.pc if $(pkgconfigdir) is missing. Why not? If you are doing an install into DESTDIR for the purpose of bundling a pre-built binary for a distro, then $(pkgconfigdir) will be missing, because the ONLY things living in DESTDIR are what the package itself installs. When DESTDIR is empty, you're right that either $(pkgconfigdir) is likely to already exist, or that the user is not using pkg-config; but even that's a risky assumption (when bootstrapping a system, readline might be installed prior to pkg-config, and we shouldn't require the user to run 'make install' a second time just to install the pieces that weren't installed the first time). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
On 05/24/2018 01:29 PM, Eric Blake wrote: On 05/24/2018 01:18 PM, Chet Ramey wrote: On 5/24/18 11:40 AM, gabriele balducci wrote: hi just tried to build/install readline-8.0-alpha and found the following glitch: Thanks for the report. I think a better fix is to not to attempt to install readline.pc if $(pkgconfigdir) is missing. Why not? If you are doing an install into DESTDIR for the purpose of bundling a pre-built binary for a distro, then $(pkgconfigdir) will be missing, because the ONLY things living in DESTDIR are what the package itself installs. When DESTDIR is empty, you're right that either $(pkgconfigdir) is likely to already exist, or that the user is not using pkg-config; but even that's a risky assumption (when bootstrapping a system, readline might be installed prior to pkg-config, and we shouldn't require the user to run 'make install' a second time just to install the pieces that weren't installed the first time). Or, if you DO want to make it configurable as to whether to install the .pc file, then make it a './configure --enable-pkg-config' or some such flag at configure time, so the user can explicitly decide up front (with a sane default if they don't mention anything) whether 'make install' should attempt to install the .pc file, rather than making a magic decision based on whether a $(pkgconfigdir) directory already exists. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
On 5/24/18 2:29 PM, Eric Blake wrote: > On 05/24/2018 01:18 PM, Chet Ramey wrote: >> On 5/24/18 11:40 AM, gabriele balducci wrote: >>> hi >>> >>> just tried to build/install readline-8.0-alpha and found the following >>> glitch: >> >> Thanks for the report. I think a better fix is to not to attempt to >> install readline.pc if $(pkgconfigdir) is missing. > > Why not? If you are doing an install into DESTDIR for the purpose of > bundling a pre-built binary for a distro, then $(pkgconfigdir) will be > missing, because the ONLY things living in DESTDIR are what the package > itself installs. When DESTDIR is empty, you're right that either > $(pkgconfigdir) is likely to already exist, or that the user is not using > pkg-config; but even that's a risky assumption (when bootstrapping a > system, readline might be installed prior to pkg-config, and we shouldn't > require the user to run 'make install' a second time just to install the > pieces that weren't installed the first time). Good point about $(DESTDIR). I don't quite buy the bootstrapping argument. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
[BUG] assignments preceding 'read' persist past command in POSIX mode
In bash-20180511 and bash-20180518 snapshots and in bash 5.0.0-alpha, in POSIX mode, assignments preceding 'read' incorrectly persist past the command. 'read' is a regular builtin so they should not persist. $ ./bash -o posix -c 'v=ok; v=bug read x
Re: Variables can’t contain NUL
Chet Ramey wrote: On 5/21/18 8:37 AM, Greg Wooledge wrote: If you're looking for some deeper answer, like "Why did Stephen Bourne write it this way back in 1977?" then I would hazard a guess along the lines of "It is tightly coupled to the underlying C argument-passing interface which uses NUL-terminated strings." As well as the majority of the libc API, which depends on null-terminated strings. --- And so many bugs happen because of it. Maybe the C++ string class would would be more robust... Wouldn't have to be all at once, but getting it to compile under C++ as legacy C code might be a useful first step. Then specific features or areas could be targeted for rework or what's the buzzword these days... oh yeah... refactoring! ;-)
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
> >> Thanks for the report. I think a better fix is to not to attempt to > >> install readline.pc if $(pkgconfigdir) is missing. > > > > Why not? If you are doing an install into DESTDIR for the purpose of > > bundling a pre-built binary for a distro, then $(pkgconfigdir) will be > > missing, because the ONLY things living in DESTDIR are what the package > > itself installs. When DESTDIR is empty, you're right that either > > $(pkgconfigdir) is likely to already exist, or that the user is not using > > pkg-config; but even that's a risky assumption (when bootstrapping a > > system, readline might be installed prior to pkg-config, and we shouldn't > > require the user to run 'make install' a second time just to install the > > pieces that weren't installed the first time). > > Good point about $(DESTDIR). I don't quite buy the bootstrapping argument. Actually, I don't use DESTDIR, but my situation is equivalent: I use stow (https://www.gnu.org/software/stow/). Which means: I install every version of every package under a brand new directory tree (eg --prefix=/opt/stow.d/versions/readline-8.0-alpha/) and stow creates links from the package specific installation tree to "legacy" system directories (/usr/bin /usr/lib /usr/lib/pkgconfig etc.): so, also in my case the pkgconfig dir doesn't exist at install time, but I definitely want to create it and to install readline.pc -g