perl 5.26.1 does not build on Windows with MSVC100 #16269
Created by firstname.lastname@example.org
This is a bug report for perl from email@example.com,
This results in a crippled libpth in lib/Config.pm:
One would expect the absolute path to the Studio's lib folder:
With the crippled path you cannot build the module Compress:Raw:Zlib,
Please find attached a patchfile, that changes the CCLIBDIR variable in
Thanks and Regards
diff -Naur perl-5.26.1.orig/win32/Makefile perl-5.26.1/win32/Makefile --- perl-5.26.1.orig/win32/Makefile 2017-09-07 19:19:52.000000000 +0000 +++ perl-5.26.1/win32/Makefile 2017-11-22 12:06:52.248834100 +0000 @@ -458,7 +458,11 @@ CCLIBDIR = $(CCHOME)\lib\x86 ! ENDIF !ELSE +! IF "$(WIN64)" == "define" +CCLIBDIR = $(CCHOME)\lib\amd64 +! ELSE CCLIBDIR = $(CCHOME)\lib +! ENDIF !ENDIF ARCHDIR = ..\lib\$(ARCHNAME) diff -Naur perl-5.26.1.orig/win32/makefile.mk perl-5.26.1/win32/makefile.mk --- perl-5.26.1.orig/win32/makefile.mk 2017-09-07 19:19:52.000000000 +0000 +++ perl-5.26.1/win32/makefile.mk 2017-11-22 12:10:08.705532700 +0000 @@ -465,9 +465,13 @@ CCLIBDIR *= $(CCHOME)\lib\x86 .ENDIF .ELSE +.IF "$(WIN64)" == "define" +CCLIBDIR *= $(CCHOME)\lib\amd64 +.ELSE CCLIBDIR *= $(CCHOME)\lib .ENDIF .ENDIF +.ENDIF # Set DLL location for GCC compilers. .IF "$(CCTYPE)" == "GCC"
Thanks for the report.
I understand how this happens in 5.26.0 and earlier, but it should be mostly fixed in 5.26.1 (though not quite correctly).
The code in question was changed in commit https://perl5.git.perl.org/perl.git/commit/74102a88af and should produce a full path in libpth, albeit to lib, rather than lib\amd64.
Prior to that change you would just have got \lib if CCHOME was blank, which is was likely to be since it was set to MSVCDIR, which isn't set up by the vcvarsall.bat in VC++ 2010.
I will look to apply the patch later today to correct the missing amd64 subfolder, but it would be helpful if you could confirm that the problem of only getting \lib occurs in 5.26.0, not in 5.26.1, otherwise I'm confused what is going on.
On Mon, 27 Nov 2017 00:36:00 -0800, shay wrote:
win32/Makefile sets CCHOME to $(VCINSTALLDIR) in line 236, which is set by "vcvarsall.bat amd64" to this value: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
The problem is that appending just \lib to this points to the 32 bit liberaries like e.g. msvcrt.lib. We need to append \lib\amd64 if we want 64 bit.
On Mon, 27 Nov 2017 03:25:40 -0800, firstname.lastname@example.org wrote:
Thanks. I've now applied a modified version of patch in commit 6f669bf. (The makefile.mk changes weren't quite correct since GCC also has to be accounted for, and GNUmakefile also needed changing.)
Thank you for filing this report. You have helped make Perl better.
With the release yesterday of Perl 5.28.0, this and 185 other issues have been
Perl 5.28.0 may be downloaded via:
If you find that the problem persists, feel free to reopen this ticket.