8000 Building errors on MS windows 2019 · Issue #168 · docwire/docwire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Building errors on MS windows 2019 #168

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

Open
pipi-mackay opened this issue Feb 3, 2025 · 7 comments
Open

Building errors on MS windows 2019 #168

pipi-mackay opened this issue Feb 3, 2025 · 7 comments

Comments

@pipi-mackay
Copy link

install-x64-windows-dbg-out.log

Hi
We are having problems getting docwire to build on Windows 2019 using the Visual studio 2022 tools. It is occurring at the install stage of the build, so we a close to having it done I think. The build seems to be failing when running the tests, but I am not sure where to look to find the error.

Thanks very much.
Richard

The log file is attached

GitHub packages binary cache disabled.
DEBUG: OPENAI_API_KEY does not exist.
Computing installation plan...
The following packages will be built and installed:
docwire:x64-windows@latest -- F:\dev\DocWire\docwire\ports\docwire
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\richard\AppData\Local\vcpkg\archives in 462 us. Use --debug to see more details.
Installing 1/1 docwire:x64-windows@latest...
Building docwire:x64-windows@latest...
F:\dev\DocWire\docwire\ports\docwire: info: installing overlay port from here
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: F:/dev/DocWire/docwire/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j33
Working Directory: F:/dev/DocWire/docwire/vcpkg/buildtrees/docwire/x64-windows-dbg
See logs for more information:
F:\dev\DocWire\docwire\vcpkg\buildtrees\docwire\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
F:/dev/DocWire/docwire/ports/docwire/portfile.cmake:24 (vcpkg_cmake_install)
scripts/ports.cmake:196 (include)

@as-ascii
Copy link
Contributor
as-ascii commented Feb 4, 2025

Thank you for reporting the issue. The error message is:

C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe   /TP -DDOCWIRE_ENABLE_SHORT_MACRO_NAMES -DMSVC_BUILD -Ddocwire_fuzzy_match_EXPORTS -external:IF:\dev\DocWire\docwire\vcpkg\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -MDd /showIncludes /Fosrc\CMakeFiles\docwire_fuzzy_match.dir\fuzzy_match.cpp.obj /Fdsrc\CMakeFiles\docwire_fuzzy_match.dir\ /FS -c F:\dev\DocWire\docwire\src\fuzzy_match.cpp
F:\dev\DocWire\docwire\src\fuzzy_match.h(18): error C2429: language feature 'nested-namespace-definition' requires compiler flag '/std:c++17'
F:\dev\DocWire\docwire\src\fuzzy_match.cpp(16): error C2429: language feature 'nested-namespace-definition' requires compiler flag '/std:c++17'

The strange thing is that it is building fine in GitHub Actions Windows Runners with MSVC 2022:
https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md
Are you executing the following command:

./build.ps1

or try to build it some other way?

@as-ascii
Copy link
Contributor
as-ascii commented Feb 4, 2025

As a workaround you can try to add:

target_compile_features(docwire_fuzzy_match PUBLIC cxx_std_20)

to src/fuzzy_match.cmake file, it should help.
Maybe default compiler settings somehow differs between your environment and github.

@pipi-mackay
Copy link
Author
pipi-mackay commented Feb 4, 2025
8000

Thanks for your response. We tried adding the target compile option as suggested but that id not change anything.

Investigating further showed that the underlying error was due to the 'cstddef' and 'any' header files not begin found.
I thought we had fixed it by setting an environment variable CMAKE_INCLUDE_PATH to point at \docwire\vcpkg\installed\x64-windows\include, but this was not the case.

Still trying to work out why the 'cstddef' and 'any' header files are not being found when installing docwire. For example:

FAILED: src/CMakeFiles/docwire_core.dir/chat.cpp.obj
C:\PROGRA2\MIB0551\2022\BUILDT1\VC\Tools\MSVC\14421.344\bin\Hostx64\x64\cl.exe /TP -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_FILESYSTEM_NO_LIB -DBOOST_JSON_DYN_LINK=1 -DBOOST_JSON_NO_LIB=1 -DDOCWIRE_ENABLE_SHORT_MACRO_NAMES -DMSVC_BUILD -Ddocwire_core_EXPORTS -IF:\dev\DocWire\docwire\src.. -IF:\dev\DocWire\docwire\src. -external:IF:\dev\DocWire\docwire\vcpkg\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -std:c++20 -MDd /Zc:__cplusplus /Zc:preprocessor /showIncludes /Fosrc\CMakeFiles\docwire_core.dir\chat.cpp.obj /Fdsrc\CMakeFiles\docwire_core.dir\ /FS -c F:\dev\DocWire\docwire\src\chat.cpp
F:\dev\DocWire\docwire\src\parser.h(16): fatal error C1083: Cannot open include file: 'any': No such file or directory
ninja: build stopped: subcommand failed.

Thanks again for all your hard work here. Its impressive.

@as-ascii
Copy link
Contributor
as-ascii commented Feb 4, 2025

We can share prebuilt binaries if you have some non-comfortable deadlines. However it is possible that it will not fix the problem is something is wrong with environment.

@pipi-mackay
Copy link
Author

I think it is safe to assume there is a problem with my dev environment. I have multiple versions of MSVC installed on this machine, and its more than likely they are not playing nicely together.
I will probably have to set up another virtual machine with just one clean install of MSVC to get this to work. Would MSCV 2022 community be an OK choice for this? We do have an older MSVC2017 if that would be better.

In the interim if you would be able to share compiled binaries that would be very much appreciated, so that I can continue working with DocWire. I got onto to DocWire when searching for an update to DocToText, and what you are doing here looks really interesting.

@as-ascii
Copy link
Contributor
as-ascii commented Feb 7, 2025

Please try to use these x64-windows binaries:
https://github.com/docwire/docwire/actions/runs/12954286438/artifacts/2482301950
I think that Github actions runner use MSVC 2022 both on Windows 2019 and Windows 2022 machines so it would be the best choice I think.

@pipi-mackay
Copy link
Author

Thankyou very much for the compiled binaries. I have not used the Github actions runner before, so I am reading up on how that works and how to set it up.

It the meantime, having the binaries allows me to keep progressing on testing and evaluating the capabilities of DocWire.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0