-
Notifications
You must be signed in to change notification settings - Fork 393
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
sw_execute not finding CMAKE_CXX_COMPILER_ID #702
Comments
An additional note, adding set(CMAKE_C_COMPILER_ID "MSVC") did not resolve the issue. So SW seems to need CMAKE_CXX_COMPILER_ID to be set. |
Not sure what you are doing but sw build seems to have no problem on the latest windows: https://github.com/DanBloomberg/leptonica/actions/runs/5292787926/jobs/9580098275 |
Humm, another question then, does the automatic test build use CMake, or is it using the Visual Studio CMake? My setup is pretty clean, but I will try on a virtual machine to see if I can see the same issue. Will get back with the result. Thanks |
@GitGoliath : maybe you can give you step-by-step description how did you get error? @egorpugin: can you give your insight how to use sw? |
Hi, Was able to reproduce from clean Windows 11 VMWare install. Here is the step-by-step reproduction of the issue on a clean VMWare Virtual Machine (Windows 11 version 22H2, build 22621.1928: 1- From Clean Windows 11 latest update virtual machine, download Visual Studio Community Here is the output window: 1> CMake generation started for default configuration: 'x64-Debug'. From error window: Error CMake Error at C:/Users/VMLoc/.sw/storage/etc/sw/static/SWConfig.cmake:166 (message): |
Hi, Please try to build from command line. |
Hi, As being not a expert of CMake command line, I tried the following: 1- got into the git copied repository I got for Leptonica in C:\Git\Leptonica Sorry, did not have time today to investigate why cl.exe compiler was not able to compile with this command line. C:\Git\Leptonica\build>C:\WINDOWS\system32\cmd.exe /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Git\Leptonica\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" "C:\Git\Leptonica" 2>&1"
is not able to compile a simple test program. It fails with the following output:
CMake will not be able to correctly generate this project. -- Configuring incomplete, errors occurred! |
Yes, you should resolve this first. |
Hi,
I am new to Leptonica, I build on Windows 11 (22H2), with Visual Studio (Version 17.6.4), following the instruction. Install SW client, doing the setup, etc.
When running from VS GUI, the CMakeLists.txt, I get the following error in SWConfig.cmake line 166:
I saw in the on git change log that 3 weeks ago the CXX where removed. Could be related...
I had to insert in the CMakeLists.txt the following:
set(CMAKE_CXX_COMPILER_ID "MSVC")
as sw_execute seems to need it, and the current CMake script I have was not setting it. Possibly from the change 3 weeks ago. Note that the SW Client used is from
[sw-master-windows_x86_64-client.zip] (https://software-network.org/client/sw-master-windows_x86_64-client.zip) from yesterday
13-Jun-2023 21:33
So the current version does not seems to build from windows directly.
The text was updated successfully, but these errors were encountered: