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 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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