25
loading...
This website collects cookies to deliver better user experience
perl
installed with perlbrew. Fortunately, it was easy to fix by going into the extension settings and setting an absolute path to the binary:>perl Makefile.PL
[...]
*** It seems you are running perl version 5.032001, likely the "official" or
*** "standard" version. While there is nothing wrong with doing that,
*** standard perl versions 5.022 and up are not supported by IO::AIO.
*** While this might be fatal, it might also be all right - if you run into
*** problems, you might want to downgrade your perl or switch to the
*** stability branch.
***
*** If everything works fine, you can ignore this message.
***
***
*** Stability canary mini-FAQ:
***
*** Do I need to do anything?
*** With luck, no. While some distributions are known to fail
*** already, most should probably work. This message is here
*** to alert you that your perl is not supported by IO::AIO,
*** and if things go wrong, you either need to downgrade, or
*** sidegrade to the stability variant of your perl version,
*** or simply live with the consequences.
***
[...]
*** Your platform is not standards compliant. To get this module working, you need to
*** download and install win32 pthread (http://sourceware.org/pthreads-win32/).
***
Generating a gmake-style Makefile
Writing Makefile for IO::AIO
Writing MYMETA.yml and MYMETA.json
perl
version 5.32.1 (but still a different binary than the perl
used by the CMD prompt):$ perl Makefile.PL
[...]
*** The stability canary says: (nothing, it was driven away by harsh weather)
***
*** It seems you are running perl version 5.032001, likely the "official" or
*** "standard" version. While there is nothing wrong with doing that,
*** standard perl versions 5.022 and up are not supported by IO::AIO.
*** While this might be fatal, it might also be all right - if you run into
*** problems, you might want to downgrade your perl or switch to the
*** stability branch.
***
*** If everything works fine, you can ignore this message.
***
[...]
Continue anyways? [y]
configure: loading site script /etc/config.site
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
[...]
checking for st_birthtimespec... yes
checking for st_gen... no
checking for statx... no
checking for accept4... yes
configure: creating ./config.status
config.status: creating config.h
Generating a Unix-style Makefile
Writing Makefile for IO::AIO
Writing MYMETA.yml and MYMETA.json
$ make
$ make test
[...]
t/03_errors.t ... 1/12 # Failed test 9 in t/03_errors.t at line 57
# t/03_errors.t line 57 is: ok (!$_[0]);
# Failed test 10 in t/03_errors.t at line 58
# t/03_errors.t line 58 is: ok ("\\test\\" eq readlink $some_link);
t/03_errors.t ... Failed 2/12 subtests
[...]
IO::AIO
, there were other issues with other modules also needed by Perl::LanguageServer
.readdir()
system call and since it is legal to create broken symlinks it does not need to copy the target of a relative symlink before the symlink itself is copied. CYGWIN
. Depending of the content of this environment variable, the creation of broken symlinks may fail, or the creation of non-broken symlinks may fail if developer mode (see discussion above) is not activated. The environment variable also regulates whether the symlink will be created as a shortcut file or as a native symlink. ln --symbolic <target> <destination>
command in Cygwin depends on the environment variable CYGWIN
which is used to configure many global settings for the Cygwin runtime system. It contains options separated by blank characters. The option that is important for the ln -s
command is called winsymlinks
. According to the Cygwin documentation, there are four cases for the winsymlinks
option to consider:winsymlinks
is not defined. (Note: this behavior differs from that of MSYS2, see below). This is called the default behavior for Cygwin.
a) If native symlinks are enabled (see discussion above), then this is equivalent to setting winsymlinks
to native
(e.g. CYGWIN=winsymlinks:native
), see 3) below.
b) If native symlinks are not enabled, this is equivalent to setting winsymlinks
to lnk
see 2) below.
winsymlinks
is empty (CYGWIN=winsymlinks
) or winsymlinks
is set to lnk
(e.g. CYGWIN=winsymlinks:lnk
)
Whether <target> exists or not, ln -s
creates as a Windows shortcut file.
winsymlinks:native
a) If native symlinks are enabled, and whether <target> exists or not, creates <destination> as a native Windows symlink. Note, this is most similar to the behavior of ln -s
on *nix.
b) If native symlinks are not enabled, it is equivalent to setting winsymlinks
to lnk
, see 2) above.
winsymlinks:nativestrict
a) If native symlinks are enabled and <target> exists, creates <destination> as a native Windows symlink,
b) else if native symlinks are not enabled or if <target> does not exist, ln -s
fails.
CYGWIN
environment variable, the MSYS
environment variable is used to configure global settings for the MSYS2 runtime system (since MSYS2 is based on Cygwin). The four cases for the winsymlinks
option to consider is:winsymlinks
is not defined. The default behavior for MSYS2. (Note: this is not similar to Cygwin)
a) If <target> exists, <target> is (surprise!!) copied to <destination>, so <destination> does not become a symlink but simply a copy of <target>, this happens whether <target> is a file or a directory, or whether native symlinks are enabled or not.
b) If <target> does not exist, ln -s
fails.
winsymlinks
or winsymlinks:lnk
: (Similar to Cygwin, see above)
winsymlinks:native
: (Similar to Cygwin, see above)
winsymlinks:nativestrict
: (Similar to Cygwin, see avove)
perl -MConfig -E'say $Config{d_symlink}'
define
(meaning the symlink
call is implemented), whereas in regular windows (CMD prompt and $^O eq "MSWin32"
) with e.g. strawberry perl, $Config{d_symlink}
is only defined for perl
versions >= 5.33.5, see perldelta.symlink
function "works" on MSYS2 and Cygwin, and for newer versions of MSWin32
. However, since the newest Strawberry perl release is currently at 5.32.1, I was not able to test how symlinks behave with MSWin32
. I will therefore in the following focus on Cygwin and MSYS2.SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock
.symlink $target, $dest;
$dest
exists, the symlink
command always fails (returning a value of 0 and setting $!
). So consider the case where $dest
does not exist: There are four cases for the winsymlinks
option contained in the MSYS
or CYGWIN
environment variable to consider, as was done above for the ln -s
command. It turns out that symlink
behaves identically to the ln -s
command, and when ln -s
fails, symlink
also fails and returns a value of 0 and sets $!
(ERRNO
).MSYS
or CYGWIN
cannot/should not be changed from within the Perl script itself. I am not sure why this does not work, but I tested it and it showed undefined behavior in my tests. So the variables should be set before perl
is run, e.g. on the command line:MSYS=winsymlinks:native perl p.pl
-l
operator ? Tests show that it does not differentiate between a Windows shortcut file and a native symlink file. Sosay "symlink" if -l "foobar";
CYGWIN
or MSYS
environment variable and this is also how the cp
command in MSYS2 (or Cygwin) cp -a source destination
CYGWIN
or MSYS2
environment variables. If the user does not set the environment variables, the default (meaning that the user did not set the CYGWIN
variable) behavior on Cygwin is such that it will never fail if the target of the symlink does not exist or if native symlinks are not enabled. However, the default behavior on MSYS2 is different. MSYS2 will by default not create a symlink when a symlink is apparently created by calling ln -s
. Instead it creates a copy of the target file. If the target file does not exist, ln -s
fails.Perl::LanguageServer
on MSYS2, but when VS Code tried to use it, it crashed. I believe it was due to the module IO::AIO
, but I have not looked further into the issue. I also discovered a new Perl module called PLS. This module is currently under active development and implements features like auto-completion. However, it currently does not implement the Debug Adapter Protocol so debugging is not available. This module also installed fine from my Windows CMD prompt (it uses IO::Async instead of IO::AIO
), but it does not run from VS Code when I tested it. From the discussion on reddit I guess this problem will hopefully be fixed soon.