Compiling source: COLMAP make failed at 96%

1,074 views
Skip to first unread message

abai...@gmail.com

unread,
Jul 12, 2018, 5:47:51 PM7/12/18
to COLMAP
Hello,

I am relatively new to Linux and am seeking some foolproof advice for installing COLMAP on Ubuntu 16.04. I have followed the instructions here:


However, It crashes with an error at 96% completion. For trial and error sake, I have started from scratch 3 times now and I still get the same error. The error looks like this:

/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
CMake Error at colmap_cuda_generated_patch_match_cuda.cu.o.cmake:266 (message):
  Error generating file
  /home/thepandyman/colmap/build/src/CMakeFiles/colmap_cuda.dir/mvs/./colmap_cuda_generated_patch_match_cuda.cu.o


src/CMakeFiles/colmap_cuda.dir/build.make:77: recipe for target 'src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_patch_match_cuda.cu.o' failed
make[2]: *** [src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_patch_match_cuda.cu.o] Error 1
CMakeFiles/Makefile2:1000: recipe for target 'src/CMakeFiles/colmap_cuda.dir/all' failed
make[1]: *** [src/CMakeFiles/colmap_cuda.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I appreciate any advice in advance!

-Andrew

ale.p...@gmail.com

unread,
Jul 22, 2018, 12:39:06 PM7/22/18
to COLMAP
I resolved adding
 -D_FORCE_INLINES
to line 188 of CMakeLists.txt
resulting in
        set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -D_FORCE_INLINES -Wno-deprecated-gpu-targets")

norge...@gmail.com

unread,
Jul 22, 2018, 1:04:29 PM7/22/18
to COLMAP
Dude!!

I was just trying to insall colmap on my machine, and looked on Google for this exact problem.

Your post, posted 14 minutes before I found it, just saved me, so thanks for sharing, and +1 I guess!

Good colmaping!

Johannes Schönberger

unread,
Jul 22, 2018, 2:08:51 PM7/22/18
to COLMAP
Thanks for reporting the fix. It seems like this is a common issue under some combinations of GCC/CUDA. I already added the flag to some of the subfolders, but now also enabled the flag globally for all COLMAP CUDA code with the most recent commit in the dev branch. Let me know if the code compiles now without any manual change on your side. Thanks.

Cheers, Johannes

Alessandro Proglio

unread,
Jul 23, 2018, 7:48:23 AM7/23/18
to col...@googlegroups.com
I confirm that now it compiles.
current dev branch and Ceres 1.14
Alessandro

--
You received this message because you are subscribed to a topic in the Google Groups "COLMAP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/colmap/wv5ZpDqisUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to colmap+unsubscribe@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/645adcee-0347-4a28-8a25-3e519bece391%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Johannes Schönberger

unread,
Jul 23, 2018, 7:52:09 AM7/23/18
to col...@googlegroups.com

Great, thanks for the feedback!

To unsubscribe from this group and all its topics, send an email to colmap+un...@googlegroups.com.


To post to this group, send email to col...@googlegroups.com.

 

--
You received this message because you are subscribed to the Google Groups "COLMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.


To post to this group, send email to col...@googlegroups.com.

Andrew Baird

unread,
Jul 23, 2018, 2:22:22 PM7/23/18
to col...@googlegroups.com
I can also confirm that it now compiles without any issues using the latest version of the dev branch. Thank you!!

Regards,
Andy

Eren Yıldız

unread,
Aug 3, 2022, 8:18:14 AM8/3/22
to COLMAP
I got this with Cuda 11.7 and Ceres 2.1. Following the instructions precisely, still colmap would not get installed.

oi o

unread,
Sep 19, 2022, 9:25:28 PM9/19/22
to COLMAP
Me too, I also got this error.
Reply all
Reply to author
Forward
0 new messages