Skip Menu |
Report information
Id: 132484
Status: pending release
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: marc-philip [at] die-werners.de
Cc:
AdminCc:

Operating System: Win32
PatchStatus: HasPatch
Severity: High
Type: core
Perl Version: 5.26.1
Fixed In: (no value)



Subject: perl 5.26.1 does not build on Windows with MSVC100
Date: Wed, 22 Nov 2017 13:51:57 +0100
From: marc-philip [...] die-werners.de
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 6.5k
This is a bug report for perl from marc-philip@die-werners.de, generated with the help of perlbug 1.40 running under perl 5.26.1. ----------------------------------------------------------------- The documented procedure to build perl 5.26.1 from source on Windows 64bit with Visual Studio 2010 is this: 1. extract source tarball 2. edit win32/Makefile and set CCTYPE=MSVC100 3. open a development shell with correct environment (run "vcvarsall.bat amd64" of VS 2010) 4. cwd in this shell to win32 folder 5. run nmake This results in a crippled libpth in lib/Config.pm: C:\SAPDevelop\hmexternals\perl\gen\out\build-64de87d5\perl-5.26.1>perl -V|grep libpth libpth="\lib" One would expect the absolute path to the Studio's lib folder: C:\SAPDevelop\hmexternals\perl\gen\out\build-64de87d5\perl-5.26.1>perl -V|grep libpth libpth="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\lib\amd64" With the crippled path you cannot build the module Compress:Raw:Zlib, that comes with the perl, against a prebuilt zlib. For the error that occurs, please see here: http://www.perlmonks.org/?node_id=1203895 Please find attached a patchfile, that changes the CCLIBDIR variable in win32/Makefile and win32/makefile.mk. Please note that I'm running perlbug with a perl that I've built with the patch applied, therefore the libpth that you find below is not crippled. Thanks and Regards Marc-Philip [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=high --- Site configuration information for perl 5.26.1: Configured by d026948 at Wed Nov 22 11:25:13 2017. Summary of my perl5 (revision 5 version 26 subversion 1) configuration: Platform: osname=MSWin32 osvers=6.3 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 bincompat5005=undef Compiler: cc='cl' ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS' optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise' cppflags='-DWIN32' ccversion='16.00.40219.01' gccversion='' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=undef longlongsize=8 d_longdbl=define longdblsize=8 longdblkind=0 ivtype='__int64' ivsize=8 nvtype='double' nvsize=8 Off_t='__int64' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='link' ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"C:\SAPDevelop\hmexternals\perl\gen\out\perl-5.24.1-sap16-SNAPSHOT-ntamd64-release-c\lib\CORE" -machine:AMD64' libpth="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\lib\amd64" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib so=dll useshrplib=true libperl=perl526.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"C:\SAPDevelop\hmexternals\perl\gen\out\perl-5.24.1-sap16-SNAPSHOT-ntamd64-release-c\lib\CORE" -machine:AMD64' --- @INC for perl 5.26.1: C:/SAPDevelop/hmexternals/perl/gen/out/build-64de87d5/perl-5.26.1/lib --- Environment for perl 5.26.1: CYGWIN=mintty HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\SAPDevelop\hmexternals\perl\gen\out\build-64de87d5\perl-5.26.1;C:\opt\pigz-2.3-bin-win32;C:\opt\perforce;C:\opt\Perl64\site\bin;C:\opt\Perl64\bin;C:\opscode\chef\embedded\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\opscode\chef\bin;C:\Program Files\OpenSSH\bin;C:\Program Files\Perforce;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions\;C:\Users\D026948\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\D026948\.dnx\bin;C:\SAPDevelop\xmake-0.9.2-MS10-13\bin;C:\Python27;C:\Program Files (x86)\MSBuild\14.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\;C:\opt\pigz-2.3-bin-win32;C:\opt\perforce;C:\opt\Perl64\site\bin;C:\opt\Perl64\bin;C:\opscode\chef\embedded\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\opscode\chef\bin;C:\Program Files\OpenSSH\bin;C:\Program Files\Perforce;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions\;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\D026948\AppData\Local\HappyMake\bin;C:\SAPDevelop\cmake-3.3.2-sap3-ntamd64\bin PERL_BADLANG (unset) SHELL (unset)

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 746b
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.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Mon, 27 Nov 2017 00:36:00 -0800, shay wrote: Show quoted text
> Thanks for the report.
Hi Steve, thank you for looking into this. Show quoted text
> > 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.
I'm talking about 5.26.1. Show quoted text
> > 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.
Yes you are right, it's not \lib. Looks like I got something wrong, just ran it again. 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. Show quoted text
> > 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.
I can confirm that only getting \lib problem does not occur in 5.26.1. Thank you! Marc-Philip
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 687b
On Mon, 27 Nov 2017 03:25:40 -0800, marc-philip@die-werners.de wrote: Show quoted text
> On Mon, 27 Nov 2017 00:36:00 -0800, shay wrote:
> > 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.
> I can confirm that only getting \lib problem does not occur in 5.26.1. >
Thanks. I've now applied a modified version of patch in commit 6f669bf58bbfaf8d7ef367574be9252df84c08d1. (The makefile.mk changes weren't quite correct since GCC also has to be accounted for, and GNUmakefile also needed changing.)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org