vcpkg
vcpkg copied to clipboard
[colmap] Build error
Host Environment
- OS: x64 Windows
- Compiler: MSVC 14.28.29910
- vcpkg-tool version: 2023-03-14-105f7f7e8a5ea10dfac9874ff9d1a6bacba5f454
- vcpkg-scripts version: ffe7360e0 2023-03-17 (18 hours ago)
- CUDA: 11.3
To Reproduce
Steps to reproduce the behavior:
./vcpkg install colmap[cuda]:x64-windows
Failure logs stdout-x64-windows.log
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
Any ideas would could be causing that problem?
Maybe help: https://forums.developer.nvidia.com/t/solved-nvcc-fatal-a-single-input-file-is-required-for-a-non-link-phase-when-an-outputfile-is-s/37807
@JonLiu1993 forward me here to help fixing my issue.
everything I try from those links give me similar error:
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j33
Working Directory: E:/Ai__Project/nerfstudio/vcpkg/buildtrees/colmap/x64-windows-dbg
See logs for more information:
E:\Ai__Project\nerfstudio\vcpkg\buildtrees\colmap\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)
ports/colmap/portfile.cmake:60 (vcpkg_cmake_install)
scripts/ports.cmake:147 (include)
error: building colmap:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+colmap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[colmap]+Build+error&body=Copy+issue+body+from+E%3A%2FAi__Project%2Fnerfstudio%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Any help please?
I am on Windows 11 RTX 4090
@Tobe2d Paths with special characters may cause NVCC
to interpret them as multiple files being passed in.
Mabye try to modify it to a standardized path and please provide the error log:
install-x64-windows-dbg-out.log
@Tobe2d Could you please try replacing the colmap
in your vcpkg\ports
directory with mine? I made a patch.
It seems that the upstream did not include when using the macro COLMAP_ADD_CUDA_SOURCES
to pass in the header file of cuda
https://github.com/colmap/colmap/blob/3.8/cmake/CMakeHelper.cmake#LL89C1-L107C34
Thanks @FrankXie05 I replaced the zip to colmap
in vcpkg\ports
I test building colmap and again got this:
error: building colmap:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+colmap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[colmap]+Build+error&body=Copy+issue+body+from+E%3A%2FAi__Project%2Fnerfstudio%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Errror log?
Failure logs
-- Using cached colmap-colmap-30da037ce19bdceb6d239c45342fadb221bdabb2.tar.gz. -- Cleaning sources at E:/nerfstudio/vcpkg/buildtrees/colmap/src/b221bdabb2-a77d7326e5.clean. Use --editable to skip cleaning for the packages you specify. -- Extracting source E:/nerfstudio/vcpkg/downloads/colmap-colmap-30da037ce19bdceb6d239c45342fadb221bdabb2.tar.gz -- Applying patch fix-dependencies.patch -- Applying patch fix-cuda-include.patch -- Using source at E:/nerfstudio/vcpkg/buildtrees/colmap/src/b221bdabb2-a77d7326e5.clean -- Found external ninja('1.11.0'). -- Configuring x64-windows-dbg -- Configuring x64-windows-rel -- Building x64-windows-dbg CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message): Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j33 Working Directory: E:/nerfstudio/vcpkg/buildtrees/colmap/x64-windows-dbg See logs for more information: E:\nerfstudio\vcpkg\buildtrees\colmap\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) ports/colmap/portfile.cmake:61 (vcpkg_cmake_install) scripts/ports.cmake:147 (include)
Hi @FrankXie05 I encountered similar issue and this is my error log after applying your colmap.zip patch to vcpkg/ports
install-x64-windows-dbg-out.log
I don't see an error in the log file you provided. Could you please provide the console output? @cheng-chi
@FrankXie05 Thanks for the fast reply! The errors are buried a little deep here. You can find them by searchring for nvcc fatal
in the file. One example error is:
FAILED: src/CMakeFiles/colmap_cuda.dir/mvs/gpu_mat_ref_image.cu.obj
C:\PROGRA~1\NVIDIA~2\CUDA\v11.7\bin\nvcc.exe -forward-unknown-to-host-compiler -DBOOST_ALL_DYN_LINK=1 -DCGAL_ENABLED -DCGAL_USE_GMPXX=1 -DCUDA_ENABLED -DEIGEN_INITIALIZE_MATRICES_BY_NAN -DGFLAGS_IS_A_DLL=1 -DGLOG_NO_ABBREVIATED_SEVERITIES -DGL_GLEXT_PROTOTYPES -DGUI_ENABLED -DIMATH_DLL -DOPENEXR_DLL -DOPENGL_ENABLED -DOPENMP_ENABLED -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DWIN32_LEAN_AND_MEAN -D_MWAITXINTRIN_H_INCLUDED -IC:\Users\cchi\vcpkg\buildtrees\colmap\src\b221bdabb2-a77d7326e5.clean\lib -IC:\Users\cchi\vcpkg\buildtrees\colmap\src\b221bdabb2-a77d7326e5.clean\src -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\eigen3 -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\qt5 -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\qt5\QtCore -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\tools\qt5\mkspecs\win32-msvc -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\qt5\QtOpenGL -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\qt5\QtWidgets -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\qt5\QtGui -isystem="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include" -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\webp -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\OpenEXR -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\Imath -isystem=C:\Users\cchi\vcpkg\installed\x64-windows\include\GKlib -D_WINDOWS -Xcompiler="/W3 /GR /EHsc" -D_FORCE_INLINES -Wno-deprecated-gpu-targets --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -Xcompiler="-MDd -Zi -Ob0 -Od /RTC1" -arch=native /EHsc -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -std=c++14 -MD -MT src\CMakeFiles\colmap_cuda.dir\mvs\gpu_mat_ref_image.cu.obj -MF src\CMakeFiles\colmap_cuda.dir\mvs\gpu_mat_ref_image.cu.obj.d -x cu -c C:\Users\cchi\vcpkg\buildtrees\colmap\src\b221bdabb2-a77d7326e5.clean\src\mvs\gpu_mat_ref_image.cu -o src\CMakeFiles\colmap_cuda.dir\mvs\gpu_mat_ref_image.cu.obj -Xcompiler=-Fdsrc\CMakeFiles\colmap_cuda.dir\colmap_cuda.pdb,-FS
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
@FrankXie05 Here's my console output:
./vcpkg install colmap[cuda]:x64-windows
Computing installation plan...
The following packages will be built and installed:
colmap[core,cuda]:x64-windows -> 2023-03-12#2
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from C:\Users\cchi\AppData\Local\vcpkg\archives in 95.3 us. Use --debug to see more details.
Installing 1/1 colmap:x64-windows...
Building colmap[core,cuda]:x64-windows...
-- Using cached colmap-colmap-30da037ce19bdceb6d239c45342fadb221bdabb2.tar.gz.
-- Cleaning sources at C:/Users/cchi/vcpkg/buildtrees/colmap/src/b221bdabb2-a77d7326e5.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/cchi/vcpkg/downloads/colmap-colmap-30da037ce19bdceb6d239c45342fadb221bdabb2.tar.gz
-- Applying patch fix-dependencies.patch
-- Applying patch fix-cuda-include.patch
-- Using source at C:/Users/cchi/vcpkg/buildtrees/colmap/src/b221bdabb2-a77d7326e5.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: C:/Users/cchi/vcpkg/downloads/tools/cmake-3.25.1-windows/cmake-3.25.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j25
Working Directory: C:/Users/cchi/vcpkg/buildtrees/colmap/x64-windows-dbg
See logs for more information:
C:\Users\cchi\vcpkg\buildtrees\colmap\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)
ports/colmap/portfile.cmake:61 (vcpkg_cmake_install)
scripts/ports.cmake:147 (include)
error: building colmap:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+colmap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[colmap]+Build+error&body=Copy+issue+body+from+C%3A%2FUsers%2Fcchi%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Could you please provide the file: C:\Users\cchi\vcpkg\buildtrees\colmap\config-x64-windows-dbg-out.log
?
@FrankXie05 Here you go! Unfortunately I don't have much experience with vcpkg
and windows programming in general. Sorry for not providing all information upfront
config-x64-windows-dbg-out.log
I ran in to this and the problem seems to be the stray /EHsc
passed to nvcc (the unquoted one). If I remove it, I can get a single nvcc command to run.
I haven't been able to able to make the project to compile, though. Patching away this line didn't help.
Issue is still present today. Following the steps to install nerfstudio on Windows, after compiling deps for over an hour, the COLMAP steps:
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install colmap[cuda]:x64-windows
just fail with the same error. --head
fails as well.
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
CUDA toolkit 11.8.
Hi, I have the same error here. Apparently it has something to do with VSCode and some spaces in the paths
Issue is still present today. Following the steps to install nerfstudio on Windows, after compiling deps for over an hour, the COLMAP steps:
git clone https://github.com/microsoft/vcpkg cd vcpkg bootstrap-vcpkg.bat vcpkg install colmap[cuda]:x64-windows
just fail with the same error.
--head
fails as well.nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
CUDA toolkit 11.8.
I am having this problem now also.
Hey all, I'm also getting a similar error. Has anyone managed to solve the issue? It's quite frustrating as I'd love to play with nerfstudio :/
error: building colmap:x64-windows failed with: BUILD_FAILED
Elapsed time to handle colmap:x64-windows: 59 s
Please ensure you're using the latest port files with git pull
and vcpkg update
.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+colmap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[colmap]+Build+error&body=Copy+issue+body+from+C%3A%2FUsers%2Fadrie%2FDocuments%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
For nerfstudio, you may be able to run conda install colmap
instead, or download it manually, and then point nerfstudio at the colmap binaries with ns-process-data video --colmap-cmd \path\to\colmap.exe
.
Another option is to run nerfstudio in WSL2. Then you can just add conda install colmap
to your install commands and it should just work.
I have not tested either of these, I ended up installing it on Linux instead.
conda install colmap Retrieving notices: ...working... done Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- colmap
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
:(
and even with the --colmap-cmd i get the following error : Could not find COLMAP. Please install COLMAP. See https://colmap.github.io/install.html for installation instructions.
conda install colmap Retrieving notices: ...working... done Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- colmap
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
:(
My bad, it's a conda-forge package, the correct command is:
conda install -c conda-forge colmap
and even with the --colmap-cmd i get the following error : Could not find COLMAP. Please install COLMAP. See https://colmap.github.io/install.html for installation instructions.
You need to actually specify the full path to colmap.exe in the --colmap-cmd. So you first need to have a working colmap through some other method (i.e. conda or manual download), and then you need to point nerfstudio at its location using --colmap-command
followed by the path to colmap.exe.
conda install -c conda-forge colmap -> that worked! thanks so much :D
Spoke too soon... it runs fine for part of the process and then it errors out with : Number of frames in video: 4698 Number of frames to extract: 314 [22:36:41] 🎉 Done converting video to images. process_data_utils.py:172 [22:39:12] 🎉 Done downscaling images. process_data_utils.py:362 ────────────────────────────────────────────── 💀 💀 💀 ERROR 💀 💀 💀 ─────────────────────────────────────────────── Error running command: colmap -h ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
this is the error window that pops up along with it
Ah, yes, welp. I ran into that as well, had it working for like 2 runs and then it broke again. That's when I decided to run it on Linux instead. I have no solution for that. You might have more luck with WSL2.
I decided to run it on Linux instead.
I am a total Linux idiot but have set it up before on a virtual machine. Could I run nerfstudio from Linux within a virtual machine?
Would it be possible to install Linux on my machine and dual-boot between Windows 11 and Linux?