The following commit broke compatibility with BSD/macOS's version of sed:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=81d2e352663bc5f80734312fec90f250b1fbe2e4

The error is "sed: -i may not be used with stdin" as described in https://stackoverflow.com/questions/21242932/sed-i-may-not-be-used-with-stdin-on-mac-os-x

As a workaround I can replace the "         -i" in INSTANTIATE in libguile/Makefile.am with "         -i ''"

The incompatibility still exists in guile master as of http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=libguile/Makefile.am;h=a9646d88319c50853388268416f4d0773162969e;hb=HEAD#l476

Ref: https://github.com/Homebrew/homebrew-core/pull/21635