This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
>
>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]