spaint
spaint copied to clipboard
Problems when building spaint project
-
A file called "DeviceType.h" is missing. I think it should have appeared in /InfiniTAM/ORUtils/, however I cannot find it. How can I get access to this file?
-
My computer doesn't have NVIDIA, so I want to disable CUDA. I unflagged "WITH_CUDA" when configuring with CMake, however when compiling with Xcode, it still raises errors like "Use of undeclared identifier 'cudaSetDevice'". What can I do?
Thank you very much
- Have you updated InfiniTAM? The latest version (on the infinitam_v3.5 branch) has the file there:
https://github.com/victorprad/InfiniTAM/tree/infinitam_v3.5/ORUtils
- I'll investigate - there may be a missing preprocessor guard somewhere. Did Xcode tell you where the error occurred?
You have to turn off WITH_CUDA in InfiniTAM also and rebuild that first btw, if you haven't.
Ok, so re. (2), BackgroundRelocaliser
shouldn't have been being built in non-CUDA mode, since it's there to let you run relocalisation on a secondary GPU. I've modified the CMake script accordingly - hopefully should work now.
@uni4th If you get a chance, please could you test whether that fixes the problem for you? If so, I'll close off the issue.
@sgolodetz Thank you very much for your reply. The problem with cuda is now solved, however I'm coming up with a new problem. When building spaintgui with Xcode, there is a warning "libstdc++ is deprecated; move to libc++ [-Wdeprecated]", and errors "Undefined symbols for architecture x86_64". (I have already switch C++ Standard Library into libstdc++) What can I do now? My system is MacOS High Sierra 10.13.3, Xcode Version is 9.3
There was an issue with the C++ Standard Library on Mavericks (which is what I have on my laptop). I don't have access to a High Sierra system on which to get things working unfortunately, but if you do a search through the scripts for libstdc++, it should be possible to modify them to make everything build with libc++ again instead of libstdc++ (I was forcing it to the latter on Mavericks). A good starting point is probably:
https://github.com/torrvision/spaint/blob/master/cmake/Flags.cmake
There may be other scripts that mention it (perhaps look at the build scripts in the libraries directory). Also, bear in mind that InfiniTAM will need modifying similarly.
So having a quick look, the Boost build has this:
if [ $PLATFORM == "mac" ]
then
if [ "$OSXVERSION" -ge 13 ]
then
STDLIBFLAGS='cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++"'
fi
else
STDLIBFLAGS='cxxflags="-std=c++11"'
fi
However, the OpenCV build (for example) has this:
if [ $PLATFORM == "mac" ]
then
CMAKE_CXX_FLAGS="-stdlib=libstdc++"
CMAKE_EXE_LINKER_FLAGS="-stdlib=libstdc++"
else
CMAKE_CXX_FLAGS=""
CMAKE_EXE_LINKER_FLAGS=""
fi
On Mavericks, it won't make a difference, but for you it will, because I'm not checking the version of OS X in the OpenCV case.
Probably what needs doing is going through the scripts and making sure that it's only using libstdc++ on OS X Mavericks, and not on anything else.
OK, but since time is limited I may try it tomorrow. Thank you very much.
@uni4th: Any luck?