Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2017 17:06:33 +0800
From:      Jov <amutu@amutu.com>
To:        blubee blubeeme <gurenchan@gmail.com>
Cc:        FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: [sed] command failure? Porting a project to FreeBSD
Message-ID:  <CADyrUxM65v=nwFgHd6zF1Qdo8hXnJC73EkS1wMFPrN7me=89yg@mail.gmail.com>
In-Reply-To: <CALM2mE=Xa6R2q5%2BxPn7D5ttrcn0KBYnBOSYiE-1bnaZZb3j4fA@mail.gmail.com>
References:  <CALM2mEkC3fS5AXY6pvk1xzmxrhK-PE4_eVBBAL0jqqFNKPjDKw@mail.gmail.com> <CADyrUxOH2hCv60TxwycJsNJ9yikkz3pYQYPiozdkw7i=j%2BSPRw@mail.gmail.com> <CALM2mE=Xa6R2q5%2BxPn7D5ttrcn0KBYnBOSYiE-1bnaZZb3j4fA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I don't think there is.
Man page of FreeBSD tool may have a section of STANDARDS and/or
COMPATIBILITY, but it does not list all the difference with GNU version.



2017-06-07 15:40 GMT+08:00 blubee blubeeme <gurenchan@gmail.com>:

> Ahhh, that was it. Doing a find and ask to replace all instances of sed
> with gsed passed that part.
>
> By the way, is knowledge like this written down somewhere centralized or
> is it just floating in the ether?
>
> Thank you,
> Owen
>
> On Wed, Jun 7, 2017, 14:26 Jov <amutu@amutu.com> wrote:
>
>> The default sed on FreeBSD is different from GNU sed,there is some limit
>> for bsd sed.You can try to patch the makefile to using gsed.
>>
>> 2017-06-07 14:10 GMT+08:00 blubee blubeeme <gurenchan@gmail.com>:
>>
>>> Hello
>>>
>>> I am trying to bring these updated print drivers to FreeBSD:
>>> https://github.com/utsushi/utsushi.git
>>>
>>>
>>> There's the automake scripts in there that's sorta helpful but I seem to
>>> have gotten stuck with something.
>>>
>>> I made sure that my environmental variables are set
>>> LDFLAGS -L/usr/local/lib
>>> CPPFLAGS -I/usr/local/include
>>>
>>> i run autoreconf -fmi
>>> that does it's thing and everything goes smoothly
>>>
>>> ./configure also seems to run just fine
>>>
>>> when I run make there's a problem; sed command just hangs, it's been
>>> there
>>> for hours now and no change.
>>>
>>> the line in the makefile looks like this:
>>> $(srcdir)/utsushi/tag.hpp $(srcdir)/lib/tag.cpp: $(srcdir)/lib/tag.xml \
>>>   $(srcdir)/lib/tag.xsl
>>> format=`echo $@ | sed 's|.*\.\([^.]*\)$$|\1|'`; \
>>> sed -n \
>>>    -e "/^<!--/s/\.xml ::/.$$format --/" \
>>>    -e '/^<!--/,/-->/{ /-->/d; s|^$$|//|p; s|^....|//|p; }' $< > $@; \
>>> xsltproc --stringparam format $$format $(srcdir)/lib/tag.xsl $< >> $@
>>> sed -i 's/SEC_N_("%1%")/"%1%"/' $@
>>>
>>> I am not the best with sed but I feel like there might be some issues; I
>>> am
>>> running tcsh shell, it could be it or that command is malformed.
>>>
>>> Trying to run the same make file with gmake, I get this output.
>>>
>>> format=`echo lib/tag.cpp | sed 's|.*\.\([^.]*\)$|\1|'`; \
>>> sed -n \
>>>     -e "/^<!--/s/\.xml ::/.$format --/" \
>>>     -e '/^<!--/,/-->/{ /-->/d; s|^$|//|p; s|^....|//|p; }' lib/tag.xml >
>>> lib/tag.cpp; \
>>> xsltproc --stringparam format $format ./lib/tag.xsl lib/tag.xml >>
>>> lib/tag.cpp
>>> sed -i 's/SEC_N_("%1%")/"%1%"/' lib/tag.cpp
>>> sed: 1: "lib/tag.cpp": extra characters at the end of l command
>>> gmake: *** [Makefile:1042: lib/tag.cpp] Error 1
>>>
>>> extra character at the end of | command. It's a bit unclear to me.
>>>
>>> There's a tags.xml and tags.xsl in the ./lib/ directory so it seems to
>>> be a
>>> sed issue.
>>>
>>> Any assistance would be appreciated.
>>>
>>> Best,
>>> Owen
>>>
>> _______________________________________________
>>> freebsd-current@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@
>>> freebsd.org"
>>>
>>
>>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADyrUxM65v=nwFgHd6zF1Qdo8hXnJC73EkS1wMFPrN7me=89yg>