Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@NikolausDemmel
Created April 20, 2014 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NikolausDemmel/11128536 to your computer and use it in GitHub Desktop.
Save NikolausDemmel/11128536 to your computer and use it in GitHub Desktop.
cuda failure boost/function and opencv
$ cat main.cu
#include <boost/function.hpp>
#include <opencv2/opencv.hpp>
$ nvcc -I "/usr/local/Cellar/boost-libstdcxx/1.55.0/include" -I/usr/local/Cellar/opencv-libstdcxx/2.4.8.2/include/opencv main.cu -v
nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release.
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/Developer/NVIDIA/CUDA-6.0/bin
#$ _THERE_=/Developer/NVIDIA/CUDA-6.0/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_SIZE_=64
#$ TOP=/Developer/NVIDIA/CUDA-6.0/bin/..
#$ NVVMIR_LIBRARY_DIR=/Developer/NVIDIA/CUDA-6.0/bin/../nvvm/libdevice
#$ PATH=/Developer/NVIDIA/CUDA-6.0/bin/../open64/bin:/Developer/NVIDIA/CUDA-6.0/bin/../nvvm/bin:/Developer/NVIDIA/CUDA-6.0/bin:/Users/demmeln/work/adt-bundle/sdk/platform-tools:/Users/demmeln/local/bin:/Developer/NVIDIA/CUDA-6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin
#$ INCLUDES="-I/Developer/NVIDIA/CUDA-6.0/bin/../include"
#$ LIBRARIES= "-L/Developer/NVIDIA/CUDA-6.0/bin/../lib"
#$ CUDAFE_FLAGS=
#$ OPENCC_FLAGS=
#$ PTXAS_FLAGS=
#$ clang -stdlib=libstdc++ -D__CUDA_ARCH__=100 -E -x c++ -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -D__CUDACC__ -D__NVCC__ -I"/usr/local/Cellar/boost-libstdcxx/1.55.0/include" -I"/usr/local/Cellar/opencv-libstdcxx/2.4.8.2/include/opencv" "-I/Developer/NVIDIA/CUDA-6.0/bin/../include" -include "cuda_runtime.h" -m64 -o "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-6_main.cpp1.ii" "main.cu"
#$ cudafe --clang --m64 --gnu_version=40201 -tused --no_remove_unneeded_entities --gen_c_file_name "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-3_main.cudafe1.c" --stub_file_name "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-3_main.cudafe1.stub.c" --gen_device_file_name "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-3_main.cudafe1.gpu" --nv_arch "compute_10" --gen_module_id_file --module_id_file_name "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-2_main.module_id" --include_file_name "tmpxft_0000f1df_00000000-1_main.fatbin.c" "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-6_main.cpp1.ii"
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/assert.hpp(102): warning: unknown attribute "__attribute__"
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_abstract.hpp(72): error: identifier "__is_abstract" is undefined
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_abstract.hpp(72): error: function call is not allowed in a constant expression
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_abstract.hpp(72): error: type name is not allowed
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_enum.hpp(181): error: identifier "__is_enum" is undefined
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_enum.hpp(181): error: function call is not allowed in a constant expression
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_enum.hpp(181): error: type name is not allowed
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_copy.hpp(31): error: identifier "__has_trivial_copy" is undefined
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_copy.hpp(31): error: function call is not allowed in a constant expression
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_copy.hpp(31): error: type name is not allowed
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_destructor.hpp(28): error: identifier "__has_trivial_destructor" is undefined
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_destructor.hpp(28): error: function call is not allowed in a constant expression
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/has_trivial_destructor.hpp(28): error: type name is not allowed
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_union.hpp(43): error: identifier "__is_union" is undefined
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_union.hpp(43): error: function call is not allowed in a constant expression
/usr/local/Cellar/boost-libstdcxx/1.55.0/include/boost/type_traits/is_union.hpp(43): error: type name is not allowed
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/emmintrin.h(1225): error: identifier "__builtin_ia32_movnti64" is undefined
/usr/local/include/opencv2/core/mat.hpp(117): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(117): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(286): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(286): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(286): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(286): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(362): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(362): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(362): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(362): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(366): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(366): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(366): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(366): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(2110): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(2110): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(2110): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(2110): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(2138): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(2138): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(2138): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(2138): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/mat.hpp(2142): error: type name is not allowed
/usr/local/include/opencv2/core/mat.hpp(2142): error: identifier "_Atomic" is undefined
/usr/local/include/opencv2/core/mat.hpp(2142): error: expected an expression
/usr/local/include/opencv2/core/mat.hpp(2142): error: identifier "__c11_atomic_fetch_add" is undefined
/usr/local/include/opencv2/core/operations.hpp(2603): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::FeatureDetector]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/features2d/features2d.hpp(705): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::FeatureDetector]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/features2d/features2d.hpp(705): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::FeatureDetector]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/features2d/features2d.hpp(705): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::FeatureDetector]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/features2d/features2d.hpp(705): here
/usr/local/include/opencv2/core/operations.hpp(2599): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::FeatureDetector]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::FeatureDetector]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::FeatureDetector]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::FeatureDetector]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::FeatureDetector]"
/usr/local/include/opencv2/core/operations.hpp(2603): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::GenericDescriptorMatcher]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/features2d/features2d.hpp(1522): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::GenericDescriptorMatcher]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/features2d/features2d.hpp(1522): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::GenericDescriptorMatcher]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/features2d/features2d.hpp(1522): here
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::GenericDescriptorMatcher]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/features2d/features2d.hpp(1522): here
/usr/local/include/opencv2/core/operations.hpp(2599): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::GenericDescriptorMatcher]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::GenericDescriptorMatcher]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::GenericDescriptorMatcher]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::GenericDescriptorMatcher]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::GenericDescriptorMatcher]"
/usr/local/include/opencv2/core/operations.hpp(2603): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::linemod::QuantizedPyramid]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::linemod::QuantizedPyramid]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2603): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::linemod::QuantizedPyramid]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2603): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::release() [with _Tp=cv::linemod::QuantizedPyramid]"
(2617): here
instantiation of "cv::Ptr<_Tp>::~Ptr() [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: type name is not allowed
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::linemod::QuantizedPyramid]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "_Atomic" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::linemod::QuantizedPyramid]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: expected an expression
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::linemod::QuantizedPyramid]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::linemod::QuantizedPyramid]"
/usr/local/include/opencv2/core/operations.hpp(2599): error: identifier "__c11_atomic_fetch_add" is undefined
detected during:
instantiation of "void cv::Ptr<_Tp>::addref() [with _Tp=cv::linemod::QuantizedPyramid]"
(2623): here
instantiation of "cv::Ptr<_Tp>::Ptr(const cv::Ptr<_Tp> &) [with _Tp=cv::linemod::QuantizedPyramid]"
68 errors detected in the compilation of "/var/folders/ql/p12yxrkx3xg82sg17q07svtr0000gn/T//tmpxft_0000f1df_00000000-6_main.cpp1.ii".
# --error 0x2 --
@MisanthropicBit
Copy link

Where you able to resolve these errors? I am getting almost the same ones, namely those in mat.hpp and boost/type_traits...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment