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

perl 5.28.0 does not build on Windows with MSVC141 and DebugFull #16754

Closed
p5pRT opened this issue Nov 18, 2018 · 7 comments
Closed

perl 5.28.0 does not build on Windows with MSVC141 and DebugFull #16754

p5pRT opened this issue Nov 18, 2018 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 18, 2018

Migrated from rt.perl.org#133666 (status was 'resolved')

Searchable as RT133666$

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2018

From marc-philip@die-werners.de

This is a bug report for perl from marc-philip@​die-werners.de,
generated with the help of perlbug 1.41 running under perl 5.28.0.


Hi,
the summary of my perl below is the summary of the perl that I
successfully built
with VC2017 (aka MSVC141) with the following procedure​:
1. extract source tarball
2. edit win32/Makefile and set CCTYPE=MSVC141
3. open a development shell with correct environment (run "vcvarsall.bat
amd64" of VS 2017)
4. cwd in this shell to win32 folder
5. run nmake

This works fine​: perl builds successfully, and "nmake test" also runs
okay.

BUT​: If I start from scratch from step 1 again and in step 2 not only
set the CCTYPE, but also uncomment line 164 of win32/Makefile and set it
to "CFG=DebugFull", the perl make in step 5 fails. Please find the end
of the output below​:

...
Running pm_to_blib for cpan/Module-Load-Conditional directly
Running pm_to_blib for cpan/Module-Loaded directly
Generating a nmake-style Makefile
Writing Makefile for Module​::Metadata
Running pm_to_blib for cpan/NEXT directly
Running pm_to_blib for dist/Net-Ping directly
Running pm_to_blib for cpan/Params-Check directly
Running pm_to_blib for cpan/Perl-OSType directly
Running pm_to_blib for cpan/PerlIO-via-QuotedPrint directly
Can't copy p to scripts/p​: No such file or directory at Makefile.PL line
26.
Unsuccessful Makefile.PL(cpan/Pod-Checker)​: code=512 at ..\make_ext.pl
line 518.

NMAKE : fatal error U1077​: '..\miniperl.exe' : return code '0x2'
Stop.

Please note that with CFG=Debug (not DebugFull) the perl make succeeds -
only DebugFull is a problem.

Thanks and Regards
Marc-Philip



Flags​:
  category=core
  severity=high


Site configuration information for perl 5.28.0​:

Configured by d026948 at Sun Nov 18 15​:38​:17 2018.

Summary of my perl5 (revision 5 version 28 subversion 0) configuration​:

  Platform​:
  osname=MSWin32
  osvers=6.3.9600
  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
-D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS'
  optimize='-O1 -MD -Zi -DNDEBUG -GL -fp​:precise'
  cppflags='-DWIN32'
  ccversion='19.16.27023.1'
  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​:\perl\lib\CORE" -machine​:AMD64'
  libpth=C​:\SAPDevelop\msvc_2017\VC\Tools\MSVC\14.16.27023\\lib\x64
  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 vcruntime.lib ucrt.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
vcruntime.lib ucrt.lib
  libc=ucrt.lib
  so=dll
  useshrplib=true
  libperl=perl528.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​:\perl\lib\CORE" -machine​:AMD64'


@​INC for perl 5.28.0​:
  C​:/SAPDevelop/hmexternals/perl/mpw/perl-5.28.0/lib


Environment for perl 5.28.0​:
  CYGWIN=mintty
  HOME (unset)
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
 
PATH=C​:\SAPDevelop\msvc_2017\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64;C​:\SAPDevelop\msvc_2017\Common7\IDE\VC\VCPackages;C​:\SAPDevelop\msvc_2017\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C​:\SAPDevelop\msvc_2017\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
Explorer;C​:\SAPDevelop\msvc_2017\MSBuild\15.0\bin\Roslyn;C​:\SAPDevelop\msvc_2017\Team
Tools\Performance Tools\x64;C​:\SAPDevelop\msvc_2017\Team
Tools\Performance Tools;C​:\Program Files (x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\\x64;C​:\Program Files
(x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\;C​:\Program Files
(x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1
Tools\x64\;C​:\Program Files (x86)\Windows
Kits\10\bin\10.0.17134.0\x64;C​:\Program Files (x86)\Windows
Kits\10\bin\x64;C​:\SAPDevelop\msvc_2017\\MSBuild\15.0\bin;C​:\Windows\Microsoft.NET\Framework64\v4.0.30319;C​:\SAPDevelop\msvc_2017\Common7\IDE\;C​:\SAPDevelop\msvc_2017\Common7\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​:\Program Files\Microsoft SQL
Server\120\Tools\Binn\;C​:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C​:\Program Files\Microsoft VS
Code\bin;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;C​:\SAPDevelop\msvc_2017\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C​:\SAPDevelop\msvc_2017\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
  PERL_BADLANG (unset)
  SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2018

From marc-philip@die-werners.de

Hi,
well there is something fishy here. There seems to be a difference between MS Visual Studio 2017 version 15.7 (success) and MS Visual Studio 2017 version 15.9 (failure). I was able to build a perl 5.28.0 in Windows with DebugFull on a different machine. Most important​:
osvers=6.1.7601 (fails on 6.3.9600)
ccversion='19.14.26431' (fails with '19.16.27023.1')

Complete perl -V output​:
Summary of my perl5 (revision 5 version 28 subversion 0) configuration​:
 
  Platform​:
  osname=MSWin32
  osvers=6.1.7601
  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 -Od -MDd -Zi -D_DEBUG -DDEBUGGING -fp​:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_ALLOW_KEYWORD_MACROS -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS'
  optimize='-Od -MDd -Zi -D_DEBUG -DDEBUGGING -fp​:precise'
  cppflags='-DWIN32'
  ccversion='19.14.26431'
  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 -libpath​:"d​:\701\w\elyeqw6zq8\gen\out\perl-5.28.0-sap7-master-SNAPSHOT-ntamd64-debug-c\lib\CORE" -machine​:AMD64'
  libpth="C​:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\\lib\x64"
  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 msvcrtd.lib vcruntimed.lib ucrtd.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 msvcrtd.lib vcruntimed.lib ucrtd.lib
  libc=ucrtd.lib
  so=dll
  useshrplib=true
  libperl=perl528.lib
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_win32.xs
  dlext=dll
  d_dlsymun=undef
  ccdlflags=' '
  cccdlflags=' '
  lddlflags='-dll -nologo -nodefaultlib -debug -libpath​:"d​:\701\w\elyeqw6zq8\gen\out\perl-5.28.0-sap7-master-SNAPSHOT-ntamd64-debug-c\lib\CORE" -machine​:AMD64'

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_IMPLICIT_CONTEXT
  PERL_IMPLICIT_SYS
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_TRACK_MEMPOOL
  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 Nov 18 2018 20​:38​:09
  @​INC​:
  C​:/SAPDevelop/hmexternals/perl/perl-5.28.0-sap7-master-SNAPSHOT-ntamd64-debug-c/lib

Regards
Marc-Philip

@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2018

From @xenu

On Sun, 18 Nov 2018 09​:18​:52 -0800
"Marc-Philip \(via RT\)" <perlbug-followup@​perl.org> wrote​:

Hi,
the summary of my perl below is the summary of the perl that I
successfully built
with VC2017 (aka MSVC141) with the following procedure​:
1. extract source tarball
2. edit win32/Makefile and set CCTYPE=MSVC141
3. open a development shell with correct environment (run "vcvarsall.bat
amd64" of VS 2017)
4. cwd in this shell to win32 folder
5. run nmake

This works fine​: perl builds successfully, and "nmake test" also runs
okay.

BUT​: If I start from scratch from step 1 again and in step 2 not only
set the CCTYPE, but also uncomment line 164 of win32/Makefile and set it
to "CFG=DebugFull", the perl make in step 5 fails. Please find the end
of the output below​:

...
Running pm_to_blib for cpan/Module-Load-Conditional directly
Running pm_to_blib for cpan/Module-Loaded directly
Generating a nmake-style Makefile
Writing Makefile for Module​::Metadata
Running pm_to_blib for cpan/NEXT directly
Running pm_to_blib for dist/Net-Ping directly
Running pm_to_blib for cpan/Params-Check directly
Running pm_to_blib for cpan/Perl-OSType directly
Running pm_to_blib for cpan/PerlIO-via-QuotedPrint directly
Can't copy p to scripts/p​: No such file or directory at Makefile.PL line
26.
Unsuccessful Makefile.PL(cpan/Pod-Checker)​: code=512 at ..\make_ext.pl
line 518.

NMAKE : fatal error U1077​: '..\miniperl.exe' : return code '0x2'
Stop.

Please note that with CFG=Debug (not DebugFull) the perl make succeeds -
only DebugFull is a problem.

Thanks and Regards
Marc-Philip

It was a known bug in Windows SDK​:

https://developercommunity.visualstudio.com/content/problem/289637/setargvobj-is-broken-in-the-latest-windows-sdk.html

As you can see, I have reported it to Microsoft and it's fixed now. I
have just tested CFG=DebugFull build on the latest version of MSVC2017
with the latest SDK and there were no errors.

What version of the SDK are you using? You can check that with "echo
%WindowsSDKLibVersion%" in the vcvars prompt. The bug was fixed in 10.0.17763.0.

BTW, you don't have to edit the makefile, "nmake CCTYPE=MSVC141
CFG=DebugFull" will work just fine.

@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2018

From marc-philip@die-werners.de

On Mon, 19 Nov 2018 00​:09​:09 GMT, me@​xenu.pl wrote​:

It was a known bug in Windows SDK​:

https://developercommunity.visualstudio.com/content/problem/289637/setargvobj-
is-broken-in-the-latest-windows-sdk.html

As you can see, I have reported it to Microsoft and it's fixed now. I
have just tested CFG=DebugFull build on the latest version of MSVC2017
with the latest SDK and there were no errors.

What version of the SDK are you using? You can check that with "echo
%WindowsSDKLibVersion%" in the vcvars prompt. The bug was fixed in
10.0.17763.0.

I can confirm that the compilation with MSVC141 and DebugFull works fine with the SD version 10.0.17763.0.

Now how do I close this ticket? :-/

Thank you very much Tomasz!
Marc-Philip

@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2018

From @jkeenan

Closed per request of OP.

@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2018

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant