New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use cpan/cpanm to build Perl modules #867

Open
jacoby opened this Issue Aug 11, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@jacoby

jacoby commented Aug 11, 2016

Please use the following bug reporting template to help produce actionable and reproducible issues:

  • A brief description

Perl devs often use cpan to build/install modules where no .deb exists or the .deb is much older than the current one. I tried to use cpanm to install YAML::XS, and it failed tests, specifically relating to newlines. I use Ubuntu 14.04 LTS and cpan, and can assert this passes there.

cpanm YAML::XS
  • Expected results

A working YAML::XS module.

  • Actual results (with terminal output if applicable)

log file in a gist linked below. Errors come at lines 146, 162 and 207. This package installs flawlessly on other systems, including Strawberry Perl on the same machine.

  • Your Windows build number

14393

  • Steps / commands required to reproduce the error

sudo apt-get install cpanm
sudo cpanm YAML::XS

  • Strace of the failing command
  • Required packages and commands to install

cpanm (A faster version of Perl's cpan command)

See our contributing instructions for assistance.

@jacoby

This comment has been minimized.

Show comment
Hide comment
@jacoby

jacoby Aug 11, 2016

Log exists as a Github Gist:
https://gist.github.com/jacoby/8499ca8e55ec973ae51e77e6994e452b

Errors are on lines 146, 162 and 207.

jacoby commented Aug 11, 2016

Log exists as a Github Gist:
https://gist.github.com/jacoby/8499ca8e55ec973ae51e77e6994e452b

Errors are on lines 146, 162 and 207.

@mbeijen

This comment has been minimized.

Show comment
Hide comment
@mbeijen

mbeijen Sep 25, 2016

Hi @jacoby
You can't install the module because File::Find can not recurse directories on the file system that is in use by Ubuntu on Windows.

The solution is to edit Config.pm:

sudo vi /usr/lib/perl/5.18.2/Config.pm

Set dont_use_nlink to 'define':

dont_use_nlink => 'define',

Now it's possible to install all modules you want!
(this is a duplicate of #186)

mbeijen commented Sep 25, 2016

Hi @jacoby
You can't install the module because File::Find can not recurse directories on the file system that is in use by Ubuntu on Windows.

The solution is to edit Config.pm:

sudo vi /usr/lib/perl/5.18.2/Config.pm

Set dont_use_nlink to 'define':

dont_use_nlink => 'define',

Now it's possible to install all modules you want!
(this is a duplicate of #186)

@wyoung

This comment has been minimized.

Show comment
Hide comment
@wyoung

wyoung Oct 5, 2016

For 16.04, the correct path to edit is /usr/lib/x86_64-linux-gnu/perl/5.22.1/Config.pm.

Given that this reflects a fundamental difference between Windows and "real" Ubuntu Linux, shouldn't WSL Perl ship with this patch already in place? I get that the project is trying to use upstream packages untouched, but does the WSL project really want to make all Perl users hand-hack their install to allow cpanm and such to work?

I wouldn't be asking if this weren't a long-term problem with a simple, known solution, which has just bitten me for the second time.

wyoung commented Oct 5, 2016

For 16.04, the correct path to edit is /usr/lib/x86_64-linux-gnu/perl/5.22.1/Config.pm.

Given that this reflects a fundamental difference between Windows and "real" Ubuntu Linux, shouldn't WSL Perl ship with this patch already in place? I get that the project is trying to use upstream packages untouched, but does the WSL project really want to make all Perl users hand-hack their install to allow cpanm and such to work?

I wouldn't be asking if this weren't a long-term problem with a simple, known solution, which has just bitten me for the second time.

@mbeijen

This comment has been minimized.

Show comment
Hide comment
@mbeijen

mbeijen Oct 5, 2016

I'd also very much like an 'upstream' patch from Ubuntu/Microsoft here!

mbeijen commented Oct 5, 2016

I'd also very much like an 'upstream' patch from Ubuntu/Microsoft here!

@yorickdowne

This comment has been minimized.

Show comment
Hide comment
@yorickdowne

yorickdowne Dec 5, 2016

See #910 and #186. Either WSL or perl will fix this, depending on where the fix should live. I thought File::Find, but after seeing 910 I'm no longer so sure.

yorickdowne commented Dec 5, 2016

See #910 and #186. Either WSL or perl will fix this, depending on where the fix should live. I thought File::Find, but after seeing 910 I'm no longer so sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment