{"action":"created","issue":{"url":"https://api.github.com/repos/opencv/opencv/issues/8347","repository_url":"https://api.github.com/repos/opencv/opencv","labels_url":"https://api.github.com/repos/opencv/opencv/issues/8347/labels{/name}","comments_url":"https://api.github.com/repos/opencv/opencv/issues/8347/comments","events_url":"https://api.github.com/repos/opencv/opencv/issues/8347/events","html_url":"https://github.com/opencv/opencv/issues/8347","id":213189253,"number":8347,"title":"error: calling a __host__ function(\"__builtin_clzl\") from a __device__ function(\"std::__lg\") is not allowed","user":{"login":"bricerebsamen","id":1027398,"avatar_url":"https://avatars3.githubusercontent.com/u/1027398?v=3","gravatar_id":"","url":"https://api.github.com/users/bricerebsamen","html_url":"https://github.com/bricerebsamen","followers_url":"https://api.github.com/users/bricerebsamen/followers","following_url":"https://api.github.com/users/bricerebsamen/following{/other_user}","gists_url":"https://api.github.com/users/bricerebsamen/gists{/gist_id}","starred_url":"https://api.github.com/users/bricerebsamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricerebsamen/subscriptions","organizations_url":"https://api.github.com/users/bricerebsamen/orgs","repos_url":"https://api.github.com/users/bricerebsamen/repos","events_url":"https://api.github.com/users/bricerebsamen/events{/privacy}","received_events_url":"https://api.github.com/users/bricerebsamen/received_events","type":"User","site_admin":false},"labels":[{"id":241025032,"url":"https://api.github.com/repos/opencv/opencv/labels/category:%20build/install","name":"category: build/install","color":"ededed","default":false},{"id":241024672,"url":"https://api.github.com/repos/opencv/opencv/labels/priority:%20low","name":"priority: low","color":"AA9739","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-09T22:45:09Z","updated_at":"2017-03-15T16:59:54Z","closed_at":null,"body":"This happens when compiling with cuda in debug mode\r\n\r\n```\r\nINFO: From Compiling external/opencv_repo3/modules/nonfree/src/surf.cpp:\r\nexternal/gcc_4_8/usr/include/c++/4.8/bits/stl_algobase.h(989): error: calling a __host__ function(\"__builtin_clzl\") from a __device__ function(\"std::__lg\") is not allowed\r\n```\r\n\r\n##### System information (version)\r\n- OpenCV => 2.4.13.2\r\n- Operating System / Platform => ubuntu 16.04\r\n- Compiler => bazel\r\n\r\n##### Detailed description\r\n\r\n```\r\nthird_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -nostdinc -isystem external/gcc_4_8/usr/include -isystem external/gcc_4_8/usr/include/x86_64-linux-gnu -isystem external/gcc_4_8/usr/lib/gcc/x86_64-linux-gnu/4.8/include -isystem external/gcc_4_8/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -DROS_ASSERT_ENABLED -Werror -Wextra -Wno-unused-parameter -g '-std=c++11' -isystem external/gcc_4_8/usr/include/c++/4.8 -isystem external/gcc_4_8/usr/include/c++/4.8/backward -isystem external/gcc_4_8/usr/include/x86_64-linux-gnu/c++/4.8 -Wnon-virtual-dtor -MD -MF bazel-out/local_linux-dbgcuda/bin/external/opencv_repo3/_objs/nonfree/external/opencv_repo3/modules/nonfree/src/surf.pic.d '-frandom-seed=bazel-out/local_linux-dbgcuda/bin/external/opencv_repo3/_objs/nonfree/external/opencv_repo3/modules/nonfree/src/surf.pic.o' -fPIC -DHAVE_AV_CONFIG_H -DZLIB_CONST '-D_FILE_OFFSET_BITS=64' -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE '-D_POSIX_C_SOURCE=200112' '-D_XOPEN_SOURCE=600' -DPIC -iquote external/opencv_repo3 -iquote bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3 -iquote external/zlib_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/zlib_repo -iquote external/bazel_tools -iquote bazel-out/local_linux-dbgcuda/genfiles/external/bazel_tools -iquote external/tbb_repo2 -iquote bazel-out/local_linux-dbgcuda/genfiles/external/tbb_repo2 -iquote . -iquote bazel-out/local_linux-dbgcuda/genfiles -iquote external/cuda_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/cuda_repo -iquote external/libv4l_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libv4l_repo -iquote external/png_repo2 -iquote bazel-out/local_linux-dbgcuda/genfiles/external/png_repo2 -iquote external/jpeg_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/jpeg_repo -iquote external/bz2_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/bz2_repo -iquote external/liblzma_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/liblzma_repo -iquote external/libsctp_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libsctp_repo -iquote external/valgrind_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/valgrind_repo -iquote external/x264_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/x264_repo -iquote external/dc1394_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/dc1394_repo -iquote external/libtiff_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libtiff_repo -iquote external/libjbig_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libjbig_repo -iquote external/libgtk_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libgtk_repo -iquote external/libglib_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libglib_repo -iquote external/x11_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/x11_repo -iquote external/libcairo_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libcairo_repo -iquote external/libfontconfig_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libfontconfig_repo -iquote external/libexpat1_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libexpat1_repo -iquote external/libfreetype_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libfreetype_repo -iquote external/libpango_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libpango_repo -iquote external/libharfbuzz_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libharfbuzz_repo -iquote external/libxml_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libxml_repo -iquote external/libatk_repo -iquote bazel-out/local_linux-dbgcuda/genfiles/external/libatk_repo -isystem external/opencv_repo3 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3 -isystem external/opencv_repo3/modules/nonfree/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/nonfree/include -isystem external/opencv_repo3/modules/imgproc/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/imgproc/include -isystem external/opencv_repo3/modules/core/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/core/include -isystem external/opencv_repo3/modules/dynamicuda/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/dynamicuda/include -isystem external/opencv_repo3/modules/gpu/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/gpu/include -isystem external/zlib_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/zlib_repo/usr/include -isystem external/zlib_repo/usr/include/x86_64-linux-gnu -isystem bazel-out/local_linux-dbgcuda/genfiles/external/zlib_repo/usr/include/x86_64-linux-gnu -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/tbb_repo2/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/tbb_repo2/usr/include -isystem external/opencv_repo3/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/include -isystem external/cuda_repo -isystem bazel-out/local_linux-dbgcuda/genfiles/external/cuda_repo -isystem external/cuda_repo/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/cuda_repo/include -isystem external/opencv_repo3/modules/features2d/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/features2d/include -isystem external/opencv_repo3/modules/flann/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/flann/include -isystem external/opencv_repo3/modules/calib3d/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/calib3d/include -isystem external/opencv_repo3/modules/objdetect/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/objdetect/include -isystem external/opencv_repo3/modules/highgui/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/highgui/include -isystem external/libv4l_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libv4l_repo/usr/include -isystem external/png_repo2/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/png_repo2/usr/include -isystem external/jpeg_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/jpeg_repo/usr/include -isystem external/jpeg_repo/usr/include/x86_64-linux-gnu -isystem bazel-out/local_linux-dbgcuda/genfiles/external/jpeg_repo/usr/include/x86_64-linux-gnu -isystem third_party/ffmpeg -isystem bazel-out/local_linux-dbgcuda/genfiles/third_party/ffmpeg -isystem third_party/ffmpeg/third_party/ffmpeg -isystem bazel-out/local_linux-dbgcuda/genfiles/third_party/ffmpeg/third_party/ffmpeg -isystem external/bz2_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/bz2_repo/usr/include -isystem external/liblzma_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/liblzma_repo/usr/include -isystem external/libsctp_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libsctp_repo/usr/include -isystem external/valgrind_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/valgrind_repo/usr/include -isystem external/x264_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/x264_repo/usr/include -isystem external/dc1394_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/dc1394_repo/usr/include -isystem external/libtiff_repo/usr/include/x86_64-linux-gnu -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libtiff_repo/usr/include/x86_64-linux-gnu -isystem external/libjbig_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libjbig_repo/usr/include -isystem external/libgtk_repo/usr/include/gtk-2.0 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libgtk_repo/usr/include/gtk-2.0 -isystem external/libgtk_repo/usr/lib/x86_64-linux-gnu/gtk-2.0/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libgtk_repo/usr/lib/x86_64-linux-gnu/gtk-2.0/include -isystem external/libgtk_repo/usr/include/gdk-pixbuf-2.0 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libgtk_repo/usr/include/gdk-pixbuf-2.0 -isystem external/libglib_repo/usr/include/glib-2.0 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libglib_repo/usr/include/glib-2.0 -isystem external/libglib_repo/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libglib_repo/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem external/x11_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/x11_repo/usr/include -isystem external/libcairo_repo/usr/include/cairo -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libcairo_repo/usr/include/cairo -isystem external/libfontconfig_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libfontconfig_repo/usr/include -isystem external/libexpat1_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libexpat1_repo/usr/include -isystem external/libfreetype_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libfreetype_repo/usr/include -isystem external/libpango_repo/usr/include/pango-1.0 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libpango_repo/usr/include/pango-1.0 -isystem external/libharfbuzz_repo/usr/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libharfbuzz_repo/usr/include -isystem external/libxml_repo/usr/include/libxml2 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libxml_repo/usr/include/libxml2 -isystem external/libatk_repo/usr/include/atk-1.0 -isystem bazel-out/local_linux-dbgcuda/genfiles/external/libatk_repo/usr/include/atk-1.0 -isystem external/opencv_repo3/modules/video/include -isystem bazel-out/local_linux-dbgcuda/genfiles/external/opencv_repo3/modules/video/include -x cuda '-DGOOGLE_CUDA=1' -DCUDA_FOUND -DUSE_CUDA '-nvcc_options=expt-relaxed-constexpr' -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__=\"redacted\"' '-D__TIMESTAMP__=\"redacted\"' '-D__TIME__=\"redacted\"' -c external/opencv_repo3/modules/nonfree/src/surf.cpp -o bazel-out/local_linux-dbgcuda/bin/external/opencv_repo3/_objs/nonfree/external/opencv_repo3/modules/nonfree/src/surf.pic.o)\r\nINFO: From Compiling external/opencv_repo3/modules/nonfree/src/surf.cpp:\r\nexternal/gcc_4_8/usr/include/c++/4.8/bits/stl_algobase.h(989): error: calling a __host__ function(\"__builtin_clzl\") from a __device__ function(\"std::__lg\") is not allowed\r\n```"},"comment":{"url":"https://api.github.com/repos/opencv/opencv/issues/comments/286808840","html_url":"https://github.com/opencv/opencv/issues/8347#issuecomment-286808840","issue_url":"https://api.github.com/repos/opencv/opencv/issues/8347","id":286808840,"user":{"login":"bricerebsamen","id":1027398,"avatar_url":"https://avatars3.githubusercontent.com/u/1027398?v=3","gravatar_id":"","url":"https://api.github.com/users/bricerebsamen","html_url":"https://github.com/bricerebsamen","followers_url":"https://api.github.com/users/bricerebsamen/followers","following_url":"https://api.github.com/users/bricerebsamen/following{/other_user}","gists_url":"https://api.github.com/users/bricerebsamen/gists{/gist_id}","starred_url":"https://api.github.com/users/bricerebsamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricerebsamen/subscriptions","organizations_url":"https://api.github.com/users/bricerebsamen/orgs","repos_url":"https://api.github.com/users/bricerebsamen/repos","events_url":"https://api.github.com/users/bricerebsamen/events{/privacy}","received_events_url":"https://api.github.com/users/bricerebsamen/received_events","type":"User","site_admin":false},"created_at":"2017-03-15T16:59:54Z","updated_at":"2017-03-15T16:59:54Z","body":"this `crosstool_wrapper_driver_is_not_gcc` basically forwards to NVCC. I will try to get the actual nvcc command line. Compiling with nvcc should work, right?\r\n"}}
{"actor":{"display_login":"bricerebsamen"}}