Skip to content
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

gmake install: Windows 11, gcc 12: Use of uninitialized value $str in substitution (s///) at ..\lib/Pod/Simple/XHTML.pm line 75. #20394

Closed
hakonhagland opened this issue Oct 13, 2022 · 2 comments

Comments

@hakonhagland
Copy link
Contributor

I am trying to install perl from blead on Windows 11 using MinGW-w64 and gcc 12.2 from https://winlibs.com/ (using the MSVCRT runtime library) following a similar approach as in #20096. See also #20391.

After downloading WinLibs to C:\Winlibs64-Gcc12-msvcrt, I needed to rename gnu make binary to gmake.exe:

> copy C:\Winlibs64-Gcc12-msvcrt\mingw64\bin\mingw32-make.exe C:\Winlibs64-Gcc12-msvcrt\mingw64\bin\gmake.exe

This is gcc version 12.2.0, and gnu make version 4.3:

# make sure core.autocrlf in the git config is not set to true before checkout below:
c:\PerlWinLib> git clone https://github.com/Perl/perl5.git  
[...]

c:\PerlWinLib>cd perl5\win32

c:\PerlWinLib\perl5\win32>where gcc
C:\Winlibs64-Gcc12-msvcrt\mingw64\bin\gcc.exe

c:\PerlWinLib\perl5\win32>gcc --version
gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\PerlWinLib\perl5\win32>where gmake
C:\Winlibs64-Gcc12-msvcrt\mingw64\bin\gmake.exe

c:\PerlWinLib\perl5\win32>gmake --version
GNU Make 4.3
Built for x86_64-w64-mingw32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

To build perl I needed to set the environment variable CCHOME:

c:\PerlWinLib\perl5\win32>set CCHOME=C:\Winlibs64-Gcc12-msvcrt\mingw64

Now, I was able to build perl and test perl

c:\PerlWinLib\perl5\win32>powershell "gmake 2>&1 | tee gmake.log"
c:\PerlWinLib\perl5\win32>powershell "gmake test 2>&1 | tee gmake-test.log"

The build log file is here: gmake.log, and the test log is here: gmake-test.log

Now, I tried to install perl:

c:\PerlWinLib\perl5\win32>powershell "gmake install 2>&1 | tee gmake-install.log"

which gave the following warning (see line 2108 in the log file):

[...]

..\perl.exe -I..\lib ..\installhtml --podroot=.. --htmldir=.\html \
    --podpath=pod:lib:utils --htmlroot="file://c|\perl\html"\
    --recurse
..\installhtml: Warning both '../lib/ExtUtils/ParseXS.pod' and '../lib/ExtUtils/ParseXS.pm' exist, using pod
Use of uninitialized value $str in substitution (s///) at ..\lib/Pod/Simple/XHTML.pm line 75.
[...]

I guess the first warning that both '../lib/ExtUtils/ParseXS.pod' and '../lib/ExtUtils/ParseXS.pm' exist, is harmless, but the second warning: Use of uninitialized value $str in substitution (s///) at ..\lib/Pod/Simple/XHTML.pm line 75 might deserve some further investigation?

@sisyphus
Copy link
Contributor

I think that warning has been around for a long time. (It happens on my builds, but I no longer take any notice of it.)
AFAIK, it doesn't indicate that there's something broken or in need of fixing.
It should be investigated and silenced, IMO - the same goes for the other warning.

Cheers,
Rob

@jkeenan
Copy link
Contributor

jkeenan commented Oct 18, 2022

[snip]
..\perl.exe -I..\lib ..\installhtml --podroot=.. --htmldir=.\html
--podpath=pod:lib:utils --htmlroot="file://c|\perl\html"
--recurse
..\installhtml: Warning both '../lib/ExtUtils/ParseXS.pod' and '../lib/ExtUtils/ParseXS.pm' exist, using pod
Use of uninitialized value $str in substitution (s///) at ..\lib/Pod/Simple/XHTML.pm line 75.
[...]


I guess the first warning that `both '../lib/ExtUtils/ParseXS.pod' and '../lib/ExtUtils/ParseXS.pm' exist`, is harmless, but the second warning: `Use of uninitialized value $str in substitution (s///) at ..\lib/Pod/Simple/XHTML.pm line 75` might deserve some further investigation?

This is a bug in Pod::Simple::XHTML which is maintained upstream on CPAN. I have already reported this bug upstream; see perl-pod/pod-simple#135.

@jkeenan jkeenan closed this as completed Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants