delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/27/20:11:19

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM
X-Spam-Check-By: sourceware.org
From: "DEWI - N. Zacharias" <N DOT Zacharias AT dewi DOT de>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Fri, 26 Feb 2010 10:04:22 +0100
Subject: AW: [bulk] - Re: Cygwin build scripts in perl
Message-ID: <8CCC8F85C5F2784387A32FAD835FB4E602DA8EE672@server03>
References: <643384 DOT 77126 DOT qm AT web88301 DOT mail DOT re4 DOT yahoo DOT com> <20100225154317 DOT GA29140 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20100225154317.GA29140@ednor.casa.cgf.cx>
MIME-Version: 1.0
X-CheckCompat: OK
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello all,


> Von: Christopher Faylor [mailto:cgf-use-the-mailinglist-please AT cygwin DOT com]
> Gesendet: Donnerstag, 25. Februar 2010 16:43
> An: cygwin AT cygwin DOT com
> Betreff: [bulk] - Re: Cygwin build scripts in perl
>
> On Tue, Feb 23, 2010 at 03:30:05PM -0800, Ilguiz Latypov wrote:
> >(a) I found that winsup/cygwin/mkimport specified non-existent file
> >names as arguments to objcopy invocations.  I am not sure why this did
> >not cause build breaks earlier.
> >
> >(b) It appears perl 5.6 and, possibly, perl 5.10 do not implement the
> >"list form of pipe" in calls to "open()",
> >
> >open $my_fd, '-|', $cmd, $arg1, $arg2

Try

use IO::File;

my $dosomething =3D"ls -al $what";
my $in =3D IO::File->new("$dosomething |");

while(my $line=3D$in->getline)
{
        Do what you need to do
}

For additional infos on this issue just use your favored search engine with
Keywords Perl pipe open

For me this stuff works fine and without problems under Cygwin.


> >I got around that by using regular pipes.
> >
> >(c) The Windows native build of perl wrapped into a cygpath-translating
> >script /usr/bin/perl will require protection of drive letters when
> >using a regex in speclib.  I believe this change may still work with
> >Cygwin builds of perl.

With the cygwin port you can use Cygwin:: win_to_posix_path to make
live easier

More info for perl and cygwin :

http://search.cpan.org/~shay/perl/README.cygwin


A nice weekend to everbody
Norbert

> >I am not aware of the purpose of the two scripts that I modified, but
> >the fixes made my build succeed.
>
> It isn't clear from your email what you are attempting to accomplish but
> it sounds like you are trying to build cygwin using a non-cygwin-aware
> version of perl.  If that is the case, then this is not of interest to
> the project or this mailing list.
>
> In the patch below many of the changes are either inexplicable or just
> whitespace so I haven't spent much time trying to figure out if there
> is a bug fix in there.  I suspect that, since many people are building
> the Cygwin DLL, there can't be much of a problem.
>
>
> cgf
>
> >Index: speclib
> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =3D=3D=3D=3D
> >RCS file: /cvs/src/src/winsup/cygwin/speclib,v
> >retrieving revision 1.24
> >diff -d -u -r1.24 speclib
> >--- speclib  30 Nov 2009 15:40:23 -0000      1.24
> >+++ speclib  23 Feb 2010 23:18:37 -0000
> >@@ -13,7 +13,7 @@
> >
> > my ($ar, $as, $nm, $objcopy);
> > GetOptions('exclude=3Ds'=3D>\@exclude, 'static!'=3D>\$static, 'v!'=3D>\=
$inverse,
> >-       'ar=3Ds'=3D>\$ar, 'as=3Ds'=3D>\$as,'nm=3Ds'=3D>\$nm, 'objcopy=3D=
s'=3D>\$objcopy);
> >+           'ar=3Ds'=3D>\$ar, 'as=3Ds'=3D>\$as,'nm=3Ds'=3D>\$nm, 'objcop=
y=3Ds'=3D>\$objcopy);
>   ^^^^^^^^^^^^
> gratuitous whitespace change
> >
> > $_ =3D File::Spec->rel2abs($_) for @ARGV;
> >
> >@@ -22,8 +22,11 @@
> > (my $iname =3D basename $lib) =3D~ s/\.a$//o;
> > $iname =3D '_' . $iname . '_dll_iname';
> >
> >-open my $nm_fd, '-|', $nm, '-Apg', '--defined-only', @ARGV, $libdll or
> >-  die "$0: execution of $nm for object files failed - $!\n";
> >+my $qargs =3D join(" ", map("\"$_\"", @ARGV));
> >+my $cmd_nm =3D "$nm -Apg --defined-only $qargs \"$libdll\"";
> >+print "Reading from $cmd_nm ...\n";
> >+open my $nm_fd, "$cmd_nm |" or
> >+  die "E: $0: $cmd_nm:\n$!\n";
>          ^^
> inexplicable prepending of "E:" to an error message.
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--------------------------------------------------------------------------
Dipl. Phys.
Norbert Zacharias
Wind Measurements & Power Curve Measurements
DEWI GmbH
Ebertstrasse 96
26382 Wilhelmshaven
Germany


Tel.:   +49 4421 4808 876

Fax:    +49 4421 4808 843


Email:  N DOT Zacharias AT dewi DOT de
Home:   http://http://www.dewi.de

DEWI GmbH - Deutsches Windenergie-Institut, Wilhelmshaven
Commercial Register No.: Amtsgericht Oldenburg, HRB 130241
Managing Director: Jens Peter Molly
Chairman of the supervisory board: Ministerialrat Dr. Niels K=E4mpny

P Please consider the environment before printing this email.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019