Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when building spaint project #8

Open
uni4th opened this issue Apr 19, 2018 · 9 comments
Open

Problems when building spaint project #8

uni4th opened this issue Apr 19, 2018 · 9 comments
Assignees

Comments

@uni4th
Copy link

uni4th commented Apr 19, 2018

  1. 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?

  2. 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

@sgolodetz
Copy link
Collaborator

  1. 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

  1. I'll investigate - there may be a missing preprocessor guard somewhere. Did Xcode tell you where the error occurred?

@sgolodetz
Copy link
Collaborator

You have to turn off WITH_CUDA in InfiniTAM also and rebuild that first btw, if you haven't.

@sgolodetz
Copy link
Collaborator

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.

@sgolodetz
Copy link
Collaborator

@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.

@uni4th
Copy link
Author

uni4th commented Apr 19, 2018

@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

@sgolodetz
Copy link
Collaborator

sgolodetz commented Apr 19, 2018

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.

@sgolodetz
Copy link
Collaborator

sgolodetz commented Apr 19, 2018

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.

@uni4th
Copy link
Author

uni4th commented Apr 19, 2018

OK, but since time is limited I may try it tomorrow. Thank you very much.

@sgolodetz
Copy link
Collaborator

@uni4th: Any luck?

sgolodetz added a commit that referenced this issue Nov 17, 2018
Implement relocopt - READY FOR REVIEW
@sgolodetz sgolodetz self-assigned this Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants