GNU bug report logs - #31998
Guile 2.2.3 fails to install with BSD sed

Previous Next

Package: guile;

Reported by: Ryan Schmidt <ryandesign <at> macports.org>

Date: Thu, 28 Jun 2018 20:27:02 UTC

Severity: normal

To reply to this bug, email your comments to 31998 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#31998; Package guile. (Thu, 28 Jun 2018 20:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ryan Schmidt <ryandesign <at> macports.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 28 Jun 2018 20:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ryan Schmidt <ryandesign <at> macports.org>
To: bug-guile <at> gnu.org
Subject: Guile 2.2.3 fails to install with BSD sed
Date: Thu, 28 Jun 2018 15:14:56 -0500
Guile 2.2.3 fails to install when BSD sed was found by the configure script. It works fine if GNU sed was found.

The error we see is:

sed: -i may not be used with stdin

This problem was reported to MacPorts here:

https://trac.macports.org/ticket/56748

The problem was introduced in this commit:

This problem was introduced in http://git.savannah.gnu.org/cgit/guile.git/commit/libguile/Makefile.am?id=81d2e352663bc5f80734312fec90f250b1fbe2e4

The problem is happening in libguile/Makefile.am which says:

INSTANTIATE =                                                                   \
  $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'                                \
         -e 's,[@]pkglibdir[@],$(pkglibdir),g'                                  \
         -e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g'      \
         -i

This usage of the -i flag (without an argument) is only compatible with GNU sed. BSD sed requires an argument.

Unfortunately I don't know of a way to specify that there should be no backup file made that is compatible with both GNU and BSD sed. BSD sed requires a space between the flag and the argument if the argument is the empty string, like this: "-i ''"; "-i" and "-i''" are considered errors. Conversely, GNU sed requires "-i" or "-i''"; "-i ''" is an error. The only solution I know of is to specify a nonempty backup file suffix, which will cause a backup file to be created, e.g. "-i.bak".

If you want to be truly portable, I'm told you have to avoid the -i flag entirely, because it's not in POSIX.





This bug report was last modified 6 years and 351 days ago.

Previous Next


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