Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)

Nicolaas Heyning
Hi guys,

I really want to get OpenCV running on my ubunty 17.04 laptop so I start
some computer vision work.
But during the make I keep getting an error that my gcc version is not
supported




















* Building NVCC (Device) object
modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.onvcc
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).In file included from
/usr/local/cuda/include/cuda_runtime.h:78:0,                 from
<command-line>:0:/usr/local/cuda/include/host_config.h:119:2: error: #error
-- unsupported GNU version! gcc versions later than 5 are not
supported! #error -- unsupported GNU version! gcc versions later than 5 are
not supported!  ^~~~~CMake Error at
cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):  Error generating
/home/nicolaas/OpenCV/opencv-master/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.omodules/core/CMakeFiles/opencv_core.dir/build.make:63:
recipe for target
'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o'
failedmake[2]: ***
[modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o]
Error 1CMakeFiles/Makefile2:2474: recipe for target
'modules/core/CMakeFiles/opencv_core.dir/all' failedmake[1]: ***
[modules/core/CMakeFiles/opencv_core.dir/all] Error 2Makefile:160: recipe
for target 'all' failedmake: *** [all] Error 2*
To try to fix it I also installed gcc 5.4 to see if this works but the
error remains the same.

Is there any way to solve this issue? Or am I the only one who has this
problem.

Love to hear from you,
Nicolaas

--
www.l1nda.nl
www.wittewalrus.com
Reply | Threaded
Open this post in threaded view
|

Re: Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)

Fábián Kristóf - Szabolcs
Hi,


Of course you can fix this, just find host_config.h (locate host_config.h), and then open it and find these lines:

#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 3)

//#error -- unsupported GNU version! gcc versions later than 5.3 are not supported!

#endif /* __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 1) */

Here you have to comment out the #error one and you won't have this error anymore.

Best,

Fabian



________________________________
Feladó: [hidden email] <[hidden email]>, meghatalmazó: Nicolaas Heyning [hidden email] [OpenCV] <[hidden email]>
Elküldve: 2017. szeptember 19. 21:11
Címzett: [hidden email]
Tárgy: [OpenCV] Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)



Hi guys,

I really want to get OpenCV running on my ubunty 17.04 laptop so I start some computer vision work.
But during the make I keep getting an error that my gcc version is not supported

 Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
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).
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
                 from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
 #error -- unsupported GNU version! gcc versions later than 5 are not supported!
  ^~~~~
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):
  Error generating
  /home/nicolaas/OpenCV/opencv-master/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o


modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:2474: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

To try to fix it I also installed gcc 5.4 to see if this works but the error remains the same.

Is there any way to solve this issue? Or am I the only one who has this problem.

Love to hear from you,
Nicolaas

--
www.l1nda.nl<http://www.l1nda.nl>
www.wittewalrus.com<http://www.wittewalrus.com>


Reply | Threaded
Open this post in threaded view
|

Re: Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)

Nicolaas Heyning
Hi Fabian,

thank you for your quick reply.
Your solution got me further but I stumbled onto a next error:












*[ 29%] Building NVCC (Device) object
modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.onvcc
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).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)./usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h(436): error:
identifier "nullptr" is
undefined/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h(436): error:
expected a ";"/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h(205):
error: expected a ";"/usr/include/c++/6/exception(63): error: expected a
";"*
I'm afraid that my knowledge of C is a little to limited to debug this one.
The code on the stddef.h file around line 436 looks like this:







*#if defined(__cplusplus) && __cplusplus >= 201103L#ifndef
_GXX_NULLPTR_T#define _GXX_NULLPTR_T  typedef decltype(nullptr)
nullptr_t;#endif#endif /* C++11.  */*
Hope you can help me further.

Greetings,
Nicolaas


On Tue, Sep 19, 2017 at 9:41 PM, Fábián Kristóf - Szabolcs
[hidden email] [OpenCV] <[hidden email]> wrote:

>
>
> Hi,
>
>
> Of course you can fix this, just find host_config.h (locate host_config.h),
> and then open it and find these lines:
>
> #if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 3)
>
> //#error -- unsupported GNU version! gcc versions later than 5.3 are not
> supported!
>
> #endif /* __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 1) */
>
> Here you have to comment out the #error one and you won't have this error
> anymore.
>
> Best,
>
> Fabian
>
>
>
> ------------------------------
> *Feladó:* [hidden email] <[hidden email]>, meghatalmazó:
> Nicolaas Heyning [hidden email] [OpenCV] <[hidden email]>
> *Elküldve:* 2017. szeptember 19. 21:11
> *Címzett:* [hidden email]
> *Tárgy:* [OpenCV] Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)
>
>
>
> Hi guys,
>
> I really want to get OpenCV running on my ubunty 17.04 laptop so I start
> some computer vision work.
> But during the make I keep getting an error that my gcc version is not
> supported
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * Building NVCC (Device) object
> modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
> 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). In file included from
> /usr/local/cuda/include/cuda_runtime.h:78:0,                  from
> <command-line>:0: /usr/local/cuda/include/host_config.h:119:2: error:
> #error -- unsupported GNU version! gcc versions later than 5 are not
> supported!  #error -- unsupported GNU version! gcc versions later than 5
> are not supported!   ^~~~~ CMake Error at
> cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):   Error generating
>
> /home/nicolaas/OpenCV/opencv-master/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
> modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target
> 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu
> <http://compile_generated_gpu_mat.cu>.o' failed make[2]: ***
> [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu
> <http://compile_generated_gpu_mat.cu>.o] Error 1 CMakeFiles/Makefile2:2474:
> recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
> make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 *
> To try to fix it I also installed gcc 5.4 to see if this works but the
> error remains the same.
>
> Is there any way to solve this issue? Or am I the only one who has this
> problem.
>
> Love to hear from you,
> Nicolaas
>
> --
> www.l1nda.nl
> www.wittewalrus.com
>
>
>



--
www.l1nda.nl
www.wittewalrus.com
Reply | Threaded
Open this post in threaded view
|

Re: Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)

Nicolaas Heyning
In reply to this post by Fábián Kristóf - Szabolcs
Hè guys,

I have understood that you are working on an update of opencv that will solve then issues for Ubuntu 17.04 or gcc6, and that this release will come out soon. That's great news!
Till then I will wait with my work in opencv. Looking forward to start and till then thanks a lot for all the effort.

Greetings,
Nicolaas



> Op 19 sep. 2017 om 21:41 heeft "Fábián Kristóf - Szabolcs [hidden email] [OpenCV]" <[hidden email]> het volgende geschreven:
>
> Hi,
>
>
> Of course you can fix this, just find host_config.h (locate host_config.h), and then open it and find these lines:
>
> #if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 3)
>
> //#error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
>
> #endif /* __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 1) */
>
> Here you have to comment out the #error one and you won't have this error anymore.
>
> Best,
>
> Fabian
>
>
>
>
> Feladó: [hidden email] <[hidden email]>, meghatalmazó: Nicolaas Heyning [hidden email] [OpenCV] <[hidden email]>
> Elküldve: 2017. szeptember 19. 21:11
> Címzett: [hidden email]
> Tárgy: [OpenCV] Issues installing OpenCV on ubuntu 17.04 (gcc 6.3)
>  
>  
> Hi guys,
>
> I really want to get OpenCV running on my ubunty 17.04 laptop so I start some computer vision work.
> But during the make I keep getting an error that my gcc version is not supported
>
>  Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
> 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).
> In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
>                  from <command-line>:0:
> /usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
>  #error -- unsupported GNU version! gcc versions later than 5 are not supported!
>   ^~~~~
> CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):
>   Error generating
>   /home/nicolaas/OpenCV/opencv-master/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
>
>
> modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed
> make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
> CMakeFiles/Makefile2:2474: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
> make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
>
> To try to fix it I also installed gcc 5.4 to see if this works but the error remains the same.
>
> Is there any way to solve this issue? Or am I the only one who has this problem.
>
> Love to hear from you,
> Nicolaas
>
> --
> www.l1nda.nl
> www.wittewalrus.com
>