-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
Problems building AliceVision v3.2.0 for Win x64 #1817
Comments
I have had very similar difficulties to build AliceVision on Windows x64.
I think the INSTALL.md should be revisited:
Moreover, the CI seems broken, so we cannot retrieve snapshots. In any case, building AliceVision on win64 seems trickier than suggested by the Install instructions. |
This is how I did it a few releases ago: Alicevision Requires vcpkg and Visual Studio 2017 (run x64 Native Tools Command Prompt for VS 2017, as admin) Use the English language version only! install vcpkg and install all vcpkg packages as described in the alicevision readme cd [PATH-TO-FOLDER] git clone --recursive https://github.com/alicevision/aliceVision.git cd alicevision mkdir build cd build set VCPKG_ROOT=C:\path\to\vcpkg cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 15 2017" -A x64 -T host=x64 DO NOT RENAME THE FOLDER OR CHANGE THE FOLDER PATH BEFORE BUILDING! (ABSOLUTE FILE PATHS ARE STORED!) In file browser go to [PATH-TO-FOLDER]/aliceVision/build -> open alicevision.sln in VS2017 In VS2017 -> change from develop to release and x64 In Solution Explorer right-click on Solution 'aliceVision' (??? projects) -> Build This will take a few minutes You can find the compiled files in [PATH-TO-FOLDER]\aliceVision\build\Windows-AMD64\Release "Moreover, the CI seems broken, so we cannot retrieve snapshots." |
Thank you for your detailed reply.
It started to build and then failed with one of the first packages -- assimp -- provoking the following error: |
So I have finally sucessfully built AliceVision, below are all the steps I took. This is very close to the official INSTALL.md instructions, but with more explanations to (hopefully) prevent other people from making mistakes. Following the requirements (CMake >= 3.11 and Git installed), using a terminal window
git clone https://github.com/alicevision/vcpkg --branch alicevision_master
cd vcpkg
.\bootstrap-vcpkg.bat
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_PLATFORM_TOOLSET v142) One can try to skip the Debug build by adding
:: In cmd
set VCPKG_ROOT=%cd% # In Powershell
`$VCPKG_ROOT = $PWD.Path
.\vcpkg install boost-algorithm boost-accumulators boost-atomic boost-container boost-date-time boost-exception boost-geometry boost-graph boost-json boost-log boost-program-options boost-property-tree boost-ptr-container boost-regex boost-serialization boost-system boost-test boost-thread boost-timer boost-format lz4 liblemon openexr alembic geogram eigen3 expat flann nanoflann onnxruntime-gpu opencv[eigen,ffmpeg,webp,contrib,nonfree,cuda] openimageio[opencolorio,pybind11,libraw,ffmpeg,freetype,opencv,gif,openjpeg,webp] openmesh ceres[suitesparse,cxsparse] cuda tbb assimp pcl clp libe57format --triplet x64-windows-vs2019 This will build more than 200 packages, which will take a while ( 3-4 hours, probably more if Debug build is performed for all dependencies).
cd ..
git clone https://github.com/alicevision/AliceVision.git --recursive
cd AliceVision
mkdir build
cd build
:: In cmd
cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DALICEVISION_USE_OPENCV=ON -DVCPKG_TARGET_TRIPLET=x64-windows-vs2019 -G "Visual Studio 16 2019" -A x64 -T host=x64 # In Powershell
cmake .. -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT"\scripts\buildsystems\vcpkg.cmake -DALICEVISION_USE_OPENCV=ON -DVCPKG_TARGET_TRIPLET=x64-windows-vs2019 -G "Visual Studio 16 2019" -A x64 -T host=x64 One can also change the installation and bundle destinations by adding to the command above
|
@atracsys-sbt Thanks for sharing! It would be great if you could contribute this to https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md |
Hi all,
I'm trying to build the last version (currently v3.2.0) of AliceVision library for Windows x64. I've encountered an error when building the library with Visual Studio. That's my situation:
I've CUDA installed, several versions (11.2, 11.6, 12.6 and 12.8). I switch among them by setting the PATH environment variable. I' ve checked this by typing
nvcc --version
.I have Visual Studio Community 2017, 2019 and 2022. Although I have realized that the 2022 version gives me CUDA compatibility problems, so I have ruled it out. Maybe I should use version 2022? But how do I need to configure my system to not to have problems with the
OpenCV
compilation with CUDA throughVCPKG
?The only combination that has allowed me to compile OPENCV with CUDA is: CUDA 11.2 + VISUAL STUDIO 2019.
I'm taking into account that, for the compilation of the dependencies with
VCPKG
and for Alicevision himself, I'm using the Visual Studio terminal:Developer Command Prompt for VS <version>
. With this I intend to make sure that all the environment variables are being configured correctly.I'm not sure if I should use Visual Studio 2019 because in the instructions for the installation of Alicevision does not mention it ... only
Visual 2022 + Powershell
,Visual 2022
andVisual 2017
.With the
vcpkg
forked of Alicevision cloned with git within the repo itself that I have cloned from Alicevision (\Alicevision\vcpkg\
), I have managed to compile all the dependencies with the command:However, when I launch
Cmake
to configure the entire Alicevision project from the folder``\AliceVision\build`:I get the following output:
The thing I see is that
cmake
is not correctly linking the libraries, although I think it is the way they show the versions...Should I modify any
CMakeLists.txt
to alter the configuration or libraries that must be taken? I have seen that by default:trilean_option(ALICEVISION_USE_OPENCV "Enable use of OpenCV algorithms" OFF)
, I should turn itON
, I understand that OPENCV is practically a requirement for everything to work.However, it doesn't warn me of any error, so I proceed to open the solution generated with Visual Studio 2019, I selected
Release x64
and I make aBuild
of the entire solution. The program compiles but many errors jump, in the following style:I think the problem is that I'm mixing Visual Studio versions during the dependencies installation.
Please, could anyone describe the compilation flow that I have to follow together with the versions of CUDA, Visual Studio... that I have to dispose? I'm learning and I'm a little confused with what I must to do. Maybe the
INSTALL.md
is outdated.Thank you very much in advance.
The text was updated successfully, but these errors were encountered: