[Bioperl-l] Module issue with cygwin-perl vs. Activestate Perl

Mark A. Jensen maj at fortinbras.us
Sat Aug 1 03:50:24 UTC 2009


Jonathan-

I have an utter kludge for this very problem, if I
understand it correctly. The kludge works for
me a majority of the time. Be warned that this
is in no way optimized or clever; there is no warranty
expressed or implied...

Two scripts are below; one runs the other. Together
they convert a makefile generated by ActiveState 
into one suitable for a cygwin make. When the 
cygwin make is run after conversion, the installation
occurs in the ActiveState locations. A demo session
follows (note that 'asperl' is an alias, defined as

 alias asperl=/cygdrive/c/Perl/bin/perl

)
cygwin session:

 $ wget http://search.cpan.org/CPAN/authors/id/N/NI/NI-S/Devel-Leak-0.03.tar.gz
 $ tar -xzf Devel-Leak-0.03.tar.gz
 $ cd Devel-Leak-0.03
 $ asperl Makefile.PL
 $ as2cyg.sh
 $ make
 $ make test
 $ make install

This is how I constantly install CPAN modules "by hand" 
into my ActiveState instance. I really hope this helps. 
The scripts are below.

cheers and good luck-
Mark

cygwin paths...note these are both in $PATH
/usr/local/bin/as2cyg.sh :

 #!/usr/bin/bash
 TF=$(uuidgen)
 conv-ASmake.sh Makefile > $TF
 mv $TF Makefile
 #end of as2cyg.sh

/usr/local/bin/conv-ASMake.sh : (note this is a sed script)

#!/usr/bin/sed -f
#converting an ActiveState PERL Makefile to run under cygwin make:
s/^DIRFILESEP = ^\\/DIRFILESEP = \//
s/^NOOP = rem/NOOP = :/
# -or- NOOP = echo -n
# byebye volume
s/C:/\/cygdrive\/c/
# sed to convert directory \ to /
s/\([\)0-9a-zA-Z.]\)\\\([\(0-9a-zA-Z]\)/\1\/\2/g
# convert full perl
s/\/usr\/bin\/perl/\/cygdrive\/c\/Perl\/bin\/perl/
# a key conversion for DOC_INSTALL action
/^DESTINSTALLVENDORHTMLDIR/ a\
DECYGDESTINSTALLARCHLIB = $(subst /cygdrive/c,c:,$(DESTINSTALLARCHLIB))

# --- MakeMaker tools_other section:
# let cygwin do native linux commands
/^MAKE/ c\
MAKE = make
/^CHMOD/ c\
CHMOD = chmod
/^CP/ c\
CP = cp
/^MV/ c\
#end of conv-ASMake.sh

----- Original Message ----- 
From: "Jonathan Cline" <jncline at gmail.com>
To: <bioperl-l at lists.open-bio.org>
Cc: <jcline at ieee.org>
Sent: Friday, July 31, 2009 11:24 PM
Subject: [Bioperl-l] Module issue with cygwin-perl vs. Activestate Perl


>I recently mentioned working on Bio::Robotics for Tecan.  Vendors
> being MS-Win specific, the vendor software allows third-party software
> communication through a named pipe (the literal filename is
> "\\\\.\\pipe\\gemini" where the multiple front slashes are MS specific
> and this pseudo-pipe is opened with sysopen() ).  This is broken under
> cygwin-perl due to cygwin's method of handling paths -- the sysopen
> fails.  However it works under ActiveState Perl and communication
> through the named pipe (to the robot hardware) is OK.  The standard
> workaround is usually to use cygwin bash, and force the PATH to use
> ActiveState perl.  (Typical MS Windows incompatibility problem.)  The
> issue is:  Perl module libraries for CPAN work under cygwin-perl
> (only?).  Attempts to run "activestate-perl Makefile.PL" for CPAN
> module use, or "make test", result in a bad list of incompatibility
> problems.  Yet ActiveState Perl is required for communicating to the
> vendor application (unless there is some workaround to raw filesystem
> access in cygwin-perl that I haven't found in 2 days of working this).
>  The stand-alone scripts I have work fine to access the named pipe
> (using ActiveState Perl) since the standalone scripts have no module
> INC dependencies, no CPAN module test harness, etc etc.
> 
> This isn't specifically a Bio:: issue, though if anyone has
> suggestions please email.  I could try msys and see if it handles the
> named-pipe-special-file better, if msys has an msys-perl distribution.
> 
> -- 
> ## Jonathan Cline
> ## jcline at ieee.org
> ## Mobile: +1-805-617-0223
> ########################
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
>



More information about the Bioperl-l mailing list