<div id="geary-body"><div>Hello,</div><div><br></div><div>I was able to build RTK using Cuda 9 on an Arch Linux machine with gcc 6.4 with only small modifications:</div><div><div> </div><div> #=========================================================</div><div>diff --git a/cmake/nvcc-check.cmake b/cmake/nvcc-check.cmake</div><div>index c625b421..0e5c34e9 100644</div><div>--- a/cmake/nvcc-check.cmake</div><div>+++ b/cmake/nvcc-check.cmake</div><div>@@ -46,6 +46,9 @@ if(CUDA_FOUND)</div><div> if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC) OR APPLE)</div><div> # Compatible gcc can be checked in host_config.h</div><div> set(GCC_PATH "")</div><div>+ if(${CUDA_VERSION} VERSION_GREATER "8.99")</div><div>+ FIND_GCC(GCC_PATH "6" "4")</div><div>+ endif()</div><div> if(${CUDA_VERSION} VERSION_GREATER "6.99")</div><div> FIND_GC
C(GCC_PATH "4" "9")</div><div> endif()</div></div><div><br></div><div><br></div><div>In addition I had to set CMAKE_CXX_FLAGS to -std=gnu++11 manually in the ccmake dialog (unfortunately I was not able to integrate this in the top-level CMakeLists so far, CMake simply ignored it there..).</div><div><br></div><div>So far, so good. Unfortunately all Cuda tests fail with the same segfault. For example, rtkimportcudatest finishes with</div><div><br></div><div><div>****** Case 1: unsigned short ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 2: int ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB<
/div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 3: float ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 4: double ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></di
v><div>Test PASSED! </div><div>Segmentation fault (core dumped)</div></div><div><br></div><div>To further investigate what is going wrong here, I ran valgrind. I think the most important message is this:</div><div><br></div><div><div>==30633== Process terminating with default action of signal 11 (SIGSEGV): dumping core</div><div>==30633== Access not within mapped region at address 0x8</div><div>==30633== at 0x12240072: (anonymous namespace)::ObjectFactoryBasePrivateInitializer::~ObjectFactoryBasePrivateInitializer() (in /home/mathis/dev/RTK/RTK-bin/bin/libRTK.so)</div><div>==30633== by 0x1402B7B1: __cxa_finalize (in /usr/lib/libc-2.26.so)</div><div>==30633== by 0x121771D3: ??? (in /home/mathis/dev/RTK/RTK-bin/bin/libRTK.so)</div><div>==30633== by 0x400FB92: _dl_fini (in /usr/lib/ld-2.26.so)</div><div>==30633== by 0x1402B447: __run_exit_handlers (in /usr/lib/libc-2.26.so)</div><div>==30633== by 0
x1402B499: exit (in /usr/lib/libc-2.26.so)</div><div>==30633== by 0x14014F50: (below main) (in /usr/lib/libc-2.26.so)</div><div>==30633== If you believe this happened as a result of a stack</div><div>==30633== overflow in your program's main thread (unlikely but</div><div>==30633== possible), you can try to increase the size of the</div><div>==30633== main thread stack using the --main-stacksize= flag.</div><div>==30633== The main thread stack size used in this run was 8388608.</div></div><div><br></div><div>I've put the full log here: <a href="https://pastebin.com/CBjJmUpB">https://pastebin.com/CBjJmUpB</a></div><div><br></div><div>Does someone have any idea, what is going wrong here?</div><div><br></div><div>Thanks for any help!</div><div>Mathis</div></div>