I have one machine that runs Windows 10 with Bash on Ubuntu on Windows. It uses some kind of FUSE filesystem that has no proper hard link support.
Because of this, a typical perl compilation fails. If I want to compile, I need to do:
echo "dont_use_nlink='define'" >> Policy.sh
./Configure -des
make
make install
What I'd ideally want is to be able to use either perlbrew
or plenv
to manage my perls and pass the dont_use_nlink
parameter to any perl I build. Is there any way to do this?
Fortunately, it looks like the underlying issue in Win10 WSL is fixed, and will be (hopefully) released soon.
As MichielB pointed out, -A or -D seem like they should accomplish this, but it appears from some of my testing that perl's Configure doesn't honor -A
or -D
arguments when -de
is also passed (see "usage" in perl's metaconfig for the significance of those args). Despite clearly seeing properly formed -A and -D flags in the args list of the generated config.sh, the dont_use_nlink never gets added.
As it happens, perlbrew passes those as the defaults unless you use the special PERLBREW_CONFIGURE_FLAGS
environment variable.
However, there is a workaround. You can use PERLBREW_CONFIGURE_FLAGS
to use -f
to pass our own configuration file. We can use the mostly-correct config.sh generated by a failed "perlbrew install" run, then tweak it and pass it in.
Steps:
perlbrew install perl-5.24.0
cp /home/USERNAME/perl5/perlbrew/build/perl-5.24.0/config.sh ~/config_dont_use_nlink.sh
dont_use_nlink='define'
. If you're being tidy and filing it alphabetically, it'll go between dlsrc and doubleinfbytes:dlsrc='dl_dlopen.xs'
dont_use_nlink='define'
doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
PERLBREW_CONFIGURE_FLAGS="-de -f /home/USERNAME/config_dont_use_nlink.sh" perlbrew install perl-5.24.0
That compiles for me on a mostly-clean WSL on Win10 build 14393, and has nearly all tests pass (with the remainder looking like stuff with WSL bugs already filed).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With