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:
- Run a perlbrew install that will fail, eg:
perlbrew install perl-5.24.0
- Copy the generated config.sh file somewhere for modification and reuse:
cp /home/USERNAME/perl5/perlbrew/build/perl-5.24.0/config.sh ~/config_dont_use_nlink.sh
- Edit the file to and insert
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'
- Run perlbrew install, but set an environment variable that will cause "-f" to be passed through to the new perl's Configure script:
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).