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

[Bug]: Failed to build on windows 11 #529

Open
Andrej730 opened this issue Aug 3, 2024 · 5 comments
Open

[Bug]: Failed to build on windows 11 #529

Andrej730 opened this issue Aug 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Andrej730
Copy link

What happened?

I've followed all the recommendations from https://github.com/AcademySoftwareFoundation/OpenRV/blob/main/docs/build_system/config_windows.md and tried to build OpenRV with the snippet below:

export QT_HOME=/d/Software/Dependencies/Qt/5.15.2/msvc2019_64
export WIN_PERL=/d/Software/Strawberry/perl/bin
. rvcmds.sh
rvbootstrap

But it fails with an error bellow. Any suggestions?

image

List all the operating systems versions where this is happening

Windows 10

On what computer hardware is this happening?

Relevant console log output

Text traceback:


       "D:\git\OpenRV\_build\main_executable.vcxproj" (целевой объект по умолчанию) (1) ->
       "D:\git\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (целевой объект по умолчанию) (3) ->
       "D:\git\OpenRV\_build\cmake\dependencies\dependencies.vcxproj" (целевой объект по умолчанию)
        (5) ->
       "D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS_OPENSSL-stage-target.vcxproj" (целевой объе
       кт по умолчанию) (46) ->
       (Целевой объект CustomBuild) ->
         D:\Software\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp
       Common.targets(254,5): warning MSB8065: Custom build for item "D:\git\OpenRV\_build\CMakeFil
       es\7d5c8000455d11b9b24c2801f0088b47\libcrypto-1_1-x64.dll.rule" succeeded, but specified out
       put "d:\git\openrv\_build\stage\app\lib\libcrypto-1_1-x64.dll" has not been created. This ma
       y cause incremental build to work incorrectly. [D:\git\OpenRV\_build\cmake\dependencies\RV_D
       EPS_OPENSSL-stage-target.vcxproj]
         D:\Software\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp
       Common.targets(254,5): warning MSB8065: Custom build for item "D:\git\OpenRV\_build\CMakeFil
       es\7d5c8000455d11b9b24c2801f0088b47\libcrypto-1_1-x64.dll.rule" succeeded, but specified out
       put "d:\git\openrv\_build\stage\app\lib\libssl-1_1-x64.dll" has not been created. This may c
       ause incremental build to work incorrectly. [D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS
       _OPENSSL-stage-target.vcxproj]


       "D:\git\OpenRV\_build\main_executable.vcxproj" (целевой объект по умолчанию) (1) ->
       "D:\git\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (целевой объект по умолчанию) (3) ->
       "D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS_OCIO.vcxproj" (целевой объект по умолчанию)
        (28) ->
       (Целевой объект CustomBuild) ->
         CUSTOMBUILD : error : in triplet x64-windows: Unable to find a valid Visual Studio instanc
       e [D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS_OCIO.vcxproj]
         D:\Software\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp
       Common.targets(254,5): error MSB8066: Custom build for 'D:\git\OpenRV\_build\CMakeFiles\d461
       a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-install_vcpkg_manifest.rule;D:\git\OpenRV\_build\C
       MakeFiles\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-download.rule;D:\git\OpenRV\_build\C
       MakeFiles\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-update.rule;D:\git\OpenRV\_build\CMa
       keFiles\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-patch.rule;D:\git\OpenRV\_build\CMakeF
       iles\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-configure.rule;D:\git\OpenRV\_build\CMake
       Files\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-build.rule;D:\git\OpenRV\_build\CMakeFil
       es\d461a9623bf309a9ae03bdd81a678a71\RV_DEPS_OCIO-install.rule;D:\git\OpenRV\_build\CMakeFile
       s\1c3a2c130f7b808937422272da200f27\RV_DEPS_OCIO-complete.rule;D:\git\OpenRV\_build\CMakeFile
       s\361b68c7bf8020caa995b59ff7173adf\RV_DEPS_OCIO.rule' exited with code 1. [D:\git\OpenRV\_bu
       ild\cmake\dependencies\RV_DEPS_OCIO.vcxproj]


       "D:\git\OpenRV\_build\main_executable.vcxproj" (целевой объект по умолчанию) (1) ->
       "D:\git\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (целевой объект по умолчанию) (3) ->
       "D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS_BOOST.vcxproj" (целевой объект по умолчанию
       ) (20) ->
         D:\Software\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp
       Common.targets(254,5): error MSB8066: Custom build for 'D:\git\OpenRV\_build\CMakeFiles\19dc
       d5f80f61c237c70f8cef432cb7d5\RV_DEPS_BOOST-build.rule;D:\git\OpenRV\_build\CMakeFiles\19dcd5
       f80f61c237c70f8cef432cb7d5\RV_DEPS_BOOST-install.rule;D:\git\OpenRV\_build\CMakeFiles\1c3a2c
       130f7b808937422272da200f27\RV_DEPS_BOOST-complete.rule;D:\git\OpenRV\_build\CMakeFiles\361b6
       8c7bf8020caa995b59ff7173adf\RV_DEPS_BOOST.rule' exited with code 1. [D:\git\OpenRV\_build\cm
       ake\dependencies\RV_DEPS_BOOST.vcxproj]

    Предупреждений: 2
    Ошибок: 3


### Environment variables

_No response_

### Extra information

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@Andrej730 Andrej730 added the bug Something isn't working label Aug 3, 2024
@bernie-laberge
Copy link
Contributor

bernie-laberge commented Aug 5, 2024

Hello @Andrej730,

I have never seen this "in triplet x64-windows: Unable to find a valid Visual Studio instance" error before.

It looks like you need to install the "Visual C++ tools for CMake" in the Visual Studio Installer.
Note that you can go in the "Add Remove Program/Visual Studio Installer" and select the modify option to add the missing option. You don't have to reinstall the whole Visual Studio.

From:
https://stackoverflow.com/questions/75365556/error-in-triplet-x64-windows-unable-to-find-a-valid-visual-studio-instance-cou

FYI: These are the Visual Studio options I have installed:
visual_studio_options_for_openrv

I hope this helps

@Andrej730
Copy link
Author

I do have the same components, so this shouldn't cause the issue:

image

I've experimented a bit more and it seems to be the issue with this particular version of vcpkg 2023-11-16. Maybe it's related that I have visual studio installed not on system disk and it therefore vcpkg had problem recognizing it.

What helped is changing VCPKG_TOOL_RELEASE_TAG=2023-11-16 to VCPKG_TOOL_RELEASE_TAG=2024-03-14 in vcpkg-tool-metadata.txt then running vcpkg.exe install --triplet x64-windows stopped giving this error.

Haven't tried to rebuild the entire vcpkg yet. How can I bump vcpkg version for my build?

@bernie-laberge
Copy link
Contributor

RV_CREATE_STANDARD_DEPS_VARIABLES("RV_DEPS_VCPKG" "2023.11.20" "" "")

@Andrej730
Copy link
Author

Switching from 2023.11.20 to 2024.03.19 in vcpkg.cmake helped to solve 2/3 errors, still has issue with RV_DEPS_BOOST.vcxproj.

      "D:\git\OpenRV\_build\main_executable.vcxproj" (целевой объект по умолчанию) (1) ->
       "D:\git\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (целевой объект по умолчанию) (3) ->
       "D:\git\OpenRV\_build\cmake\dependencies\RV_DEPS_BOOST.vcxproj" (целевой объект по умолчанию
       ) (9) ->
       (Целевой объект CustomBuild) ->
         D:\Software\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.Cpp
       Common.targets(254,5): error MSB8066: Custom build for 'D:\git\OpenRV\_build\CMakeFiles\19dc
       d5f80f61c237c70f8cef432cb7d5\RV_DEPS_BOOST-build.rule;D:\git\OpenRV\_build\CMakeFiles\19dcd5
       f80f61c237c70f8cef432cb7d5\RV_DEPS_BOOST-install.rule;D:\git\OpenRV\_build\CMakeFiles\1c3a2c
       130f7b808937422272da200f27\RV_DEPS_BOOST-complete.rule;D:\git\OpenRV\_build\CMakeFiles\361b6
       8c7bf8020caa995b59ff7173adf\RV_DEPS_BOOST.rule' exited with code 1. [D:\git\OpenRV\_build\cm
       ake\dependencies\RV_DEPS_BOOST.vcxproj]

@Andrej730
Copy link
Author

It fails on this command

./b2 -a -q toolset=msvc-14.3 cxxstd=17 variant=release link=shared threading=multi architecture=x86 address-model=64 --with-atomic --with-chrono --with-date_time --with-filesystem --with-graph --with-iostreams --with-locale --with-program_options --with-random --with-regex --with-serialization --with-system --with-thread --with-timer "-s NO_LZMA=1 -d+0" -j32 install --prefix=OpenRV/_build/RV_DEPS_BOOST/install && echo build finished

last lines from it's logs (files are actully copied and there are no errors after):

OpenRV\_build\RV_DEPS_BOOST\src\boost\hana\concept\monoid.hpp
Files copied:         1.
common.copy OpenRV\_build\RV_DEPS_BOOST\install\include\boost-1_80\boost\hana\concept\orderab
le.hpp

    copy /b "OpenRV\_build\RV_DEPS_BOOST\src\boost\hana\concept\orderable.hpp" + this-file-do
es-not-exist-A698EE7806899E69 "OpenRV\_build\RV_DEPS_BOOST\install\include\boost-1_80\boost\h
ana\concept\orderable.hpp"

OpenRV\_build\RV_DEPS_BOOST\src\boost\hana\concept\orderable.hpp
Files copied:         1.
common.copy OpenRV\_build\RV_DEPS_BOOST\install\include\boost-1_80\boost\hana\concept\product
.hpp

    copy /b "OpenRV\_build\RV_DEPS_BOOST\src\boost\hana\concept\product.hpp" + this-file-does
-not-exist-A698EE7806899E69 "OpenRV\_build\RV_DEPS_BOOST\install\include\boost-1_80\boost\han
a\concept\product.hpp"

OpenRV\_build\RV_DEPS_BOOST\src\boost\hana\concept\product.hpp
Files copied:         1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants