Ask Your Question

Jenniferwillow's profile - activity

2016-08-31 11:45:43 -0600 asked a question Problem building Opencv 3.1 - cap_gphoto2.cpp errors

I've been running into the same problem with both the release version of 3.1 and the current cloned version of the repository. The problem appears to be in the videoio module when compiling the cap_gphoto2.cpp file. I've run into this issue on two separate computer systems both running RHEL 6.6. Here's the relevant error messages: At the end of the post is the configuration output and the error log.

[ 42%] Building NVCC (Device) object modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_row_filter.8uc3.cu.o Building NVCC (Device) object modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_column_filter.16uc1.cu.o Building NVCC (Device) object modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_row_filter.32sc1.cu.o /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:171: error: ISO C++ forbids initialization of member ‘context’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:171: error: making ‘context’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:171: error: invalid in-class initialization of static data member of non-integral type ‘GPContext’ /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:177: error: ISO C++ forbids initialization of member ‘camera’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:177: error: making ‘camera’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:177: error: invalid in-class initialization of static data member of non-integral type ‘Camera’ /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:181: error: ISO C++ forbids initialization of member ‘rootWidget’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:181: error: making ‘rootWidget’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:181: error: invalid in-class initialization of static data member of non-integral type ‘CameraWidget’ /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:213: error: ISO C++ forbids initialization of member ‘abilitiesList’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:213: error: making ‘abilitiesList’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:213: error: invalid in-class initialization of static data member of non-integral type ‘CameraAbilitiesList’ /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:214: error: ISO C++ forbids initialization of member ‘capablePorts’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:214: error: making ‘capablePorts’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:214: error: invalid in-class initialization of static data member of non-integral type ‘GPPortInfoList’ /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:215: error: ISO C++ forbids initialization of member ‘allDevices’ [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:215: error: making ‘allDevices’ static [-fpermissive] /home/developer/andor_development_stargate/working/opencv/opencv_clone/opencv/modules/videoio/src/cap_gphoto2.cpp:215: error ... (more)

2014-03-27 12:45:48 -0600 asked a question Segmentation fault on loading opencv_java248

I configured and compiled the OpenCV 2.4.8 distribution on RHEL 6.4. The configuration and compilation appears to have worked fine (after some struggling). However, when I load the library I get a segmentation fault. I've setup two different projects (in NetBeans and Eclipse) and I get exactly the same result. Here's the crash report: The error appears to be in the libpthread.so library. How should I approach debugging this?

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003daea0c170, pid=31221, tid=140356986955520
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libpthread.so.0+0xc170]  pthread_spin_lock+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x00007fa764007800):  JavaThread "main" [_thread_in_native, id=31227, stack(0x00007fa768496000,0x00007fa768597000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x00007fa7539036b0, RCX=0x000000000000001e, RDX=0x00007fa753960c80
RSP=0x00007fa7685945f8, RBP=0x00007fa768594720, RSI=0x00007fa753960c80, RDI=0x0000000000000000
R8 =0x00007fa764193d50, R9 =0x0000000000000001, R10=0x00007fa768594380, R11=0x0000003daea0c170
R12=0x00007fa76415b210, R13=0x00007fa76415b210, R14=0x00007fffa26b50e0, R15=0x0000000000000000
RIP=0x0000003daea0c170, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007fa7685945f8)
0x00007fa7685945f8:   00007fa752ac9938 0000000000000001
0x00007fa768594608:   0000000000000000 0000000000002b41
0x00007fa768594618:   00007fa752ac9abf 0000000000000001
0x00007fa768594628:   00007fa753960c80 0000000000003dcb
0x00007fa768594638:   00007fa752ac7777 00007fa753960c80
0x00007fa768594648:   00007fa768594670 0000000000006114
0x00007fa768594658:   00007fa752aca5c0 00007fa7539f8960
0x00007fa768594668:   00007fa753960c80 00007fa753960c80
0x00007fa768594678:   00007fa764193d50 0000000000000001
0x00007fa768594688:   00007fa7539036b0 00007fa768594720
0x00007fa768594698:   00007fa752acabde 0000000000000001
0x00007fa7685946a8:   00007fa7539f8960 0000000000004762
0x00007fa7685946b8:   00007fa75317c3d6 0000000000000001
0x00007fa7685946c8:   00007fa7539f8960 000000000000244c
0x00007fa7685946d8:   00007fa753182f4f 0000000000000000
0x00007fa7685946e8:   000000010000ffff 00007fa753903780
0x00007fa7685946f8:   00007fa7531830eb 00007fa76415b210
0x00007fa768594708:   00007fa7533bf3a6 00007fa7523e1a38
0x00007fa768594718:   0000000000000006 00007fffa26b50a8
0x00007fa768594728:   00007fa7527e4f0b 0000003d00000000
0x00007fa768594738:   0000003dada0e535 00000000000921c0
0x00007fa768594748:   0000000000000001 0000000000000000
0x00007fa768594758:   00007fa752487a28 0000000b00000002
0x00007fa768594768:   00007fa768594970 00007fa76415b210
0x00007fa768594778:   0000000000000046 00007fa76415b4c8
0x00007fa768594788:   00007fa764189360 0000000000000001
0x00007fa768594798:   0000003dada12c25 0000000000000040
0x00007fa7685947a8:   00000000f16045e8 00007fa7685947b0
0x00007fa7685947b8:   00000000cef91fcb 8000000168594840
0x00007fa7685947c8:   0000003dadc21160 ffffffff80000001
0x00007fa7685947d8:   00007fa768594970 0000000000000000
0x00007fa7685947e8:   00007fa768594828 00007fa768594888 

Instructions: (pc=0x0000003daea0c170)
0x0000003daea0c150:   01 f6 83 e0 fd 09 c6 31 c0 89 37 f3 c3 90 90 90
0x0000003daea0c160:   31 c0 c3 90 90 90 90 90 90 90 90 90 90 90 90 90
0x0000003daea0c170:   f0 ff 0f 75 0b 31 c0 c3 0f 1f 84 00 00 00 00 00
0x0000003daea0c180:   f3 90 83 3f 00 7f e9 eb f7 90 90 90 90 90 90 90 

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x00007fa7539036b0: <offset 0x156f6b0> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248.so at 0x00007fa752394000
RCX=0x000000000000001e is an unknown value
RDX=0x00007fa753960c80: <offset 0x15ccc80> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248.so at 0x00007fa752394000
RSP=0x00007fa7685945f8 is pointing into the stack for thread: 0x00007fa764007800
RBP=0x00007fa768594720 is pointing into the stack for thread: 0x00007fa764007800
RSI=0x00007fa753960c80: <offset 0x15ccc80> in /home/developer/NetBeansProjects/OpenCV/lib/libopencv_java248 ...
(more)
2014-03-13 13:40:36 -0600 asked a question Problem compiling Opencv 2.4.8 - cudaarithm.a linking

I'm trying to build Opencv 2.48 on RHEL 6.4 as a static library to use with Java. I'm running kernel Linux 2.6.32=358.el6.x86_64. When I run "make -j8" it compiles up until ~ 38% and then throws the following error when linking the cudaarithm.a library. I currently have CUDA 5.5 installed with a recent GTX 680 graphics card. I'm using CUDA on a regular basis and it's working extremely well.

Scanning dependencies of target opencv_cudaarithm [ 38%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/reductions.cpp.o [ 39%] [ 39%] [ 39%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/element_operations.cpp.o Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/arithm.cpp.o Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/core.cpp.o Linking CXX static library ../../lib/libopencv_cudaarithm.a [ 39%] Built target opencv_cudaarithm make: * [all] Error 2

I have a couple of missing dependencies but none that I would suspect to be involved in the CUDA build.
Here's the output of cake -DBUILD_SHARED_LIBS=OFF ..

cmake -DBUILD_SHARED_LIBS=OFF .. -- Detected version of GNU GCC: 44 (404) -- Found ZLIB: /usr/lib64/libz.so (found suitable version "1.2.3", minimum required is "1.2.3") -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3") -- checking for module 'gstreamer-base-1.0' -- package 'gstreamer-base-1.0' not found -- checking for module 'gstreamer-video-1.0' -- package 'gstreamer-video-1.0' not found -- checking for module 'gstreamer-app-1.0' -- package 'gstreamer-app-1.0' not found -- checking for module 'gstreamer-riff-1.0' -- package 'gstreamer-riff-1.0' not found -- checking for module 'gstreamer-pbutils-1.0' -- package 'gstreamer-pbutils-1.0' not found -- checking for module 'libdc1394-2' -- package 'libdc1394-2' not found -- checking for module 'libdc1394' -- package 'libdc1394' not found -- Looking for linux/videodev.h -- Looking for linux/videodev.h - found -- Looking for linux/videodev2.h -- Looking for linux/videodev2.h - found -- Looking for sys/videoio.h -- Looking for sys/videoio.h - not found -- Looking for libavformat/avformat.h -- Looking for libavformat/avformat.h - found -- Looking for ffmpeg/avformat.h -- Looking for ffmpeg/avformat.h - not found -- CUDA detected: 5.5 -- CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30 -- Update variable PYTHON_LIBRARY from environment: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib -- Update variable PYTHON_INCLUDE_DIR from environment: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/include -- Found apache ant 1.7.1: /usr/bin/ant -- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)

-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or set $VTK_DIR enviroment variable to VTK install subdirectory with VTKConfig.cmake file (for windows)

-- General configuration for OpenCV 3.0.0-dev =====================================

-- Version control: 2.4.8-3568-g0ce8f1d

-- Platform: -- Host: Linux 2.6.32-358.el6.x86_64 x86_64 -- CMake: 2.8.12.2 -- CMake generator: Unix ... (more)

2013-12-04 21:32:49 -0600 received badge  Nice Question (source)
2013-11-03 14:13:37 -0600 received badge  Student (source)
2013-11-03 00:07:01 -0600 answered a question OpenCV + CUDA + OSX 10.9

I just ran into exactly the same problem. It also happens when you try to compile the CUDA samples.

2013-11-03 00:05:22 -0600 asked a question -dumpspecs flag is stopping compile of CUDA code

Problem building OpenCV on Macbook Pro running Mavericks (OSX 10.9) and CUDA driver version 5.5.28. I'm running into the same problem compiling CUDA samples using Nsight and I'm having trouble finding where the '-dumpspecs' flag is being set. Evidently the new version of the CUDA compiler no longer accepts the -dumpspecs flag or the new version or the make has added the -dumpspecs flag and it doesn't work on Mavericks. If you have any insights into what has actually happened I'd love to hear about it.

[ 22%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o clang: error: unsupported option '-dumpspecs' clang: error: no input files CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:208 (message): Error generating /Users/jennifer/Documents/development/OpenCV/opencv-2.4.6.1/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o

make[2]: * [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1 make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2