delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/25/10:43:37

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 25 Feb 2010 10:43:18 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin build scripts in perl
Message-ID: <20100225154317.GA29140@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <643384 DOT 77126 DOT qm AT web88301 DOT mail DOT re4 DOT yahoo DOT com>
MIME-Version: 1.0
In-Reply-To: <643384.77126.qm@web88301.mail.re4.yahoo.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

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
>
>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.
>
>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
>===================================================================
>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=s'=>\@exclude, 'static!'=>\$static, 'v!'=>\$inverse,
>-	   'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
>+           'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
  ^^^^^^^^^^^^
gratuitous whitespace change
> 
> $_ = File::Spec->rel2abs($_) for @ARGV;
> 
>@@ -22,8 +22,11 @@
> (my $iname = basename $lib) =~ s/\.a$//o;
> $iname = '_' . $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 = join(" ", map("\"$_\"", @ARGV));
>+my $cmd_nm = "$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

- Raw text -


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