public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: crossgcc@sourceware.org
Subject: Re: [PATCH] Added support for AC_ARG_WITH([grep]...) and sed substitution fixes
Date: Tue, 26 Aug 2014 22:43:00 -0000	[thread overview]
Message-ID: <53FD0D9B.8000809@physik.tu-berlin.de> (raw)
In-Reply-To: <20140826222611.GB3896@free.fr>

[-- Attachment #1: Type: text/plain, Size: 3748 bytes --]

Yann, All,

On 27/08/14 00:26, Yann E. MORIN wrote:
> Fabian, All,
> 
> On 2014-08-06 04:27 +0200, Fabian Freyer spake thusly:
>> Hi,
>>
>> On 26/09/12 18:56, Yann E. MORIN wrote:
>>> On Wednesday 26 September 2012 17:30:12 Blair Burtan wrote:
>>>> That was the problem but not quite the complete solution.  I had to modify
>>>> the grep path to point to the MacPorts verison when I built ct-ng.  I also
>>>> had to use ginstall instead of the OSX install.
>>>
>>> ./configure --help
>>> [--SNIP--]
>>> Optional Packages:
>>>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>>>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>>>   --with-install=PATH     Specify the full PATH to a BSD-compatible install
>>>   --with-sed=PATH         Specify the full PATH to GNU sed
>>>   --with-objcopy=PATH     Specify the full PATH to GNU objcopy
>>>   --with-objdump=PATH     Specify the full PATH to GNU objdump
>>>   --with-ranlib=PATH      Specify the full PATH to GNU ranlib
>>>   --with-readelf=PATH     Specify the full PATH to GNU readelf
>>>   --with-bash=PATH        Specify the full PATH to GNU bash >= 3.1
>>>   --with-awk=PATH         Specify the full PATH to GNU awk
>>>   --with-make=PATH        Specify the full PATH to GNU make >= 3.80
>>>   --with-libtool=PATH     Specify the full PATH to GNU libtool >= 1.5.26
>>>   --with-libtoolize=PATH  Specify the full PATH to GNU libtoolize >= 1.5.26
>>>   --with-automake=PATH    Specify the full PATH to GNU automake >= 1.10
>>> [--SNIP--]
>>>
>>> That's how you tell crosstool-NG what tools to use if the default ones are
>>> not the GNU ones.
>>
>> While it is possible to tell crosstool-NG to use custom GNU tools for several
>> tools, it is not possible for all tools, especially for grep and sed. This 
>> causes ct-ng build to fail:
>>
>>   [ERROR]  >>
>>   [ERROR]  >>  Build failed in step '(top-level)'
>>   [ERROR]  >>
>>   [ERROR]  >>  Error happened in: CT_DoForceRmdir[scripts/functions@458]
>>   [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@238]
>>   [ERROR]  >>
>>
>> One of the problems here is also that on BSD installs, including OS X, GNU
>> tools are often installed with a prefixed 'g', in this case "ggrep" and "gsed".
>> There is no way to tell crosstool-NG to use ggrep instead of grep, and
>> adjusting $PATH does not help either.
>>
>> I have created a small (not counting the changes due to the scripts/functions
>> rename) patch that adds --with-grep and substitues @@CT_sed@@ for sed in a few
>> places where sed from PATH is used and GNU-specific options are used.
> 
> The solution is not to pre-process 'functions.in' into 'functions', but
> to add the new tools to the generated paths.mk and paths.sh, and then to
> use ${sed} and ${grep} where needed.
> 
> Note that 'sed' is already present in those files, so only grep needs to
> be added.
> 
> Is there a name which GNU grep is known as on BSD systems? For example,
> we have gsed. Do we have ggrep, too?

Yes, gnu tools are usually prefixed with a g, so it would be called ggrep.

> 
> In which case, we'd need four patches:
>   - use ${sed} instead of plain 'sed' where appropriate
>   - add --with-grep to the list of tools we can specify
>   - add an alternate name for when searching for grep
>   - use ${grep} instead of plain 'grep' where appropriate
> 
> I'll tackle this here.

I would also offer to do this, since I have a testing environment ready. Also, I have already adressed some of these changes in my patch, so it wouldn't be too much work to alter them.

> 
> Sorry for the delay, and thanks for the report.
> 
> Regards,
> Yann E. MORIN.

Regards,
Fabian Freyer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 882 bytes --]

  reply	other threads:[~2014-08-26 22:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26  3:46 Build failed in step 'Dumping user-supplied crosstool-NG configuration' Blair Burtan
2012-09-26  6:54 ` Per Arnold Blaasmo
2012-09-26 15:30   ` Blair Burtan
2012-09-26 16:56     ` Yann E. MORIN
2014-08-06  2:27       ` [PATCH] Added support for AC_ARG_WITH([grep]...) and sed substitution fixes Fabian Freyer
2014-08-06  2:40         ` Fabian Freyer
2014-08-26 22:26         ` Yann E. MORIN
2014-08-26 22:43           ` Fabian Freyer [this message]
2014-08-26 22:47             ` Yann E. MORIN
2014-08-26 22:51         ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FD0D9B.8000809@physik.tu-berlin.de \
    --to=fabian.freyer@physik.tu-berlin.de \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).