AliceVision icon indicating copy to clipboard operation
AliceVision copied to clipboard

Problems building AliceVision v3.2.0 for Win x64

Open jpasfol opened this issue 11 months ago • 18 comments

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 through VCPKG?

  • 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 and Visual 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:

    vcpkg install boost-algorithm boost-accumulators boost-atomic boost-container boost-date-time boost-exception boost-filesystem 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 lz4 liblemon openexr alembic geogram eigen3 expat flann onnxruntime-gpu opencv[eigen,ffmpeg,webp,contrib,nonfree,cuda] openimageio[libraw,ffmpeg,freetype,opencv,gif,openjpeg,webp] ceres[suitesparse,cxsparse] cuda tbb assimp pcl clp --triplet x64-windows
    
  • However, when I launch Cmake to configure the entire Alicevision project from the folder``\AliceVision\build`:

    # Visual Studio 2019
    cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 16 2019" -A x64 -T host=x64
    

    I get the following output:

    ...
    
    -- EIGEN:
    -- CERES: 2.1.0
    -- FLANN:
    -- CLP: 1.16.11
    -- COINUTILS: 2.10.14
    -- OSI: 0.107.9
    -- LEMON:
    
    ...
    

    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 it ON, 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 a Build of the entire solution. The program compiles but many errors jump, in the following style:

    Error LNK2019 unresolved external symbol "__declspec(dllimport) private: static unsigned int __cdecl boost::log::v2_mt_nt6::attribute_name::get_id_from_string(char const *)" (__imp_?get_id_from_string@attribute_name@v2_mt_nt6@log@boost@@CAIPEBD@Z) referenced in function "private: __cdecl aliceVision::system::Logger::Logger(void)" (??0Logger@system@aliceVision@@AEAA@XZ)	aliceVision_system	C:\Repos\AliceVision\build\src\aliceVision\system\Logger.obj	1
    
    Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: static void __cdecl boost::log::v2_mt_nt6::record_view::public_data::destroy(struct boost::log::v2_mt_nt6::record_view::public_data const *)" (__imp_?destroy@public_data@record_view@v2_mt_nt6@log@boost@@SAXPEBU12345@@Z)	aliceVision_image	C:\Repos\AliceVision\build\src\aliceVision\image\cache.obj	1
    
    Error	C2338	You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Repos\AliceVision\src\aliceVision\lightingEstimation\lightingCalibration.cpp)	aliceVision_lightingEstimation	C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\type_traits	1271
    
  • 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.

jpasfol avatar Jan 29 '25 15:01 jpasfol

I have had very similar difficulties to build AliceVision on Windows x64.

  1. I tried building the solution using the AliceVision's vcpkg fork and VS 2022 but Cuda 12.x gives errors (related to opencv indeed).
  2. Using Cuda 11.x requires VS 2019, which I installed and specifically chose as the compiler using a dedicated vcpkg triplet. This works fine to generate the solution, but the compilation is full of link errors.
  3. I tried manually generating the solution by compiling/targetting all the dependencies, but this takes a loooot of time as the dependencies (and their own dependencies) are numerous. And I have still not yet successfully compiled using this route.

I think the INSTALL.md should be revisited:

  • to include more specific version requirements (especially for Cuda);
  • to potentially add instructions to successfully compile with VS 2019 when it is installed along side other versions of Visual Studios;
  • to detail a successful path to compilation with VS 2022, if possible, as implied by the provided command lines to generate the final solution:
# Windows: Visual 2022 + Powershell
cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT"\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 17 2022" -A x64 -T host=x64

# Windows: Visual 2022
cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 17 2022" -A x64 -T host=x64

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. Any help would be greatly appreciated. Thank you.

atracsys-sbt avatar Feb 18 '25 11:02 atracsys-sbt

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." Yes, now Github Actions CI is used. It works but making the build available is not implemented. https://github.com/alicevision/AliceVision/actions/workflows/continuous-integration.yml Example: https://github.com/alicevision/AliceVision/actions/runs/13396074373/job/37415331865

natowi avatar Feb 18 '25 19:02 natowi

Thank you for your detailed reply. So, I have followed to the best of my abilities what you described:

  1. I installed VS 2017 (and even removed all other versions)
  2. As per the current Install instructions, I cloned AliceVision's fork of vcpkg
  3. I opened the x64 Native Tools Command Prompt for VS 2017, as admin and in English, ran the boostrap and then entered the exact build line listed in the Install instructions: 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

It started to build and then failed with one of the first packages -- assimp -- provoking the following error: error C2039: 'max': is not a member of 'std' Addressing this error is apparently easy, by just adding #include <algorithm>, but I don't think starting to edit sources is the correct fix in our more global compilation issue.

atracsys-sbt avatar Feb 19 '25 12:02 atracsys-sbt

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 cmd or Powershell (I used regular Powershell, not admin):

  1. Get AliceVision's fork of vcpkg. I was on tag "2024.05.22", maybe it could also work with more recent tags.
git clone https://github.com/alicevision/vcpkg --branch 2024.05.22
  1. Head into the newly created vcpkg folder and run the bootstrap:
cd vcpkg
.\bootstrap-vcpkg.bat
  1. I think most people would want to use Cuda in AliceVision, but Cuda 12 seems incompatible with the current version of the dependencies, so use Cuda 11.x (I used 11.8). Make sure that the environment variables are set accordingly (CUDA_PATH set to path\to\CUDA\v11.x and path\to\CUDA\v11.x\bin & libnvvp highest in the variable Path).

  2. Due to the conflict between Cuda 11.x and Visual Studio 2022, I recommend using Visual Studio 2019. If there are other versions of Visual Studio installed, the compilation with VS 2019 can be enforced by creating a custom vcpkg triplet named, for example, x64-windows-vs2019.cmake (no uppercase!) in vcpkg\triplets with the following content:

# Custom triplet to create and add to vcpkg\triplets
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 set(VCPKG_BUILD_TYPE release) to the triplet file, but apparently it is not supported by all dependencies, so some significant Debug build will unfortunately remain.

  1. Still from the vcpkg folder, store its root path (used later)
:: In cmd
set VCPKG_ROOT=%cd%
# In Powershell
$VCPKG_ROOT = $PWD.Path
# or
$VCPKG_ROOT = get-location
  1. Build the dependencies by executing the following command:
.\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).

  1. Using the same terminal, get the actual AliceVision source (I prefer to change directory though and not to clone it inside the vcpkg folder). This will checkout the default branch develop, not the master. I was only able to successfully build on the develop branch. I also suggest to checkout the same commit with a git reset:
cd ..
git clone https://github.com/alicevision/AliceVision.git --recursive
git reset --hard 23975d2be602b43eb268fc033695cdca0590ad89
  1. Go inside AliceVision, create a build folder and move into it:
cd AliceVision
mkdir build
cd build
  1. Generate the solution using CMake, based on the vcpkg dependencies. I added the OpenCV use to the configuration, otherwise I am missing the aliceVision_lightingEstimation lib during build. Make sure the triplet name is correct.
:: 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 -DCMAKE_INSTALL_PREFIX=C:\path\to\install and -DALICEVISION_BUNDLE_PREFIX=C:\path\to\bundle respectively. The installation will contain the whole AliceVision package (all binaries including static libs as well as the includes, share files, etc). The bundle will contain only what's necessary to run AliceVision (executables, dlls, etc.) akin to what's included in Meshroom.

  1. Open the AliceVision.sln generated in the build folder with Visual Studio 2019 using the English language. Select "Release" as build type and build the solution. It should take around 20-30 min. Once done, the binaries should be in build\Windows-AMD64. Build the "INSTALL" project to package the whole library in CMAKE_INSTALL_PREFIX, or build the "Packaging\bundle" project to bundle only the executables and dlls in ALICEVISION_BUNDLE_PREFIX.

atracsys-sbt avatar Feb 21 '25 10:02 atracsys-sbt

@atracsys-sbt Thanks for sharing! It would be great if you could contribute this to https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md

natowi avatar Feb 23 '25 07:02 natowi

Hey @atracsys-sbt and @natowi,

Thank you so much for your help. Finally I managed building succesfully AliceVision following your steps!

I would like to mention some things that worked for me:

  • I think that one key point is doing git checkout develop, seems like the commit with the tag v3.2.0 is broken...
  • Use PowerShell, the version can be displayed after using get-host, in my case Version: 5.1.26100.2161.
    • Set the environment variable VCPKG_ROOT with $env:VCPKG_ROOT = get-location. (I think pwd also works for getting the current path).
  • In my case, I hadn't available the triplet --triplet x64-windows-vs2019 but --triplet x64-windows worked perfect when installing the dependencies with vcpkg.
  • When launching cmake on PowerShell: cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT"\scripts\buildsystems\vcpkg.cmake -DALICEVISION_USE_OPENCV=ON -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 16 2019" -A x64 -T host=x64.
  • Remember to use Visual Studio 2019 with English language, in other case, errors will appear during building.

Hope this works for more people!

jpasfol avatar Feb 26 '25 08:02 jpasfol

@jpasfol Glad to learn you successfully build it too ! I have already updated my instructions based on your feedback. Indeed the main issue seemed to have been the branch, luckily develop is the one by default upon cloning (so normally you don't need to specifically checkout). The triplet --triplet x64-windows-vs2019 was for you to create (I clarified that), but I'm surprised then you managed to compile with --triplet x64-windows. What versions of Visual Studio did you have installed ? And what version of Cuda was used for the compilation ?

atracsys-sbt avatar Feb 26 '25 09:02 atracsys-sbt

@atracsys-sbt Thanks for sharing! It would be great if you could contribute this to https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md

@natowi I'd be happy to PR the INSTALL.md once I have more confidence in my findings. For example, @jpasfol managed to compile the dependencies without specifying VS 2019 in the vcpkg triplet. Awaiting their answer.

atracsys-sbt avatar Feb 26 '25 09:02 atracsys-sbt

@atracsys-sbt answering yor questions:

  • I have installed only Visual Studio Community 2019 - 16.11.44.
  • And I have installed only Cuda 11.8.

Hope this helps.

jpasfol avatar Feb 26 '25 10:02 jpasfol

The instructions from @atracsys-sbt really helped a lot. Couple of notes from myself, as I'm not quite at the finish line.

  • "Ceres has no feature named cxsparse". Removing this from the vcpkg install line got me to next stages.
  • Stuck on 1 remaining error when building in Visual Studio with AliceVision_depthMap.lib not being built.

Tried on Visual Studio Community 2019 16.11.45 and Cuda 11.8

The only error that stands out in the build is this. Where NVCC gives a fatal error. Search mentions that C++20 was added to Cuda12, should I be using C++17 here instead?

59>------ Build started: Project: aliceVision_depthMap, Configuration: Release x64 ------ 60>------ Build started: Project: aliceVision_exportMatlab_exe, Configuration: Release x64 ------ 61>------ Build started: Project: aliceVision_exportMeshlab_exe, Configuration: Release x64 ------ 62>------ Build started: Project: aliceVision_exportMeshroomMaya_exe, Configuration: Release x64 ------ 63>------ Build started: Project: aliceVision_exportPMVS_exe, Configuration: Release x64 ------ 64>------ Build started: Project: aliceVision_featureExtraction_exe, Configuration: Release x64 ------ 59>Building NVCC (Device) object src/aliceVision/depthMap/CMakeFiles/aliceVision_depthMap.dir/cuda/device/Release/aliceVision_depthMap_generated_DeviceCameraParams.cu.obj 59>nvcc fatal : Value 'c++20' is not defined for option 'std' 59>CMake Error at aliceVision_depthMap_generated_DeviceCameraParams.cu.obj.Release.cmake:220 (message): 59> Error generating 59> D:/tools/github/AliceVision/build/src/aliceVision/depthMap/CMakeFiles/aliceVision_depthMap.dir/cuda/device/Release/aliceVision_depthMap_generated_DeviceCameraParams.cu.obj 59> 59> 59>D:\Programs\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\device\DeviceCameraParams.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\device\DevicePatchPattern.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\imageProcessing\deviceGaussianFilter.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\imageProcessing\deviceColorConversion.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\imageProcessing\deviceMipmappedArray.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\planeSweeping\deviceDepthSimilarityMap.cu;D:\tools\github\AliceVision\src\aliceVision\depthMap\cuda\planeSweeping\deviceSimilarityVolume.cu;D:\tools\github\AliceVision\build\CMakeFiles\532cc3d70a1c0e804a5269255218d144\aliceVision_depthMap_intermediate_link.obj.rule' exited with code 1. 59>Done building project "aliceVision_depthMap.vcxproj" -- FAILED. 65>------ Build started: Project: aliceVision_depthMapEstimation_exe, Configuration: Release x64 ------

earlywill avatar Mar 27 '25 14:03 earlywill

I have also noticed the issue with cxsparse in my latest build attempts for the dependencies. I think this is because the vcpkg fork is still under active development and is being updated very regularly to prep the upcoming 3.3 version of Alicevision. Same goes for your C++20 error I think.

Edit: indeed, I checked what was the commit I used when I successfully built AliceVision in the first place and it was the tag '2024.05.22'. With a fresh clone of vcpkg and making sure that I was on this commit, I was able to build ceres no problem using .\vcpkg install ceres[suitesparse,cxsparse] --triplet x64-windows-vs2019.

@jpasfol Could you check what was the vcpkg commit you used when you successfully built ?

I will update my build instructions above to specify the commits I used that led to the successful build, for both vcpkg and AliceVision.

@cbentejac Do you think updating the INSTALL.md with such details would be worth while waiting for the new release ?

atracsys-sbt avatar Mar 28 '25 09:03 atracsys-sbt

Hi,

First of all: thanks to all of you for your very useful feedback on the build process!

A few notes regarding the issues some of you have encountered:

  • There is a known issue for CUDA versions <= 12.4 and MSVC 19.40 and over (this corresponds to Visual Studio 2022 v17.10 and over) that cause compilation errors. (https://stackoverflow.com/questions/78515942/cuda-compatibility-with-visual-studio-2022-version-17-10)

    • Workarounds include downgrading the MSVC version, upgrading to CUDA 12.5 or adding the following NVCC compilation flags: --allow-unsupported-compiler and ALLOW_COMPILER_AND_STL_VERSION_MISMATCH.
    • By applying any of these workarounds, compiling AliceVision with CUDA 11.x or 12 and Visual Studio 22 becomes possible.
  • We recently moved to C++20, which is indeed not supported by CUDA versions prior to 12.0. To build AliceVision as is, CUDA >= 12.0 is required. If you want to keep on using a version of CUDA 11.x, this line should be edited: https://github.com/alicevision/AliceVision/blob/develop/src/CMakeLists.txt#L736

  • The issue with aliceVision_lightingEstimation when building AliceVision without OpenCV is a bug, which will be fixed by this pull request: https://github.com/alicevision/AliceVision/pull/1855 (sorry that you ran into it, it'll be fixed thanks to you!).

  • ceres indeed doesn't have any cxsparse feature anymore, so it needs to be removed from the vcpkg install... command line. Our fork for vcpkg is regularly updated to get the latest version updates from Microsoft, and the removal of the cxsparse feature is quite recent, which explains why it was still working on the 2024.05.22 tag. By the way, we're tagging the repository every time we're updating something in the fork that changes the build result (may it be an update for a version, a custom patch, etc.). Generally, there is a pull request that appears around the same date and that updates the continuous integration for Windows.

  • The commit for v3.2.0 should normally be working, provided the matching dependencies and installation instructions are used. The corresponding tag in our vcpkg fork is Meshroom2023.3.0, but we cannot guarantee that it still works: some vcpkg ports break over time, and there's not much we can do on our side to keep them running, since we are not using vcpkg in manifest mode. If you're willing to build AliceVision yourself, you might as well use the develop branch (and the latest tag on our vcpkg fork to build the dependencies).

  • Overall we recommend using Visual Studio 2022 as well as the "x64 Native Tools Command Prompt for VS 2022" rather than older versions of Visual Studio or the Powershell.

Last but not least, we provide a zip file that contains all the vcpkg precompiled dependencies for Windows x64. The most recent versions are available directly on our vcpkg fork as releases (previous versions were hosted on a GitLab repository, but we will release them directly on GitHub from now on). The archive contains the "installed" folder (generated when vcpkg builds libraries) and simply needs to be unzipped in the vcpkg folder (vcpkg needs to have been bootstrapped). Basically that would translate to:

git clone https://github.com/alicevision/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
UNZIP HERE

The one thing to pay attention to when using it is that the dependencies are compiled with a specific version of CUDA (which we indicate in the "release note" for the archive), meaning they may be unusable if you have another CUDA version installed; currently we're using CUDA 12.5. As a side note, the archive is what we're using for the dependencies in the CI.

The INSTALL.md DEFINITELY needs to be updated with all of the points you mentioned (and then some!), I am working on it. 😇 I'm also hoping I'll be able to do a full check on the vcpkg install... to ensure that we're not installing a single package that is not needed by AliceVision.

cbentejac avatar Apr 02 '25 14:04 cbentejac

Thank you very much for the very detailed answer ! I was literally building the head of develop just now, to find out if there is still some randomness in the results of FeatureMatching. I will try to compile everything again as per your instructions.

atracsys-sbt avatar Apr 02 '25 15:04 atracsys-sbt

So I tried building AliceVision from the develop branch using the precompiled binaries and Cuda 12.5.40, and I had a build issue with aliceVision_depthMap (see below). I used the same cmake command used in the CI and I don't really understand why I wouldn't get to the same result.

142>deviceGaussianFilter.cu 142>CUSTOMBUILD : nvcc error : 'cudafe++' died with status 0xC0000409

Edit: updating CMake to 4.0 and MSVC to v143 did the trick and I could successfully compile the latest AliceVision.

atracsys-sbt avatar Apr 03 '25 13:04 atracsys-sbt

I'm trying the same now (VS22, CUDA 12.5, precompiled binaries, etc). Currently running cmake under 3.25, so I'll see if I get same depthMap issue.

earlywill avatar Apr 03 '25 19:04 earlywill

Had issues with imageMatching.lib not existing when built under cmake 3.25.1, switching up to 4.0 got a successful build.

At the moment, latest Meshroom isn't loading the pipelines and nodes. I not the these were moved recently from Meshroom repo to Alicevision.

%BUNDLE_PATH%/lib/meshroom/node did contain pyc files. %BUNDLE_PATH%/lib/meshroom/pipelines did not exist.

I've tried copying them in from the alicevision repo, but still nothing.

At the moment my bat file is setting the following. Where D:\programs\Meshroom\bundle is what I'm using as %BUNDLE_PATH%

set PATH=D:\programs\Meshroom\bundle\bin;D:\tools\github\vcpkg\installed\x64-windows\bin;%PATH% set ALICEVISION_ROOT=D:\programs\Meshroom\bundle

earlywill avatar Apr 04 '25 13:04 earlywill

Figured it out. I had set custom paths for MESHROOM_NODES_PATH and MESHROOM_PIPELINE_TEMPLATES_PATH. The release version of Meshroom appends that to the default locations, I think I was expecting the same with develop.

Adding this got things going.

set MESHROOM_NODES_PATH=D:\programs\Meshroom\bundle\lib\meshroom\nodes set MESHROOM_PIPELINE_TEMPLATES_PATH=D:\programs\Meshroom\bundle\lib\meshroom\pipelines

earlywill avatar Apr 04 '25 13:04 earlywill

Notes. Progression from today.

I need to use the ldr2hdr nodes. Getting the following error.

ERROR:root:Error while loading 'D:\programs\Meshroom\bundle\lib\meshroom\pipelines\panoramaFisheyeHdr.mg'.
ERROR:root:Traceback (most recent call last):
  File "D:\tools\github\Meshroom\meshroom\ui\reconstruction.py", line 555, in _loadWithErrorReport
    loadFunction(filepath)
  File "D:\tools\github\Meshroom\meshroom\ui\graph.py", line 470, in initFromTemplate
    graph.initFromTemplate(filepath, publishOutputs=publishOutputs)
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 258, in initFromTemplate
    self._deserialize(Graph._loadGraphData(filepath))
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 164, in inner
    return func(self, *args, **kwargs)
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 290, in _deserialize
    with GraphModification(self):
  File "D:\Programs\Python310\lib\contextlib.py", line 142, in __exit__
    next(self.gen)
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 60, in GraphModification
    graph.updateEnabled = enabled
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 458, in updateEnabled
    self.update()
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 1399, in update
    self.updateInternals()
  File "D:\tools\github\Meshroom\meshroom\core\graph.py", line 1364, in updateInternals
    node.updateInternals()
  File "D:\tools\github\Meshroom\meshroom\core\node.py", line 1016, in updateInternals
    self.nodeDesc.update(self)
  File "D:\programs\Meshroom\bundle\lib\meshroom\nodes\aliceVision\LdrToHdrSampling.py", line 196, in update
    from pyalicevision import hdr as avhdr
ModuleNotFoundError: No module named 'pyalicevision'

Re-run with -DALICEVISION_BUILD_SWIG_BINDING=ON flag. Build goes through. I now have _pydalicevision.pyd and pyalicevision.py both inside bundle/bin . Still getting errors, discover I had Python3.10 set in my path instead of 3.11.

Go back redo the requirements.txt and dev_requirements.txt. Have trouble with cx_freeze. That's fixed by upgrading wheel, setuptools and pip via pip install wheel setuptools pip --upgrade and then running pip install cx_logging before pip install cx_freeze.

I'm think my computer needs a reboot, cause now it's complaining about shiboken6 not importing.

earlywill avatar Apr 04 '25 18:04 earlywill