A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Perl/perl5/issues/20460 below:

readlink returns malformed path on Windows 11, perl 5.37.5 · Issue #20460 · Perl/perl5 · GitHub

I have built a debug version of perl 5.37.5 on Windows 11 using MinGW-w64 and gcc 11.3.0 from https://winlibs.com/ (using the MSVCRT runtime library), see #20395 for more information. When trying to install Path::Tiny using this perl I got some test failures, see dagolden/Path-Tiny#258 for more information. I reduced the problem down to this script:

use feature qw(say);
use strict;
use warnings;

my $fn = 'C:\Users\hakon\perl\debug\foo.txt';
open (my $fh, '>', $fn) or die "Could not open file '$fn': $!";
say $fh "Hello";
close $fh;
my $link = 'C:\Users\hakon\perl\debug\bar.txt';
if (-e $link) {
    unlink $link or die "Could not unlink '$link': $!";
}
symlink $fn, $link or die "Could not create symlink: $!";
my $path = readlink $link or die "Could not read symlink: $!";
say "link = $path";

The output is:

link = \??\C:\Users\hakon\perl\debug\foo.txt

Notice the leading \??\. Expected output would be:

link = C:\Users\hakon\perl\debug\foo.txt

Perl configuration

Summary of my perl5 (revision 5 version 37 subversion 5) configuration:
  Commit id: 382a56637961ef97fde5808e97df108db4e3ed8d
  Platform:
    osname=MSWin32
    osvers=10.0.22000.1098
    archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='gcc'
    ccflags =' -DWIN32 -DWIN64 -DDEBUGGING -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-g -O0'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='11.3.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-g -L"c:\perl-debug\lib\CORE" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\x86_64-w64-mingw32\lib" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib\gcc\x86_64-w64-mingw32\11.3.0"'
    libpth=C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib C:\Winlibs64-Gcc11.3-msvcrt\mingw64\x86_64-w64-mingw32\lib C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib\gcc\x86_64-w64-mingw32\11.3.0
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl537.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-shared -g -L"c:\perl-debug\lib\CORE" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\x86_64-w64-mingw32\lib" -L"C:\Winlibs64-Gcc11.3-msvcrt\mingw64\lib\gcc\x86_64-w64-mingw32\11.3.0"'


Characteristics of this binary (from libperl):
  Compile-time options:
    DEBUGGING
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_TRACK_MEMPOOL
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Built under MSWin32
  Compiled at Oct 23 2022 17:00:35
  @INC:
    C:/perl-debug/site/lib
    C:/perl-debug/lib


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4