git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* sed: command garbled: rGIT-PERL-HEADER
@ 2018-07-18 11:53 Jeffrey Walton
  2018-07-18 17:49 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Walton @ 2018-07-18 11:53 UTC (permalink / raw)
  To: Git List

I'm trying to build Git 2.18 on Solaris 11.3 x86_64.

$ gmake V=1
rm -f git-add--interactive git-add--interactive+ && \
sed -e '1{' \
    -e '        s|#!.*perl|#!/usr/bin/perl|' \
    -e '        rGIT-PERL-HEADER' \
    -e '        G' \
    -e '}' \
    -e 's/@@GIT_VERSION@@/2.18.0/g' \
    git-add--interactive.perl >git-add--interactive+ && \
chmod +x git-add--interactive+ && \
mv git-add--interactive+ git-add--interactive
sed: command garbled:   rGIT-PERL-HEADER
gmake: *** [git-add--interactive] Error 2

And:

$ perl --version

This is perl 5, version 12, subversion 5 (v5.12.5) built for i86pc-solaris-64int
(with 7 registered patches, see perl -V for more detail)

Any ideas how to fix it?

Thanks in advance.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sed: command garbled: rGIT-PERL-HEADER
  2018-07-18 11:53 sed: command garbled: rGIT-PERL-HEADER Jeffrey Walton
@ 2018-07-18 17:49 ` Junio C Hamano
  2018-07-18 18:47   ` Jeffrey Walton
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2018-07-18 17:49 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Git List

Jeffrey Walton <noloader@gmail.com> writes:

> I'm trying to build Git 2.18 on Solaris 11.3 x86_64.
>
> $ gmake V=1
> rm -f git-add--interactive git-add--interactive+ && \
> sed -e '1{' \
>     -e '        s|#!.*perl|#!/usr/bin/perl|' \
>     -e '        rGIT-PERL-HEADER' \
>     -e '        G' \
>     -e '}' \
>     -e 's/@@GIT_VERSION@@/2.18.0/g' \
>     git-add--interactive.perl >git-add--interactive+ && \
> chmod +x git-add--interactive+ && \
> mv git-add--interactive+ git-add--interactive
> sed: command garbled:   rGIT-PERL-HEADER
> gmake: *** [git-add--interactive] Error 2
>
> And:
>
> $ perl --version
>
> This is perl 5, version 12, subversion 5 (v5.12.5) built for i86pc-solaris-64int
> (with 7 registered patches, see perl -V for more detail)
>
> Any ideas how to fix it?

The fix is prepared to become part of the next feature release (and
also some maintenance release before that happens).  Please try the
attached patch.

Thanks.


-- >8 --

From: Alejandro R. Sedeño <asedeno@mit.edu>
Date: Mon, 25 Jun 2018 15:13:25 -0400
Subject: [PATCH] Makefile: tweak sed invocation

With GNU sed, the r command doesn't care if a space separates it and
the filename it reads from.

With SunOS sed, the space is required.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2ba24035f5..50138e85eb 100644
--- a/Makefile
+++ b/Makefile
@@ -2086,7 +2086,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1{' \
 	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
-	    -e '	rGIT-PERL-HEADER' \
+	    -e '	r GIT-PERL-HEADER' \
 	    -e '	G' \
 	    -e '}' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-- 
2.18.0-129-ge3331758f1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: sed: command garbled: rGIT-PERL-HEADER
  2018-07-18 17:49 ` Junio C Hamano
@ 2018-07-18 18:47   ` Jeffrey Walton
  2018-07-18 19:12     ` Jeffrey Walton
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Walton @ 2018-07-18 18:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git List

On Wed, Jul 18, 2018 at 1:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
> ...
> diff --git a/Makefile b/Makefile
> index 2ba24035f5..50138e85eb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2086,7 +2086,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
>         $(QUIET_GEN)$(RM) $@ $@+ && \
>         sed -e '1{' \
>             -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \
> -           -e '        rGIT-PERL-HEADER' \
> +           -e '        r GIT-PERL-HEADER' \
>             -e '        G' \
>             -e '}' \
>             -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \

Thanks, that tested good.

Here's another one for FreeBSD 11 x86_64. LDLIBS includes -pthread.

$ cat ~/git-freebsd.txt
    LINK git-credential-store
/usr/local/bin/ld: libgit.a(name-hash.o): undefined reference to
symbol 'pthread_create@@FBSD_1.0'
//lib/libthr.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:2329: git-credential-store] Error 1

Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sed: command garbled: rGIT-PERL-HEADER
  2018-07-18 18:47   ` Jeffrey Walton
@ 2018-07-18 19:12     ` Jeffrey Walton
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey Walton @ 2018-07-18 19:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git List

On Wed, Jul 18, 2018 at 2:47 PM, Jeffrey Walton <noloader@gmail.com> wrote:
> On Wed, Jul 18, 2018 at 1:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jeffrey Walton <noloader@gmail.com> writes:
>> ...
>> diff --git a/Makefile b/Makefile
>> index 2ba24035f5..50138e85eb 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -2086,7 +2086,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
>>         $(QUIET_GEN)$(RM) $@ $@+ && \
>>         sed -e '1{' \
>>             -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \
>> -           -e '        rGIT-PERL-HEADER' \
>> +           -e '        r GIT-PERL-HEADER' \
>>             -e '        G' \
>>             -e '}' \
>>             -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
>
> Thanks, that tested good.
>
> Here's another one for FreeBSD 11 x86_64. LDLIBS includes -pthread.
>
> $ cat ~/git-freebsd.txt
>     LINK git-credential-store
> /usr/local/bin/ld: libgit.a(name-hash.o): undefined reference to
> symbol 'pthread_create@@FBSD_1.0'
> //lib/libthr.so.3: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> gmake: *** [Makefile:2329: git-credential-store] Error 1

I was able to clear this one with sed (trailing space is important):

    sed -e 's|$(LIB_FILE) |$(LIB_FILE) -lpthread |g' "$file.orig"

But I don't know how to fix the missing recipe:

    $ gmake
    gmake: *** No rule to make target 'git-daemon', needed by 'all'.  Stop.

Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-18 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 11:53 sed: command garbled: rGIT-PERL-HEADER Jeffrey Walton
2018-07-18 17:49 ` Junio C Hamano
2018-07-18 18:47   ` Jeffrey Walton
2018-07-18 19:12     ` Jeffrey Walton

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).