0

While building libssh on Windows machine I have faced a lot of struggles. I overcome some, but couldn't find any solution for this one. Here is it:

enter image description here

Couldn't find clear answers while googling.

Tried to install different versions of openssl. Installed Zlib.


Here is the CmakeOutputLog

The system is: Windows - 10.0.15063 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/12/2017 5:44:27 PM.
Project "D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
  CMakeCCompilerId.c
Link:
  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
  CompilerIdC.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\CompilerIdC\.\CompilerIdC.exe
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_C_COMPILER=E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\cl.exe
FinalizeBuildStatus:
  Deleting file "Debug\CompilerIdC.tlog\unsuccessfulbuild".
  Touching "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\3.10.0-rc1\CompilerIdC\CompilerIdC.vcxproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.03


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"

The C compiler identification is MSVC, found in "D:/Programs/libssh/lsdlf/CMakeFiles/3.10.0-rc1/CompilerIdC/CompilerIdC.exe"

Determining if the C compiler works passed with the following output:
Change Dir: D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp

Run Build Command:"E:\Programs\Visual Studio Entreprise 2017/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_ebaad.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.        

Build started 10/12/2017 5:44:29 PM.

Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ebaad.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTC_ebaad.dir\Debug\".

  Creating directory "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\".

InitializeBuildStatus:

  Creating "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ebaad.dir\Debug\\" /Fd"cmTC_ebaad.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\testCCompiler.c

  Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x86

  Copyright (C) Microsoft Corporation.  All rights reserved.          

  cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ebaad.dir\Debug\\" /Fd"cmTC_ebaad.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\testCCompiler.c

  testCCompiler.c

Link:

  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ebaad.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ebaad.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ebaad.lib" /MACHINE:X86 /SAFESEH  /machine:X86 cmTC_ebaad.dir\Debug\testCCompiler.obj

  cmTC_ebaad.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ebaad.exe

FinalizeBuildStatus:

  Deleting file "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\unsuccessfulbuild".

  Touching "cmTC_ebaad.dir\Debug\cmTC_ebaad.tlog\cmTC_ebaad.lastbuildstate".

Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ebaad.vcxproj" (default targets).        

Build succeeded.

    0 Warning(s)

    0 Error(s)        

Time Elapsed 00:00:01.50

Detecting C compiler ABI info compiled with the following output:
Change Dir: D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp

Run Build Command:"E:\Programs\Visual Studio Entreprise 2017/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_ac149.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.        

Build started 10/12/2017 5:44:30 PM.

Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ac149.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTC_ac149.dir\Debug\".

  Creating directory "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\".

InitializeBuildStatus:

  Creating "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ac149.dir\Debug\\" /Fd"cmTC_ac149.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "D:\Programs\cmake\share\cmake-3.10\Modules\CMakeCCompilerABI.c"

  Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25547 for x86

  Copyright (C) Microsoft Corporation.  All rights reserved.          

  cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ac149.dir\Debug\\" /Fd"cmTC_ac149.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "D:\Programs\cmake\share\cmake-3.10\Modules\CMakeCCompilerABI.c"

  CMakeCCompilerABI.c

Link:

  E:\Programs\Visual Studio Entreprise 2017\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ac149.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ac149.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Programs/libssh/lsdlf/CMakeFiles/CMakeTmp/Debug/cmTC_ac149.lib" /MACHINE:X86 /SAFESEH  /machine:X86 cmTC_ac149.dir\Debug\CMakeCCompilerABI.obj

  cmTC_ac149.vcxproj -> D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\Debug\cmTC_ac149.exe

FinalizeBuildStatus:

  Deleting file "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\unsuccessfulbuild".

  Touching "cmTC_ac149.dir\Debug\cmTC_ac149.tlog\cmTC_ac149.lastbuildstate".

Done Building Project "D:\Programs\libssh\lsdlf\CMakeFiles\CMakeTmp\cmTC_ac149.vcxproj" (default targets).

Build succeeded.

    0 Warning(s)

    0 Error(s)        

Time Elapsed 00:00:01.01
jww
  • 97,681
  • 90
  • 411
  • 885
  • Don't build OpenSSL with Cmake. As far as I know, its not a supported configuration. You should build OpenSSL for Windows according to [`NOTES.WIN`](https://github.com/openssl/openssl/blob/master/NOTES.WIN) provided in the sources. The procedure includes running `Configure`. I'm guessing the same applies to OpenSSH. I can only guess because I am less familiar with building OpenSSH. You might find [Noloader GitHub | Build Scripts](https://github.com/noloader/Build-Scripts) useful. It includes a script to build OpenSSH on Linux (not Windows). – jww Oct 12 '17 at 06:25
  • I didn't build Openssl with Cmake, I was building libssh, but it needs, as I understood installed Openssl (which I already had). But it says it cannot detect openssl/des.h which is located in INCLUDE directory of openssl. I have a path for it in Cmake, but it doesn't help me :( – Kadyrbek Narmamatov Oct 12 '17 at 06:29
  • Can you show the path where you include the include directory from openssl? – Marek Klein Oct 12 '17 at 10:25
  • @MarekKlein here it is OPENSSL_INCLUDE_DIR=D:\Programs\OpenSSL-Win32\include – Kadyrbek Narmamatov Oct 12 '17 at 10:46
  • @jww OpenSSL 1.1.x actually builds a lot easier on Windows when using CMake. – Cinder Biscuits Oct 12 '17 at 14:21
  • @CinderBiscuits , I also thought so. It just followed the instructions and stuck with this problem. I am struggling with this almost one day. – Kadyrbek Narmamatov Oct 13 '17 at 03:35
  • @KadyrbekNarmamatov Please try setting these variables in cmake: OPENSSL_ROOT_DIR=D:/Programs/OpenSSL-Win32 OPENSSL_INCLUDE_DIR=D:/Programs/OpenSSL-Win32/include OPENSSL_LIBRARIES=D:/Programs/OpenSSL-Win32/lib – Cinder Biscuits Oct 13 '17 at 06:57
  • If this does not work, please add the output of CMakeOutput.log to the question. – Cinder Biscuits Oct 13 '17 at 06:58
  • @CinderBiscuits added – Kadyrbek Narmamatov Oct 13 '17 at 08:59

0 Answers0