gui_starter_template icon indicating copy to clipboard operation
gui_starter_template copied to clipboard

Doesn't work with openssl dependency

Open DominicD opened this issue 2 years ago • 5 comments

Hi I tried to use this however when I add openssl as a dependency it does not compile on windows. I used the template to create a new repo and the only thing I changed was to add openssl: commit

It then fails all windows builds e.g.: Test (windows-2022, msvc, Visual Studio 17 2022, Debug, On)

The system cannot find the path specified.
NMAKE : fatal error U1077: '""C:\Program' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
openssl/3.0.2: ERROR: Package 'b825442d207960b823bd79a908463d7bacb58f1a' build failed
openssl/3.0.2: WARN: Build folder D:\a\justAOpenSSLCompileTest\justAOpenSSLCompileTest\conan-cache\.conan\data\openssl\3.0.2\_\_\build\b825442d207960b823bd79a908463d7bacb58f1a
ERROR: openssl/3.0.2: Error in build() method, line 612
	self._make()
while calling '_make', line 564
	self._run_make()
while calling '_run_make', line 536
	self.run(" ".join(command), win_bash=self._win_bash)
	ConanException: Error 2 while executing nmake
CMake Error at build/conan.cmake:638 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  build/_deps/_project_options-src/src/Conan.cmake:61 (conan_cmake_install)
  build/_deps/_project_options-src/src/Index.cmake:212 (run_conan)
  build/_deps/_project_options-src/src/DynamicProjectOptions.cmake:147 (project_options)
  CMakeLists.txt:100 (dynamic_project_options)

If I just use a minimal conanfile.txt:

[requires]
openssl/3.0.2

[generators]
cmake_find_package_mult

And call conan install . --install-folder build --build=missing -s build_type=Debug -s cppstd=20 it all works fine.

It seems to me that somehow the parameters that are passed to conan are wrong

DominicD avatar May 16 '22 21:05 DominicD

this is an issue with Conan.cmake with this file https://github.com/aminya/project_options/blob/main/src/Conan.cmake it assumes the C compiler and c++ compiler don't have any spaces in their path by default.

if you pass

CONAN_PROFILE default

to dynamic_project_options your issue should go away

exief avatar May 18 '22 00:05 exief

@exief I updated the repo with your suggestion and also simplified it a bit(removed other dependencies etc.) but sadly it still does not work. Also I had to get the latest project_options from main branch otherwise CONAN_PROFILE setting is not there yet

DominicD avatar May 18 '22 07:05 DominicD

looking at your most recent CI run https://github.com/DominicD/justAOpenSSLCompileTest/runs/6484176236?check_suite_focus=true looks like it's trying to use llvm not msvc and it's failing in libjpeg not openssl anymore

exief avatar May 20 '22 02:05 exief

looking at your most recent CI run https://github.com/DominicD/justAOpenSSLCompileTest/runs/6484176236?check_suite_focus=true looks like it's trying to use llvm not msvc and it's failing in libjpeg not openssl anymore

Well I have no Idea why it does that. Cmake call looks fine "Run cmake -S . -B ./build -G "Visual Studio 17 2022 ..." it looks like it uses msvc. and also libjpeg is nowhere referenced. Also the ci is still the one from the template.

DominicD avatar May 22 '22 19:05 DominicD

It seems there might be an issue with Conan or openssl and visual studio 2022: https://github.com/openssl/openssl/issues/18299

DominicD avatar May 28 '22 07:05 DominicD