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

build-openssl.bat build openssl-1.1.1c fail #4188

Closed
osabc opened this issue Aug 3, 2019 · 3 comments

Comments

@osabc
Copy link

commented Aug 3, 2019

win 10.0.18362.267
Visual Studio 2019
openssl-1.1.1c

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.2.0
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall] Environment initialized for: 'x86'

Configuring OpenSSL version 1.1.1c (0x1010103fL) for VC-WIN32
Using os-specific seed configuration
Creating configdata.pm
Creating makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
Can't open perl script "Configure": No such file or directory
@osabc

This comment has been minimized.

Copy link
Author

commented Aug 3, 2019

fix and add Use Visual Studio 2019 build

@@ -95,6 +95,19 @@
       ) else (
         set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
       )
+    ) else if /i "%~1" == "vc14.2" (
+      set VC_VER=14.2
+      set VC_DESC=VC14.2
+
+      rem Determine the VC14.2 path based on the installed edition in descending
+      rem order (Enterprise, then Professional and finally Community)
+      if exist "%PF%\Microsoft Visual Studio\2019\Enterprise\VC" (
+        set "VC_PATH=Microsoft Visual Studio\2019\Enterprise\VC"
+      ) else if exist "%PF%\Microsoft Visual Studio\2019\Professional\VC" (
+        set "VC_PATH=Microsoft Visual Studio\2019\Professional\VC"
+      ) else (
+        set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
+      )
     ) else if /i "%~1%" == "x86" (
       set BUILD_PLATFORM=x86
     ) else if /i "%~1%" == "x64" (
@@ -202,6 +215,7 @@
     if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
     if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
     if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
+    if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
   )
 
   if exist "%START_DIR%\ms\do_ms.bat" (
@@ -222,6 +236,8 @@
     call "%ABS_VC_PATH%\bin\vcvars32"
   ) else if "%VC_VER%" == "14.1" (
     call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
+  ) else if "%VC_VER%" == "14.2" (
+    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
   ) else (
     call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
   )
@@ -246,6 +262,8 @@
     rem Perform the install
     call :install debug static %LEGACY_BUILD%
 
+    echo.
+
     rem Configuring 64-bit Shared Library Debug Build
     call :configure x64 debug shared %LEGACY_BUILD%
 
@@ -266,6 +284,8 @@
     rem Perform the install
     call :install release static %LEGACY_BUILD%
 
+    echo.
+
     rem Configuring 64-bit Shared Library Release Build
     call :configure x64 release shared %LEGACY_BUILD%
 
@@ -293,6 +313,8 @@
     rem Perform the install
     call :install debug static %LEGACY_BUILD%
 
+    echo.
+
     rem Configuring 32-bit Shared Library Debug Build
     call :configure x86 debug shared %LEGACY_BUILD%
 
@@ -313,6 +335,8 @@
     rem Perform the install
     call :install release static %LEGACY_BUILD%
 
+    echo.
+
     rem Configuring 32-bit Shared Library Release Build
     call :configure x86 release shared %LEGACY_BUILD%
 
@@ -569,7 +593,7 @@
         if not exist "%OUTDIR%\DLL Release" (
           mkdir "%OUTDIR%\DLL Release" 1>nul
         )
-  
+
         move !build_dir!\lib\*.lib "%OUTDIR%\DLL Release" 1>nul
         move !build_dir!\bin\*.dll "%OUTDIR%\DLL Release" 1>nul
         move !build_dir!\bin\*.exe "%OUTDIR%\DLL Release" 1>nul
@@ -605,6 +629,7 @@
   echo vc12      - Use Visual Studio 2013
   echo vc14      - Use Visual Studio 2015
   echo vc14.1    - Use Visual Studio 2017
+  echo vc14.2    - Use Visual Studio 2019
   echo.
   echo Platform:
   echo.
@bagder

This comment has been minimized.

Copy link
Member

commented Aug 4, 2019

Thanks @osabc, are you able to provide this as pull-request instead?

@bagder

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@captain-caveman2k any comments on the suggested patch?

bagder added a commit that referenced this issue Aug 26, 2019
build-openssl: fix build with Visual Studio 2019
Contributed-by: osabc on github
Fixes #4188

@bagder bagder closed this in c661d73 Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.