Re: [sed] command failure? Porting a project to FreeBSD

2017-06-07 Thread Henry Vogt
Am 07.06.17 um 11:06 schrieb Jov:
> 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.
Greg Leheys 'Porting Unix Software' published by O'Reilly and later re-released 
under Creative Commons, exists for 20 years.
Some bits may be outdated, but still useful.

Best
Henry

-- 
Henry Vogt 

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [sed] command failure? Porting a project to FreeBSD

2017-06-07 Thread Jov
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 :

> 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  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 :
>>
>>> 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 "/^/{ /-->/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 "/^/{ /-->/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"
>>>
>>
>>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [sed] command failure? Porting a project to FreeBSD

2017-06-07 Thread Willem Jan Withagen
On 07/06/2017 09:40, blubee blubeeme wrote:
> 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?

>From my experience of porting Ceph
(And I agree with HPS, that if it looks a like, it does not have to be
the same.)

Most of these thing you have to find out on your own. But that is also
the fun of porting: issue arise from the strangest of corners.
Regular expression are among the most notorious, some of the Linux tools
also use Perl REs. Something the basic FreeeBSD will not do, since it
requires pulling Perl into base.

So for most of the tools, there is also a GNU equivalent, so that is
usually the first thing to look at.

Even more tricky are the tools you can install, but hat the same name as
their base counterpart. Like getopt, where the packaged one understands
a completely different set of options.
Not sure if you will be running into bash, but that ends up in
/usr/local/bin, whilest just about every script expects /bin/sh to be bash.

Even things like /usr/bin/env do not work the same way, and or have the
same parameters. So even there it does not always help.

--WjW

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [sed] command failure? Porting a project to FreeBSD

2017-06-07 Thread blubee blubeeme
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  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 :
>
>> 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 "/^/{ /-->/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 "/^/{ /-->/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-unsubscr...@freebsd.org
>> "
>>
>
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [sed] command failure? Porting a project to FreeBSD

2017-06-06 Thread Jov
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 :

> 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 "/^/{ /-->/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 "/^/{ /-->/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-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


[sed] command failure? Porting a project to FreeBSD

2017-06-06 Thread blubee blubeeme
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 "/^/{ /-->/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 "/^/{ /-->/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-unsubscr...@freebsd.org"