Does perlbrew work with cygwin?
Asked Answered
D

3

7

Searching the web, I have found almost no evidence that perlbrew works on cygwin. The specifics of my current issue are:

With the latest install of cygwin (which includes perl 5.14.2), I'm trying to install perl-5.14.2 using the latest perlbrew, installed from the web (not CPAN). I get a hang just after ../dist/threads-shared/t/shared_attr.t...ok is printed to build.log. This is on WinXP Pro 2002 SP3. Previous tries at using perlbrew on other builds of cygwin (which include perl 5.10.1) have also failed, but in other places.

I have posted a comment on Reini Urban's blog on blogs.perl.org and an issue/bug on github for App-perlbrew, but with no responses yet.

Is there any hope that I can get perl to build on cygwin? If not, what can I do to work around it and still use perlbrew (to unify my environments so that my cygwin environment uses perlbrew, just like my linux environment does)?

Domesticate answered 23/8, 2012 at 15:9 Comment(1)
Several years later, it works fine for me. However, some CPAN modules have tests fail, so I have to install them with cpanm --force.Touchwood
G
2

perlbrew works and perl can be built on Cygwin, with the minor annoyance that some of the unit tests hang (as you have discovered). Keep one eye on the build process output and kill the tests (usually thread related) that don't do anything for a couple of minutes using ps and kill. perlbrew should (knock on wood) run make install even if a handful of tests did not pass.

Girhiny answered 23/8, 2012 at 15:26 Comment(2)
Actually, I tried killing the hung process using kill and kill -9, but neither actually killed it. I ended up killing the parent, which killed the build process altogether. I can try again. I don't know why killing didn't kill it. I can also use process explorer to try to kill it rather than the native (cygwin) kill.exe.Domesticate
Made it past the original error, but failed the build anyway (too many failing tests). Maybe Reini just packages the failed build anyway when he distributes the binary perl for cygwin?Domesticate
T
1

I never got perlbrew run under cygwin. But as a workaround perhaps try plenv. When I last tried it, it worked out of the box under cygwin.

Titbit answered 29/4, 2013 at 17:49 Comment(0)
T
0

A 2018 update - perlbrew works fine for me on Cygwin. However, perlbrew-installed perls will not have the patches that a system Perl has. I have a sample repo at https://github.com/cxw42/perlbrew-on-cygwin showing how I built the latest Cygwin system perl and installed it as a perlbrew perl.

In short, building Perl with prefix, site prefix, and vendor prefix set to ~/perl5/perlbrew/perls/perl-<version> will generate a Perl tree. You can drop that Perl tree into ~/perl5/perlbrew/perls/, and perlbrew will pick it up as an available Perl.

Touchwood answered 23/11, 2018 at 0:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.