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
VS, Makefile, makefile.mk #15995
Comments
From geirfuglaps@yahoo.comPerl Developers, System: Microsoft Windows 10 Home Edition Setup here: http://nurmi-labs.blogspot.com/2017/05/9pvfs.html I presume the attachments will suffice as updates for perl-5.26.x. I do not have experience editing pod files, so have not endeavoured to update README.win32. Sincerely, P.S. I do not want my e-mail address published. |
From geirfuglaps@yahoo.com# ## ## # # # # # # # # # # # # # # # # # # # # # # # # # # # ## ##################### CHANGE THESE ONLY IF YOU MUST ##################### !IF "$(USE_IMP_SYS)" == "define" !IF "$(PERL_MALLOC)" == "" !IF "$(DEBUG_MSTATS)" == "" !IF "$(DEBUG_MSTATS)" == "define" !IF "$(USE_SITECUST)" == "" !IF "$(USE_MULTI)" == "" !IF "$(USE_ITHREADS)" == "" !IF "$(USE_IMP_SYS)" == "" !IF "$(USE_LARGE_FILES)" == "" !IF "$(USE_64_BIT_INT)" == "" !IF "$(DEFAULT_INC_EXCLUDES_DOT)" == "" !IF "$(USE_NO_REGISTRY)" == "" !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" !IF "$(USE_SITECUST)" == "define" !IF "$(USE_MULTI)" != "undef" !IF "$(USE_IMP_SYS)" != "undef" !IF "$(USE_NO_REGISTRY)" != "undef" !IF "$(PROCESSOR_ARCHITECTURE)" == "" !IF "$(WIN64)" == "" !IF "$(WIN64)" == "define" # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler # Most relevant compiler-specific options fall into two groups: ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) !IF "$(USE_MULTI)" == "define" !IF "$(USE_ITHREADS)" == "define" !IF "$(WIN64)" != "define" # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and ARCHDIR = ..\lib\$(ARCHNAME) # # !IF "$(__ICC)" != "define" # INCLUDES = -I$(COREDIR) -I.\include -I. -I.. !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \ !IF "$(CFG)" == "Debug" !IF "$(WIN64)" == "define" # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions # Likewise for deprecated Winsock APIs in VC++ 14.0 for now. # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to LIBBASEFILES = \ !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \ # Avoid __intel_new_proc_init link error for libircmt. # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which LIBFILES = #EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706 CFLAGS_O = !IF "$(PREMSVC80)" == "undef" # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates) # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm !ELSE BLINK_FLAGS = #################### do not edit below this line ####################### o = .obj # #clear the list, we dont support .cxx .bas .cbl .for .pas .f .f90 .c$(o): .c.i: .y.c: $(o).dll: .rc.res: # # makedef.pl must be updated if this changes, and this should normally MINIPERL = ..\miniperl.exe # Unicode data files generated by mktables # Directories of Unicode data files generated by mktables PERLEXE_MANIFEST= .\perlexe.manifest # Nominate a target which causes extensions to be re-built PL2BAT = bin\pl2bat.pl UTILS = \ MAKE = nmake -nologo CFGSH_TMPL = config.vc XCOPY = xcopy /f /r /i /d /y DEL = del MICROCORE_SRC = \ EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c !IF "$(PERL_MALLOC)" == "define" EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c WIN32_SRC = \ CORE_NOCFG_H = \ CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h UUDMAP_H = ..\uudmap.h MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj) PERLDLL_OBJ = $(CORE_OBJ) PERLDLL_OBJ = !IF "$(USE_SETARGV)" != "" !IF "$(ALL_STATIC)" == "define" DYNALOADER = ..\DynaLoader$(o) CFG_VARS = \ # all : .\config.h ..\git_version.h regnodes : ..\regnodes.h ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h reonly : regnodes .\config.h ..\git_version.h static: $(PERLEXESTATIC) #------------------------------------------------------------
perlglob$(o) : perlglob.c # ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl # make sure that we recompile perl.c if the git version changes ..\config.sh : # This target is for when changes to the main config.sh happen.
# See the comment in Makefile.SH explaining this seemingly cranky ordering ..\lib\buildcustomize.pl : $(MINIDIR) :
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c # 1. we don't want to rebuild miniperl.exe when config.h changes
perldll.def :
$(PERLSTATICLIB): Extensions_static
$(GENUUDMAP_OBJ) : ..\mg_raw.h
perlmain.c : runperl.c perlmain$(o) : perlmain.c perlmainst.c : runperl.c perlmainst$(o) : perlmainst.c
MakePPPort: #------------------------------------------------------------------------------- Extensions_reonly: ..\make_ext.pl ..\lib\buildcustomize.pl Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl
Extensions_clean: Extensions_realclean: #------------------------------------------------------------------------------- doc: $(PERLEXE) ..\pod\perltoc.pod ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL # Note that this next section is parsed (and regenerated) by pod/buildtoc utils: $(PERLEXE) ..\utils\Makefile ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs # Note that the pod cleanup in this next section is parsed (and regenerated distclean: realclean install : all installbare installhtml installbare : utils ..\pod\perltoc.pod installhtml : doc inst_lib : $(CONFIGPM)
minitest : .\config.h test-prep : all utils ../pod/perltoc.pod test : test-prep test_porting : test-prep test-reonly : reonly utils regen : test-notty : test-prep _test : _clean : clean : Extensions_clean _clean realclean : Extensions_realclean _clean # Handy way to run perlbug -ok without having to install and run the okfile: utils nok: utils nokfile: utils |
From geirfuglaps@yahoo.com# ## # ## # # # # # # # # # # # # # # # # # # # # # # # # #CCHOME *= C:\MinGW # # # # # # # ## ##################### CHANGE THESE ONLY IF YOU MUST ##################### PERL_MALLOC *= undef USE_SITECUST *= undef .IF "$(USE_IMP_SYS)" == "define" .IF "$(PERL_MALLOC)" == "undef" .IF "$(DEBUG_MSTATS)" == "define" .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef" .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef" .IF "$(USE_SITECUST)" == "define" .IF "$(USE_MULTI)" != "undef" .IF "$(USE_IMP_SYS)" != "undef" .IF "$(USE_NO_REGISTRY)" != "undef" #no explicit CCTYPE given, do auto detection .IF "$(CCHOME)" == "" # .IF "$(GCCCROSS)" == "define" PROCESSOR_ARCHITECTURE *= x86 .IF "$(WIN64)" == "undef" .IF "$(WIN64)" == "" .IF "$(WIN64)" == "define" # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler # Disable the long double option for MSVC builds since that compiler ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) .IF "$(USE_MULTI)" == "define" .IF "$(USE_ITHREADS)" == "define" .IF "$(WIN64)" != "define" .IF "$(USE_LONG_DOUBLE)" == "define" ARCHDIR = ..\lib\$(ARCHNAME) # # .USESHELL : MINIBUILDOPT *= .IF "$(CCTYPE)" == "GCC" .IF "$(GCCCROSS)" == "define" CC = $(ARCHPREFIX)gcc .IF "$(USE_LONG_DOUBLE)" == "define" GCCWRAPV *= .IF "$(GCCWRAPV)" == "define" i = .i # INCLUDES = -I.\include -I. -I.. # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link # same libs as MSVC .IF "$(CFG)" == "Debug" EXTRACFLAGS = BUILDOPT += -fno-strict-aliasing -mms-bitfields TESTPREPGCC = test-prep-gcc .ELSE # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and # Most relevant compiler-specific options fall into two groups: .IF "$(__ICC)" != "define" # INCLUDES = -I.\include -I. -I.. .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \ .IF "$(CFG)" == "Debug" .IF "$(WIN64)" == "define" # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions # Likewise for deprecated Winsock APIs in VC++ 14.0 for now. # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \ # Avoid __intel_new_proc_init link error for libircmt. # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which LIBFILES = EXTRACFLAGS = -nologo -GF -W3 .ENDIF CFLAGS_O = .IF "$(PREMSVC80)" == "undef" # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates) # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm .ELIF "$(CCTYPE)" != "GCC" BLINK_FLAGS = #################### do not edit below this line ####################### # Some old dmakes (including Sarathy's one at o *= .obj LKPRE = INPUT ( # .SUFFIXES : .c .i .c$(o): .c.i: .y.c: $(o).dll: .rc.res: # #do not put # Unicode data files generated by mktables # Directories of Unicode data files generated by mktables PERLEXE_MANIFEST= .\perlexe.manifest # Nominate a target which causes extensions to be re-built PL2BAT = bin\pl2bat.pl UTILS = \ .IF "$(CCTYPE)" == "GCC" CFGSH_TMPL = config.gc .ELSE CFGSH_TMPL = config.vc .ENDIF # makedef.pl must be updated if this changes, and this should normally #EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel XCOPY = xcopy /f /r /i /d /y #first ones are arrange in compile time order for faster parallel building EXTRACORE_SRC += perllib.c .IF "$(PERL_MALLOC)" == "define" EXTRACORE_SRC += ..\perlio.c WIN32_SRC = \ CORE_NOCFG_H = \ CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h UUDMAP_H = ..\uudmap.h HAVE_COREDIR = .\.coreheaders MICROCORE_OBJ = PERLDLL_OBJ = $(CORE_OBJ) PERLDLL_OBJ += .IF "$(USE_SETARGV)" != "" .IF "$(ALL_STATIC)" == "define" DYNALOADER = ..\DynaLoader$(o) # vars must be separated by "\t+~\t+", since we're using the tempfile # all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h reonly : ..\regnodes.h $(UNIDATAFILES) Extensions_reonly static: $(PERLEXESTATIC) #---------------------------------------------------------------- CHECKDMAKE : $(GLOBEXE) : perlglob.c ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl # make sure that we recompile perl.c if the git version changes ..\config.sh : # This target is for when changes to the main config.sh happen. $(CONFIGPM) .\config.h .UPDATEALL: ..\config.sh config_h.PL # See the comment in Makefile.SH explaining this seemingly cranky ordering #convinence target, get a working miniperl
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h # 1. we don't want to rebuild miniperl.exe when config.h changes perllibst.h : perldll.def :
MakePPPort : # also known as $(HAVE_COREDIR) perlmain$(o) : runperl.c $(CONFIGPM) perlmainst$(o) : runperl.c $(CONFIGPM)
#------------------------------------------------------------------------------- #most of deps of this target are in DYNALOADER and therefore omitted here Extensions_normalize : Extensions_reonly : Extensions_static : ..\make_ext.pl list_static_libs.pl Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building Extensions_clean : Extensions_realclean : # all PE files need to be built by the time this target runs, PP files can still #------------------------------------------------------------------------------- doc: ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL # Note that this next section is parsed (and regenerated) by pod/buildtoc ..\pod\perltoc.pod: # Note that the pod cleanup in this next section is parsed (and regenerated distclean: realclean install : all installbare installhtml installbare : utils ..\pod\perltoc.pod installhtml : doc inst_lib : $(CONFIGPM)
minitest : .\config.h test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC) # If building with gcc versions 4.x.x or greater, then .IF "$(CCTYPE)" == "GCC" test-prep-gcc : .ENDIF test : test-prep test_porting : test-prep test-reonly : reonly utils regen : test-notty : test-prep _test : _clean : clean : Extensions_clean _clean realclean : Extensions_realclean _clean # Handy way to run perlbug -ok without having to install and run the okfile: utils nok: utils nokfile: utils |
From @jkeenanOn Fri, 02 Jun 2017 22:37:26 GMT, geirfuglaps@yahoo.com wrote:
Eric, thanks for your contributions. We generally expect changes to code in the Perl 5 core distribution to be presented as patches in 'diff' format. My hunch is that you intend these files to modify or replace these files in the core distribution: ##### ... but that's just my guess. If that is the case, I would recommend that you read 'perldoc perlhack' and 'perldoc perlgit' to learn how to hack on the core distribution and submit patches. Those patches should be submitted in one of the 'diff' formats described in those documents and sent as email attachments. ('git format-patch' works well for this.) In the body of your response you can provide your argument for applying these patches. (I'm not a Win32 Perl person, so I can't make any informed judgment about this.) Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From geirfuglaps@yahoo.comUpdating both \perl-5.26.0\win32\Makefile and \perl-5.26.0\win32\makefile.mk. C:\perl-5.26.0\win32> nmake.exe test ... Test Summary Report porting/pod_rules.t (Wstat: 0 Tests: 8 Failed: 2) C:\perl-5.26.0\win32>cd .. C:\perl-5.26.0>perl.exe t\porting\pod_rules.t C:\perl-5.26.0> |
From geirfuglaps@yahoo.comI presume wrong line endings were responsible for the fatal error of the previous correspondence. I sent on Saturday 0001-Update-nmake-for-VS-2017.patch where the updates work for perl-5.26.0.tar.gz. Subsequently I realised that the git clone, currently perl-5.27.x, fails to create the library perl527.lib and object perl527.exp with the output as 'perldll.def : error LNK2001: unresolved external symbol PL_hash_chars', when compiling in VS 2017 when the patch had been applied. Apologies for prematurely sending 0001-Update-nmake-for-VS-2017.patch. If the win32\makefile.mk code was correct for MSVC140 and MSVC140FREE then this partial update should also be correct be for MSVC141. -.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" However, running 'dmake.exe -f makefile.mk' on the fully patched (see attachment) git clone, currently perl-5.27.x, outputs the following. C:\Users\Eric\perl\win32>dmake.exe -f makefile.mk C:\Users\Eric\perl\win32> I guess this is the relevant code section which dmake.exe is having a problem with. win32/makefile.mk .IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" As I don't know if the unpatched win32/makefile.mk factually works for MSVC140 or MSVC140FREE, I can't say at this point of time if it's worthwhile to patch it for MSVC141. |
From geirfuglaps@yahoo.com0001-Update-dmake-for-VS-2017.patchFrom fe47af3a610df189c9893564bb24d37bd5c676fd Mon Sep 17 00:00:00 2001
From: Eric Lindblad <geirfuglaps@yahoo.com>
Date: Sat, 3 Jun 2017 17:09:35 -0500
Subject: [PATCH] Update dmake for VS 2017
---
win32/makefile.mk | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 88d197ec34..3cb244399e 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -155,6 +155,8 @@ DEFAULT_INC_EXCLUDES_DOT *= define
#CCTYPE = MSVC140
# Visual C++ 2015 Express Edition (aka Visual C++ 14.0) (free version)
#CCTYPE = MSVC140FREE
+# Visual C++ 2017 (aka Visual C++ 14.1) (all versions)
+#CCTYPE = MSVC141
# MinGW or mingw-w64 with gcc-3.4.5 or later
#CCTYPE = GCC
@@ -241,7 +243,7 @@ DEFAULT_INC_EXCLUDES_DOT *= define
# Running VCVARS32.BAT is *required* when using Visual C.
# Some versions of Visual C don't define MSVCDIR in the environment,
# so you may have to set CCHOME explicitly (spaces in the path name should
-# not be quoted)
+# not be quoted), for MSVC141 the value for %VCToolsInstallDir%
#
#CCHOME *= C:\MinGW
@@ -617,7 +619,8 @@ DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
LOCDEFS = -DPERLDLL -DPERL_CORE
CXX_FLAG = -TP -EHsc
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
LIBC = ucrt.lib
.ELSE
LIBC = msvcrt.lib
@@ -630,7 +633,8 @@ LINK_DBG = -debug
OPTIMIZE = -Od -MD -Zi
LINK_DBG = -debug
.ELIF "$(CFG)" == "DebugFull"
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
LIBC = ucrtd.lib
.ELSE
LIBC = msvcrtd.lib
@@ -668,7 +672,8 @@ DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
.ENDIF
# Likewise for deprecated Winsock APIs in VC++ 14.0 for now.
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
DEFINES = $(DEFINES) -D_WINSOCK_DEPRECATED_NO_WARNINGS
.ENDIF
@@ -691,7 +696,8 @@ LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
odbc32.lib odbccp32.lib comctl32.lib
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
.IF "$(CFG)" == "DebugFull"
LIBBASEFILES += msvcrtd.lib vcruntimed.lib
.ELSE
@@ -746,6 +752,7 @@ PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Com
RSC_FLAGS = -DINCLUDE_MANIFEST
.ENDIF
+# VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
# For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
# LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
@@ -1241,7 +1248,7 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
echo #undef NVgf&& \
echo #undef USE_LONG_DOUBLE&& \
echo #undef USE_CPLUSPLUS)>> config.h
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" || "$(CCTYPE)" == "MSVC141"
@(echo #undef FILE_ptr&& \
echo #undef FILE_cnt&& \
echo #undef FILE_base&& \
--
2.13.0.windows.1
|
From geirfuglaps@yahoo.comPerl Developers, If the 'external symbol' issue is resolved from the previous correspondence then my "nmake" patch (attached) might work, notwithstanding other issues which may arise with the git clone, currently perl-5.27.x. The perlhack.pod file might be more comprehensible if user.email and user.name were added as below. * Commit your change Committing your work will save the change on your local system: % git config --global user.email "you@example.com" Sincerely, P.S. Someone should probably check if the git clone, currently perl5.27.x, compiles on MSVC140 or MSVC140FREE. |
From geirfuglaps@yahoo.com0001-Update-nmake-for-VS-2017.patchFrom 20c65cfcb2056e506d19695821fb2a23f9242b3f Mon Sep 17 00:00:00 2001
From: Eric Lindblad <geirfuglaps@yahoo.com>
Date: Sat, 3 Jun 2017 12:17:37 -0500
Subject: [PATCH] Update nmake for VS 2017
---
win32/Makefile | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/win32/Makefile b/win32/Makefile
index 59d9918..32d54f9 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -143,6 +143,8 @@ CCTYPE = MSVC60
#CCTYPE = MSVC140
# Visual C++ 2015 Express Edition (aka Visual C++ 14.0) (free version)
#CCTYPE = MSVC140FREE
+# Visual C++ 2017 (aka Visual C++ 14.1) (all versions)
+#CCTYPE = MSVC141
#
# If you are using Intel C++ Compiler uncomment this
@@ -222,7 +224,7 @@ CCTYPE = MSVC60
# Running VCVARS32.BAT is *required* when using Visual C.
# Some versions of Visual C don't define MSVCDIR in the environment,
# so you may have to set CCHOME explicitly (spaces in the path name should
-# not be quoted)
+# not be quoted), for MSVC141 replace $(MSVCDIR) with $(VCToolsInstallDir)
#
CCHOME = $(MSVCDIR)
CCINCDIR = $(CCHOME)\include
@@ -481,7 +483,8 @@ DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
LOCDEFS = -DPERLDLL -DPERL_CORE
CXX_FLAG = -TP -EHsc
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
LIBC = ucrt.lib
!ELSE
LIBC = msvcrt.lib
@@ -496,7 +499,8 @@ OPTIMIZE = -Od -MD -Zi
LINK_DBG = -debug
!ELSE
!IF "$(CFG)" == "DebugFull"
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
LIBC = ucrtd.lib
!ELSE
LIBC = msvcrtd.lib
@@ -536,7 +540,8 @@ DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
!ENDIF
# Likewise for deprecated Winsock APIs in VC++ 14.0 for now.
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
DEFINES = $(DEFINES) -D_WINSOCK_DEPRECATED_NO_WARNINGS
!ENDIF
@@ -560,7 +565,8 @@ LIBBASEFILES = \
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
version.lib odbc32.lib odbccp32.lib comctl32.lib
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" \
+ || "$(CCTYPE)" == "MSVC141"
! IF "$(CFG)" == "DebugFull"
LIBBASEFILES = $(LIBBASEFILES) msvcrtd.lib vcruntimed.lib
! ELSE
@@ -611,6 +617,8 @@ PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) "/manifestdependency:type='Win32' name='Mic
RSC_FLAGS = -DINCLUDE_MANIFEST
!ENDIF
+# VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
+
# For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
# LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
# Console vs GUI makes no difference for DLLs, so use default for cleaner
@@ -964,7 +972,7 @@ perlglob$(o) : perlglob.c
@echo.>>$@
@echo #ifndef _config_h_footer_>>$@
@echo #define _config_h_footer_>>$@
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE"
+!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" || "$(CCTYPE)" == "MSVC141"
@echo #undef FILE_ptr>>$@
@echo #define FILE_ptr(fp) PERLIO_FILE_ptr(fp)>>$@
@echo #undef FILE_cnt>>$@
--
2.9.0
|
From @steve-m-hayOn 5 June 2017 at 06:10, Eric Lindblad via perl5-porters
Thanks for the patch. I will get VS2017 shortly and look at applying your patch. The MSVC140 build with VS2015 works fine for me in the current dev |
From @steve-m-hayOn 5 June 2017 at 08:15, Steve Hay <steve.m.hay@googlemail.com> wrote:
The dmake/VC14 build was indeed broken, but is now fixed in blead. I will look at adding VC15 (VS2017) support in the next few days. |
From @jkeenanOn 06/07/2017 01:07 PM, Steve Hay via perl5-porters wrote:
Steve Hay++ Is there any way we could get a smoke-testing rig set up on the machine Thank you very much. |
From geirfuglaps@yahoo.com
Deps: vs_community__1560150700.1495339730.exe The numbering sequence I used (see extract) is based on opening from the Start Menu the Visual Studio Installer. "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" Then Clicking in the Installed tab for Visual Studio Community 2017 the [Modify] button. In the new window which appears, then scrolling down the "Summary" column there are these entries. VC++ 2017 v141 toolset (x86, x64) VC++ 2015.3 v140 toolset (x86, x64) The latter is not installed due to lack of disk space. (extract from my patches) # Visual C++ 2015 Express Edition (aka Visual C++ 14.0) (free version) |
From @steve-m-hayOn 8 June 2017 at 08:04, Eric Lindblad <geirfuglaps@yahoo.com> wrote:
You're right, I think I will go with 14.1 rather than 15.x. I was https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#32-bit_and_64-bit_versions I will double-check when I've got it installed. I'll add the usual free/full versions to the makefiles in case there |
From @steve-m-hayOn 7 June 2017 at 18:36, James E Keenan <jkeenan@pobox.com> wrote:
I keep meaning to send an occasional smoke report from my home machine |
From geirfuglaps@yahoo.com
Deps: vs_community__1560150700.1495339730.exe Clicking on the VS Community 2017 IDE Menu's "Help" dropdown, and then on
Speculation, but maybe the full/free write up dates back to when the "free" Perhaps (?) its no longer relevant. cf: https://github.com/Perl/perl5/blob/blead/README.win32 (lines 144-47) "These free versions of Visual C++ 2008-2015 Professional contain the same |
From @jkeenanOn 06/08/2017 03:21 AM, Steve Hay wrote:
Well, at this point even 1 report a week would be an improvement over Thank you very much. |
From geirfuglaps@yahoo.com
Just an idea, but what about someone getting a Win7 Ultimate or Win8.0 Ultimate box, installing the Interix subsystem, and running a weekly cron job to initiate/send results of the test? |
From @steve-m-hayThanks again for the patches. These are now applied in commits 58998b2 and 82cad14. |
@steve-m-hay - Status changed from 'open' to 'resolved' |
From geirfuglaps@yahoo.comwin32\Makefile 227 # by $(VCToolsInstallDir); location of headers/libs now in separate code block. |
From geirfuglaps@yahoo.comI noticed that README.win32 received some attention Friday. For what its worth here's an archived page regarding Visual C++ 2005 Express Edition. Visual C++ Express Edition with the Microsoft Platform SDK https://msdn.microsoft.com/en-us/library/ms235626(v=vs.80).aspx |
Migrated from rt.perl.org#131487 (status was 'resolved')
Searchable as RT131487$
The text was updated successfully, but these errors were encountered: