develooper Front page | perl.perl5.porters | Postings from January 2005

Re: [perl #33948] configure checking echo

From:
Stephen
Date:
January 28, 2005 08:08
Subject:
Re: [perl #33948] configure checking echo
Message ID:
BAY0-SMTP11AC1020441240A4C290F29C790@phx.gbl
Good point, if Configure excepts the existence of an echo file in /bin for
the first test, but looks explicitly for /bin/echo.exe for the second test,
Configure might be confusing itself by changing the criteria. I have a file
in /bin that calls the bash builtin echo. Configure seems to think that a
builtin version is possible for the second test, but if that where the only
version, Configure would not even get that far, because it looks for
/bin/echo in the first test. Anyway this is the contects of the text file
/bin/echo, if that helps to clarify things below. By the way isn't it
standard in Unix that an executable does not have to have an extention to
work, unlike in Windows?
#!/bin/sh

# Copyright (C) 2002, Earnie Boyd

# mailto:earnie@users.sf.net

# This file is part of MSYS

# http://www.mingw.org/msys.shtml

# File: echo

echo "$@"

Thanks, your thoughts are very interesting and point to a close familiarity
with Configure,
Stephen
P.S. The only consequence of this is that Configure prints /c in places 
where a blank return in intended. Not earth shaking, but unnecessary.
----- Original Message ----- 
From: "Andy Dougherty via RT" <perlbug-followup@perl.org>
To: <stecmccarthy@hotpop.com>
Sent: Friday, January 28, 2005 8:23 AM
Subject: Re: [perl #33948] configure checking echo


> On Thu, 27 Jan 2005, Stephen wrote:
>
>> # New Ticket Created by  "Stephen"
>> # Please include the string:  [perl #33948]
>> # in the subject line of all future correspondence about this issue.
>> # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=33948 >
>>
>>
>> The following message from Configure doesn't seem to make sense:
>>
>> Checking compatibility between /bin/echo.exe and builtin echo (if any)...
>> /home/Stephen/perl-5.8.6/Configure: /bin/echo.exe: No such file or
>> directory
>
> This is a sign that Configure's gotten confused even earlier.  Could you
> please re-run Configure and look near the beginning where it says
> something like
>
>    Locating common programs...
>    awk is in /usr/bin/awk.
>    cat is in /usr/bin/cat.
>    chmod is in /usr/bin/chmod.
>    comm is in /usr/bin/comm.
>    cp is in /usr/bin/cp.
>    echo is in /usr/bin/echo.
>    expr is in /usr/bin/expr.
>
> What does it say for echo?
>
> At this point, Configure thinks it has found a working 'echo' program;
> later on, it doesn't go back and recheck that assumption.  That's at the
> root
> of the later confusion.
>
>> They are not compatible!  You are probably running ksh on a non-USG
>> system.
>> I'll have to use /bin/echo.exe instead of the builtin, since Bourne shell
>> doesn't
>> have echo built in and we may have to run some Bourne shell scripts.
>> That
>> means I'll have to use '\c' to suppress newlines now.  Life is
>> ridiculous.
>>
>> Yes, it does seem ridiculous. My shell has a builtin echo, but I do not
>> have
>> a function echo in the bin. Hence, there is no compatibily problem
>> between
>> them. The logic breaks down when Configure decides to use echo.exe
>> because I
>> don't have echo.exe. I mean, Configure decides to use echo.exe instead of
>> the builtin echo even if the reason they are different and therefore
>> incompatible is that there is no echo.exe available. Configure should
>> check
>> to see they both exist before comparing them!
>
> It did try to check them; the 'Loc' script apparently got confused.
> I don't know why it mentions 'echo.exe' instead of a plain 'echo'.
>
>> I am using msys
>
> What is 'msys' ?  That might explain the '.exe' suffix.
>
>> I am using msys and there is a file echo in /bin that calls builtin echo,
>> perhaps this is confusing Configure.
>
> Yes, that's exactly it.  Configure is assuming that the file 'echo' in
> /bin
> is a working echo command.  Configure doesn't test it.  Again, there may
> confusion
> due to the 'exe' suffix.  I don't know why Configure is trying that.
>
>> perhaps this is confusing Configure. I will remove it... echo still
>> works, I
>> will try running Configure again.   That does not work. I want Configure
>> to
>> use the builtin echo, but it does not recognize it. It says:
>>
>> I don't know where 'echo' is, and my life depends on it.
>> Go find a public domain implementation or fix your PATH setting!
>
> Right.  Configure is now bailing out at the stage when it's looking for
> the /bin/echo executable.  Configure assumes an 'echo' executable is
> available, other than the built-in one.  That's in part because Configure
> was designed for Unix-like systems, and such systems have historically
> always had a /bin/echo command, though different systems have slightly
> differing versions.
>
> The problem is to figure out why Configure couldn't figure out how to
> use your /bin/echo command.  I'll need to know more about whatever
> 'msys' is and what, exactly, you had that fooled Configure into
> thinking there was a /bin/echo command.
>
> -- 
>    Andy Dougherty doughera@lafayette.edu
>
>




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About