OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

error: no template named 'is_same_v' in namespace 'std'

Open Joeljensen28 opened this issue 1 year ago • 0 comments

I'm trying to run python3 setup.py build, and it runs for a while, spits out a few errors, continues running, and then throws this output at me:

10 warnings and 9 errors generated.
make[2]: *** [robust/CMakeFiles/robust.dir/src/instanciations.cc.o] Error 1
make[1]: *** [robust/CMakeFiles/robust.dir/all] Error 2
16 warnings generated.
[ 79%] Linking CXX static library libbundle.a
[ 79%] Built target bundle
make: *** [all] Error 2
Traceback (most recent call last):
  File "/parent_folder/OpenSfM/setup.py", line 60, in <module>
    build_c_extension()
  File "/parent_folder/OpenSfM/setup.py", line 54, in build_c_extension
    subprocess.check_call(
  File "/opt/homebrew/Cellar/[email protected]/3.9.19_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j8']' returned non-zero exit status 2.

I looked at the errors, and they all appear to be one of these five errors:

/opt/homebrew/include/ceres/internal/euler_angles.h:84:45: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?

/opt/homebrew/include/ceres/internal/euler_angles.h:84:71: error: expected '(' for function-style cast or type construction

error: declaration of constexpr static data member 'kIsParityOdd' requires an initializer

error: declaration of constexpr static data member 'kIsProperEuler' requires an initializer

error: declaration of constexpr static data member 'kIsIntrinsic' requires an initializer

A few things to note (unsure if related or not):

  1. I am using python 3.9
  2. I am using MacOS
  3. I set pyyaml to 5.3.1 in requirements.txt as I was having issues with 5.4
  4. I put add_definitions(-DVL_DISABLE_SSE2) into CMakeLists.txt as I was having issues with SSE2
  5. I also put set(OpenMP_libomp_LIBRARY "/opt/homebrew/opt/libomp/lib/libomp.dylib") and set(OpenMP_CXX_INCLUDE_DIR "/opt/homebrew/opt/libomp/include") in CMakeLists.txt

Any help with this would be greatly appreciated!

Joeljensen28 avatar Aug 28 '24 01:08 Joeljensen28