bug#39999: make install fails on mac (Catilina, Guile-3.0.1)

Massimiliano Gubinelli <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Hi Ludovic, 
 the problem seems to be the multiple -e together with -i. 

Example:

Horst:clean mgubi$ cat - > test
pippo
Horst:clean mgubi$ sed -i -e 's,pippo,pluto,g' -e 's,pippo,pluto,g' -e 's,pippo,pluto,g'  test
sed: -e: No such file or directory
Horst:clean mgubi$ sed  -e 's,pippo,pluto,g' -e 's,pippo,pluto,g' -e 's,pippo,pluto,g'  test
pluto
Horst:clean mgubi$ sed -i -e 's,pippo,pluto,g'  test
Horst:clean mgubi$ 

The first command give error while the other work. If I put -i at the end I get

Horst:clean mgubi$ sed  -e 's,pippo,pluto,g' -e 's,pippo,pluto,g' -e 's,pippo,pluto,g'  -i test
sed: -i may not be used with stdin

Is ok to do

Horst:clean mgubi$ sed  -e 's,pippo,pluto,g' -e 's,pippo,pluto,g' -e 's,pippo,pluto,g'  -i ‘' test


Best,
Max



> On 11. Mar 2020, at 12:11, Ludovic Courtès <[email protected]> wrote:
> 
> Hi,
> 
> Massimiliano Gubinelli <[email protected]> skribis:
> 
>> make install on the last Guile 3.0.1 fails on my Mac (Catilina) with the following message
>> 
>> 
>> ../build-aux/install-sh -c -d '/Users/mgubi/t/guile3-usr/include/guile/3.0/libguile'
>> /usr/bin/install -c -m 644 version.h scmconfig.h '/Users/mgubi/t/guile3-usr/include/guile/3.0/libguile'
>> /Library/Developer/CommandLineTools/usr/bin/make  install-data-hook
>> /usr/bin/install -c -m 644 libguile-3.0-gdb.scm				/Users/mgubi/t/guile3-usr/lib/libguile-3.0.a-gdb.scm
>> sed: -e: No such file or directory
>> make[5]: *** [install-data-hook] Error 1
>> make[4]: *** [install-data-am] Error 2
>> make[3]: *** [install-am] Error 2
>> make[2]: *** [install] Error 2
>> make[1]: *** [install-recursive] Error 1
>> make: *** [install] Error 2
> 
> I suppose the ‘sed’ invocation in the INSTANTIATE variable in Makefile
> assumes we’re using GNU sed, which is probably not the case on your
> machine.
> 
>> I found that the following change to libguile/Makefile go around the problem
>> 
>> INSTANTIATE = \
>>  $(SED) -i '' -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'                          \
>>            -e 's,[@]pkglibdir[@],$(pkglibdir),g'                               \
>>            -e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g’
> 
> What if you move ‘-i’ last, and without ''?  That should expand to
> something like:
> 
>  sed -e … -e … -e … -i libguile-3.0-gdb.scm
> 
> Thanks,
> Ludo’.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.