andyzeng / 3dmatch-toolbox

3DMatch - a 3D ConvNet-based local geometric descriptor for aligning 3D meshes and point clouds.
http://3dmatch.cs.princeton.edu/
BSD 2-Clause "Simplified" License
836 stars 189 forks source link

errors when run compile.sh #5

Open aalzaid opened 7 years ago

aalzaid commented 7 years ago

Hi Many thanks for sharing this tool I try to run compile.sh but I get 12 errors as below. Could you help me in solving these errors please.

/usr/include/c++/5/functional(78): error: class "std::thread" has no member "result_type" detected during: instantiation of class "std::_Maybe_get_result_type<_Functor, void> [with _Functor=std::thread]" (86): here instantiation of class "std::_Weak_result_type_impl<_Functor> [with _Functor=std::thread]" (184): here instantiation of class "std::_Weak_result_type<_Functor> [with _Functor=std::thread]" (264): here instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(266): error: class "std::thread" has no member "argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(267): error: class "std::thread" has no member "first_argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(268): error: class "std::thread" has no member "second_argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

marvin.hpp(854): error: identifier "CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED" is undefined

marvin.hpp(865): error: identifier "CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED" is undefined

marvin.hpp(875): error: identifier "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED" is undefined

/usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(155): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(156): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(157): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(158): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here 12 errors detected in the compilation of "/tmp/tmpxft_00001958_00000000-9_demo.cpp1.ii".

Many thanks

andyzeng commented 7 years ago

What is your GCC version? I am using 4.8. Also, I would double check your CUDA 7.5 and cuDNN 5 installation.

aalzaid commented 7 years ago

The gcc version is 5.4.0. I installed CUDA 7.5 and cuDNN 5. I get the following error when run ./compile.sh

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). marvin.hpp(854): error: identifier "CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED" is undefined

marvin.hpp(865): error: identifier "CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED" is undefined

marvin.hpp(875): error: identifier "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED" is undefined

3 errors detected in the compilation of "/tmp/tmpxft_00000b1c_00000000-9_demo.cpp1.ii".

Could you please help me solving these errors. Many thanks

andyzeng commented 7 years ago

Looks like CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED is new in cuDNN 5.1. Try downloading and installing cuDNN 5.1 and recompiling. I've updated the dependencies information in the README.

JWHennessey commented 6 years ago

@ aalzaid I am getting very similar errors regarding std::thread and result_type to you but nothing regarding CUDNN. I have checked my CUDA 7.5 and cuDNN 5.1 installations. I am using GCC 5.4.0 on Ubuntu 16.04.

How did you resolve the issue? Thanks

caifazhou commented 6 years ago

Hello, I was trying to compile the shell script 'compile.sh', I got similar errors as @aalzaid, but not CUDNN error. The details are: `` /usr/include/c++/5/functional(78): error: class "std::thread" has no member "result_type" detected during: instantiation of class "std::_Maybe_get_result_type<_Functor, void> [with _Functor=std::thread]" (86): here instantiation of class "std::_Weak_result_type_impl<_Functor> [with _Functor=std::thread]" (184): here instantiation of class "std::_Weak_result_type<_Functor> [with _Functor=std::thread]" (264): here instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(266): error: class "std::thread" has no member "argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(267): error: class "std::thread" has no member "first_argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/functional(268): error: class "std::thread" has no member "second_argument_type" detected during: instantiation of class "std::_Reference_wrapper_base_impl<true, true, _Tp> [with _Tp=std::thread]" (283): here instantiation of class "std::_Reference_wrapper_base<_Tp> [with _Tp=std::thread]" (399): here instantiation of class "std::reference_wrapper<_Tp> [with _Tp=std::thread]" /usr/include/c++/5/future(1638): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(155): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(156): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(157): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

/usr/include/c++/5/bits/stl_iterator_base_types.h(158): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" marvin.hpp(6006): here

`` I've confirmed the cuda version (7.5) and cudnn version (5.1), and gcc version is 5.4.0. Do you have any clue about this? Thanks in advance.

andyzeng commented 6 years ago

@caifazhou @JWHennessey Does it work for you if downgrade your GCC version to 4.8? It's possible that CUDA 7.0/7.5 is unhappy with GCC 4.9+.

moncio commented 6 years ago

Hi, I was compiling following the steps as you show but I have next mistakes:

marvin.hpp(464): error: class "__half" has no member "x"

marvin.hpp(464): error: class "__half" has no member "x"

marvin.hpp(476): error: class "__half" has no member "x"

marvin.hpp(484): error: class "__half" has no member "x"

marvin.hpp(488): error: class "__half" has no member "x"

marvin.hpp(518): error: class "__half" has no member "x"

marvin.hpp(525): error: class "__half" has no member "x"

marvin.hpp(526): error: class "__half" has no member "x"

marvin.hpp(527): error: class "__half" has no member "x"

9 errors detected in the compilation of "/tmp/tmpxft_00000f0a_00000000-8_demo.cpp1.ii".

I have Ubuntu 16.04 machine and I've installed CUDA 9.2 with CUDNN 7.1.4 (Latest releases for both). Did you have something similar? Thanks ind advance.

RainbowSun1102 commented 5 years ago

Hi, I was compiling following the steps as you show but I have next mistakes:

marvin.hpp(464): error: class "__half" has no member "x"

marvin.hpp(464): error: class "__half" has no member "x"

marvin.hpp(476): error: class "__half" has no member "x"

marvin.hpp(484): error: class "__half" has no member "x"

marvin.hpp(488): error: class "__half" has no member "x"

marvin.hpp(518): error: class "__half" has no member "x"

marvin.hpp(525): error: class "__half" has no member "x"

marvin.hpp(526): error: class "__half" has no member "x"

marvin.hpp(527): error: class "__half" has no member "x"

9 errors detected in the compilation of "/tmp/tmpxft_00000f0a_00000000-8_demo.cpp1.ii".

I have Ubuntu 16.04 machine and I've installed CUDA 9.2 with CUDNN 7.1.4 (Latest releases for both). Did you have something similar? Thanks ind advance.

Execuse me. I face the same issue. How do you solve this one? Thank you for your time.

densechen commented 5 years ago

class "__half" has no member "x" Add one!

kunalchelani commented 5 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

HamzahNizami commented 5 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

im getting the same error. any luck on this?

densechen commented 5 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

im getting the same error. any luck on this?

The version of CUDNN and CUDA should be specified.

kunalchelani commented 5 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

im getting the same error. any luck on this?

The version of CUDNN and CUDA should be specified.

Are you asking me to specify it while commenting ? In which case, it is CUDA 9.0 with cuDNN 7.4.2. If you meant that I should specify it while running the compile script, I did and faced this error.

caifazhou commented 5 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

I have solved the problem by configuring it compilation environment exactly the same as the what described by Andy Zeng in the GitHub repository. The error is from the incompatibility between cudnn version and Darwin. The gcc compiler should be lower than 4.9. One more trick, be sure compile it on Ubuntu 16.04. I have tried to compile it on Windows 10 and other release versions of Linux, I cannot make it work. The same errors came out. Good luck.

I am sure that the code itself has no problem. May not try to change the definition in the source code.

caifazhou commented 5 years ago

@caifazhou @JWHennessey Does it work for you if downgrade your GCC version to 4.8? It's possible that CUDA 7.0/7.5 is unhappy with GCC 4.9+.

It worked for me. But It has to be compiled on Ubuntu 16.04. At least I failed to compile it on other OS.

frozenscrypt commented 5 years ago

I'm trying to compile it on ubuntu 16.04 with cuda 7.5 and cudnn5.1. On ./compile.sh I get error cudafe1.cpp:(.text+0x44f8): undefined refernece to `cv::imread(std::string const&, int)'

CaineGu commented 4 years ago

Any solution to the Error : class "__half" has no member "x" ? Is it because of the newer versions of CUDA/CUDNN ?

I have solved the problem by configuring it compilation environment exactly the same as the what described by Andy Zeng in the GitHub repository. The error is from the incompatibility between cudnn version and Darwin. The gcc compiler should be lower than 4.9. One more trick, be sure compile it on Ubuntu 16.04. I have tried to compile it on Windows 10 and other release versions of Linux, I cannot make it work. The same errors came out. Good luck.

I am sure that the code itself has no problem. May not try to change the definition in the source code.

you mean this compile document only can work on CUDA 7.5 and cuDNN 5.1 which is given by Andy, do you have any idea to make this work on cuda10.2 and cudnn 8.0.3?

CaineGu commented 4 years ago

Hi, I was compiling following the steps as you show but I have next mistakes: marvin.hpp(464): error: class "half" has no member "x" marvin.hpp(464): error: class "half" has no member "x" marvin.hpp(476): error: class "half" has no member "x" marvin.hpp(484): error: class "half" has no member "x" marvin.hpp(488): error: class "half" has no member "x" marvin.hpp(518): error: class "half" has no member "x" marvin.hpp(525): error: class "half" has no member "x" marvin.hpp(526): error: class "half" has no member "x" marvin.hpp(527): error: class "__half" has no member "x" 9 errors detected in the compilation of "/tmp/tmpxft_00000f0a_00000000-8_demo.cpp1.ii". I have Ubuntu 16.04 machine and I've installed CUDA 9.2 with CUDNN 7.1.4 (Latest releases for both). Did you have something similar? Thanks ind advance.

Execuse me. I face the same issue. How do you solve this one? Thank you for your time.

Is there any one solve this problem? what kinds of reason lead to this problem???

memsjava commented 2 years ago

I search on github the file cuda_fp16.h and replace the new one. I've not get the error _class "_half" has no member "x" anymore. here is the link: https://raw.githubusercontent.com/zakirovandrey/DTgeoEarth/master/cuda_fp16.h