I know that this topic has had many threads started but none of them give a fix for the problem. I have been creating a game with kobold2d which is using cocos2d v1.1.0-beta2b and ever since I upgraded to xcode 4.5 and ios 6 then all of the orientation has been thrown off. Normally the cocos2d apps will start up in landscape mode but now with the updates it starts up in portrait mode and causes all of the objects on the layer to be reversed, but somehow this has fixed itself. So now my project starts up in landscape mode on both the simulator and the ios device but all of the content on the screen is still in portrait mode. Everything was working just fine before I updated to the latest software. What can I do to fix this?
So I decided to build my project with the older xcode 4.4.1 and see how the output in the console differed from the new xcode 4.5 and this what I was finding:
Output for xcode 4.5
2012-09-21 14:50:54.558 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: OS version: 6.0 (0x06000000)
2012-09-21 14:50:54.560 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_VENDOR: Apple Computer, Inc.
2012-09-21 14:50:54.560 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_RENDERER: Apple Software Renderer
2012-09-21 14:50:54.560 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_VERSION: OpenGL ES-CM 1.1 APPLE
2012-09-21 14:50:54.561 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_MAX_TEXTURE_SIZE: 4096
2012-09-21 14:50:54.561 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16
2012-09-21 14:50:54.562 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL_MAX_SAMPLES: 4
2012-09-21 14:50:54.562 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL supports PVRTC: YES
2012-09-21 14:50:54.563 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL supports BGRA8888 textures: YES
2012-09-21 14:50:54.563 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL supports NPOT textures: YES
2012-09-21 14:50:54.563 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: GL supports discard_framebuffer: YES
2012-09-21 14:50:54.564 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: compiled with NPOT support: NO
2012-09-21 14:50:54.564 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: compiled with VBO support in TextureAtlas : YES
2012-09-21 14:50:54.564 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: compiled with Affine Matrix transformation in CCNode : YES
2012-09-21 14:50:54.565 KTireHoops-iOS[4539:c07] -[CCConfiguration init] : cocos2d: compiled with Profiling Support: NO
2012-09-21 14:50:54.565 KTireHoops-iOS[4539:c07] -[CCDirector init] : cocos2d: cocos2d v1.1.0-beta2b
2012-09-21 14:50:54.566 KTireHoops-iOS[4539:c07] -[CCDirector init] : cocos2d: Using Director Type:CCDirectorDisplayLink
2012-09-21 14:50:54.566 KTireHoops-iOS[4539:c07] -[KKAppDelegate applicationDidFinishLaunching:] : Kobold2D™ v1.1.2
2012-09-21 14:50:54.571 KTireHoops-iOS[4539:c07] Retina Display enabled: YES
2012-09-21 14:50:54.573 KTireHoops-iOS[4539:c07] -[ES1Renderer resizeFromLayer:] : cocos2d: surface size: 480x320
2012-09-21 14:50:54.579 KTireHoops-iOS[4539:c07] -[AppDelegate initializationComplete] : ARC is either not available or not enabled
2012-09-21 14:50:54.609 KTireHoops-iOS[4539:c07] -[CCDirectorDisplayLink startAnimation] : startAnimation
2012-09-21 14:50:54.610 KTireHoops-iOS[4539:c07] -[CCDirectorDisplayLink startAnimation] : cocos2d: Frame interval: 1
Output for xcode 4.4.1
2012-09-21 14:52:01.343 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: OS version: 5.1 (0x05010000)
2012-09-21 14:52:01.345 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_VENDOR: Apple Computer, Inc.
2012-09-21 14:52:01.345 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_RENDERER: Apple Software Renderer
2012-09-21 14:52:01.346 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_VERSION: OpenGL ES-CM 1.1 APPLE
2012-09-21 14:52:01.346 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_MAX_TEXTURE_SIZE: 4096
2012-09-21 14:52:01.347 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16
2012-09-21 14:52:01.347 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL_MAX_SAMPLES: 4
2012-09-21 14:52:01.347 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL supports PVRTC: YES
2012-09-21 14:52:01.348 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL supports BGRA8888 textures: YES
2012-09-21 14:52:01.348 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL supports NPOT textures: YES
2012-09-21 14:52:01.350 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: GL supports discard_framebuffer: YES
2012-09-21 14:52:01.350 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: compiled with NPOT support: NO
2012-09-21 14:52:01.351 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: compiled with VBO support in TextureAtlas : YES
2012-09-21 14:52:01.351 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: compiled with Affine Matrix transformation in CCNode : YES
2012-09-21 14:52:01.351 KTireHoops-iOS[5207:c07] -[CCConfiguration init] : cocos2d: compiled with Profiling Support: NO
2012-09-21 14:52:01.352 KTireHoops-iOS[5207:c07] -[CCDirector init] : cocos2d: cocos2d v1.1.0-beta2b
2012-09-21 14:52:01.352 KTireHoops-iOS[5207:c07] -[CCDirector init] : cocos2d: Using Director Type:CCDirectorDisplayLink
2012-09-21 14:52:01.353 KTireHoops-iOS[5207:c07] -[KKAppDelegate applicationDidFinishLaunching:] : Kobold2D™ v1.1.2
2012-09-21 14:52:01.360 KTireHoops-iOS[5207:c07] Retina Display enabled: YES
2012-09-21 14:52:01.361 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.361 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.362 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.362 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.362 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.363 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.396 KTireHoops-iOS[5207:c07] -[AppDelegate initializationComplete] : ARC is either not available or not enabled
2012-09-21 14:52:01.436 KTireHoops-iOS[5207:c07] -[CCDirectorDisplayLink startAnimation] : startAnimation
2012-09-21 14:52:01.437 KTireHoops-iOS[5207:c07] -[CCDirectorDisplayLink startAnimation] : cocos2d: Frame interval: 1
2012-09-21 14:52:01.438 KTireHoops-iOS[5207:c07] -[KKRootViewController shouldAutorotateToInterfaceOrientation:] : shouldAutorotateToInterfaceOrientation
2012-09-21 14:52:01.439 KTireHoops-iOS[5207:c07] -[ES1Renderer resizeFromLayer:] : cocos2d: surface size: 320x480
From what I can see the (shouldAutorotateToInterfaceOrientation) method is not getting called anymore in the new xcode with ios 6. Which is causing the weird orientation bug. Does anyone know of a fix for this.
Here is the quick fix:
In AppDelegate.mm file replace the line
[window_ addSubview:navController_.view];
with
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0){
[window_ setRootViewController:navController_];
}
else{
[window_ addSubview:navController_.view];
}
Add the following method in the AppDelegate.mm
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return UIInterfaceOrientationMaskLandscape;
}
This is happening because Apple Has changed the Way of managing the Orientation of UIViewController. In Ios6 Oreintation handles Differently .in iOS6 containers (such as UINavigationController) do not consult their children to determine whether they should autorotate. By default, an app and a view controller’s supported interface orientations are set to UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom.So device getting orientation changed by default.
http://www.cocos2d-iphone.org/forum/topic/33326
[EDIT] the above link does not work anymore.
The reason could be cocos2d-iphone group had fixed this bug or something else.
For those who still have the same problem, a better way could be google
cocos2d iphone ios6 orientation bug
Related
Hi everyone and thanks for your answers
First of all is, as #zkoza and #talonmies pointed it out, Jetson AGX Xavier are compatible with ARCH 7.2 and not ARCH 5.3 which was used in Jetson Nano's case.
To #Yunus Temurlenk => the fname in my code is only myvideo.MOV since i execute my code in the same repertory of the movie, i also tried with a .mp4 file got from sample in internet resulting the same error.
Yes as you pointed out my NVCUVID is not ON after the cmake command as you can see in my original post the line corresponding to CUDA is
NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS FAST_MATH)
and not
NVIDIA CUDA: YES (ver 10.2, CUFFT NVCUVID CUBLAS FAST_MATH)
I don't know which dependencies are missing but i also saw here that NVCUVID was deprecated : https://docs.nvidia.com/cuda/video-decoder/index.html
The example from step 6 of cuda works fine :)
I'm currently making opencv 4.3.0 with cuda 10.2 I will update my answer if this solve my problem.
EDIT : Unfortunately the problem is exactly the same using openCV 4.3.0 and Cuda 10.2 on Ubuntu 18.04, but i wanted to add that I compiling with this command :
g++ video_reader.cpp -o vr.exe `pkg-config --cflags --libs opencv4`
since g++ by itself give me this error :
video_reader.cpp:3:10: fatal error: opencv2/opencv_modules.hpp: No such file or directory
#include "opencv2/opencv_modules.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
So, maybe my compilation command is the problem ?
END EDIT
To #user2986898 and #einpoklum => i ran cv::getBuildInformation() and 2 other functions : the number of device(s) and the number of device(s) compatible(s). The number of device and compatible device was 1 as expected and the build information are :
General configuration for OpenCV 4.5.1 =====================================
Version control: unknown
Extra modules:
Location (extra): /home/dronemaitre/Documents/opencv_cpp/opencv_contrib/modules
Version control (extra): unknown
Platform:
Timestamp: 2021-01-18T10:12:44Z
Host: Linux 4.9.140-tegra aarch64
CMake: 3.10.2
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: RELEASE
CPU/HW features:
Baseline: NEON FP16
C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: /usr/bin/c++ (ver 7.5.0)
C++ flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed
Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed
ccache: NO
Precompiled headers: NO
Extra dependencies: m pthread /usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so cudart_static dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/local/cuda-10.2/lib64 -L/usr/lib/aarch64-linux-gnu
3rdparty dependencies:
OpenCV modules:
To be built: alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python2 python3 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
Disabled: world
Disabled by dependency: -
Unavailable: cnn_3dobj java julia matlab ovis viz
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO
GUI:
QT: YES (ver 5.9.5)
QT OpenGL support: YES (Qt5::OpenGL 5.9.5)
GTK+: NO
OpenGL support: YES (/usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so)
VTK support: NO
Media I/O:
ZLib: /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)
JPEG: /usr/lib/aarch64-linux-gnu/libjpeg.so (ver 80)
WEBP: build (ver encoder: 0x020f)
PNG: /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)
TIFF: /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
JPEG 2000: build (ver 2.3.1)
OpenEXR: build (ver 2.3.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: YES (2.2.5)
FFMPEG: YES
avcodec: YES (57.107.100)
avformat: YES (57.83.100)
avutil: YES (55.78.100)
swscale: YES (4.8.100)
avresample: YES (3.7.0)
GStreamer: YES (1.14.5)
v4l/v4l2: YES (linux/videodev2.h)
Parallel framework: TBB (ver 2017.0 interface 9107)
Trace: YES (with Intel ITT)
Other third-party libraries:
Lapack: NO
Eigen: YES (ver 3.3.4)
Custom HAL: YES (carotene (ver 0.0.1))
Protobuf: build (3.5.1)
NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS FAST_MATH)
NVIDIA GPU arch: 72
NVIDIA PTX archs:
cuDNN: YES (ver 8.0.0)
OpenCL: YES (no extra features)
Include path: /home/dronemaitre/Documents/opencv_cpp/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python 2:
Interpreter: /usr/bin/python2.7 (ver 2.7.17)
Libraries: /usr/lib/aarch64-linux-gnu/libpython2.7.so (ver 2.7.17)
numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)
install path: lib/python2.7/dist-packages/cv2/python-2.7
Python 3:
Interpreter: /usr/bin/python3 (ver 3.6.9)
Libraries: /usr/lib/aarch64-linux-gnu/libpython3.6m.so (ver 3.6.9)
numpy: /usr/lib/python3/dist-packages/numpy/core/include (ver 1.13.3)
install path: lib/python3.6/dist-packages/cv2/python-3.6
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Install to: /usr/local
-----------------------------------------------------------------
It seems Cuda is found by OpenCV but again here we can see that NVCUVID is not added even so i put -D NVCUVID=ON as you said it might be ignored because not compatible with my config.
EDIT : ccmake command ran in my build folder gives me this output :
ANT_EXECUTABLE ANT_EXECUTABLE-NOTFOUND
Atlas_BLAS_LIBRARY /usr/lib/aarch64-linux-gnu/libatlas.so
Atlas_CBLAS_INCLUDE_DIR /usr/include/aarch64-linux-gnu
Atlas_CBLAS_LIBRARY /usr/lib/aarch64-linux-gnu/libcblas.so
Atlas_CLAPACK_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR-NOTFOUND
Atlas_LAPACK_LIBRARY /usr/lib/aarch64-linux-gnu/liblapack.so
BUILD_CUDA_STUBS OFF
BUILD_DOCS OFF
BUILD_EXAMPLES OFF
BUILD_ITT ON
BUILD_JASPER OFF
BUILD_JAVA ON
BUILD_JPEG OFF
BUILD_LIST
BUILD_OPENEXR OFF
BUILD_PACKAGE ON
BUILD_PERF_TESTS ON
BUILD_PNG OFF
BUILD_PROTOBUF ON
BUILD_SHARED_LIBS ON
BUILD_TBB OFF
BUILD_TESTS ON
BUILD_TIFF OFF
BUILD_USE_SYMLINKS OFF
BUILD_WEBP OFF
BUILD_WITH_DEBUG_INFO OFF
BUILD_WITH_DYNAMIC_IPP OFF
BUILD_ZLIB OFF
BUILD_opencv_alphamat ON
BUILD_opencv_apps ON
BUILD_opencv_aruco ON
BUILD_opencv_bgsegm ON
BUILD_opencv_bioinspired ON
BUILD_opencv_calib3d ON
BUILD_opencv_ccalib ON
BUILD_opencv_core ON
BUILD_opencv_cudaarithm ON
BUILD_opencv_cudabgsegm ON
BUILD_opencv_cudacodec ON
BUILD_opencv_cudafeatures2d ON
BUILD_opencv_cudafilters ON
BUILD_opencv_cudaimgproc ON
BUILD_opencv_cudalegacy ON
BUILD_opencv_cudaobjdetect ON
BUILD_opencv_cudaoptflow ON
BUILD_opencv_cudastereo ON
BUILD_opencv_cudawarping ON
BUILD_opencv_cudev ON
BUILD_opencv_cvv ON
BUILD_opencv_datasets ON
BUILD_opencv_dnn ON
BUILD_opencv_dnn_objdetect ON
BUILD_opencv_dnn_superres ON
BUILD_opencv_dpm ON
BUILD_opencv_face ON
BUILD_opencv_features2d ON
BUILD_opencv_flann ON
BUILD_opencv_freetype ON
BUILD_opencv_fuzzy ON
BUILD_opencv_gapi ON
BUILD_opencv_hdf ON
BUILD_opencv_hfs ON
BUILD_opencv_highgui ON
BUILD_opencv_img_hash ON
BUILD_opencv_imgcodecs ON
BUILD_opencv_imgproc ON
BUILD_opencv_intensity_transfo ON
BUILD_opencv_java_bindings_gen ON
BUILD_opencv_js OFF
BUILD_opencv_line_descriptor ON
BUILD_opencv_ml ON
BUILD_opencv_objdetect ON
BUILD_opencv_optflow ON
BUILD_opencv_phase_unwrapping ON
BUILD_opencv_photo ON
BUILD_opencv_plot ON
BUILD_opencv_python2 ON
BUILD_opencv_python3 ON
BUILD_opencv_python_bindings_g ON
BUILD_opencv_python_tests ON
BUILD_opencv_quality ON
BUILD_opencv_rapid ON
BUILD_opencv_reg ON
BUILD_opencv_rgbd ON
BUILD_opencv_saliency ON
BUILD_opencv_sfm ON
BUILD_opencv_shape ON
BUILD_opencv_stereo ON
BUILD_opencv_stitching ON
BUILD_opencv_structured_light ON
BUILD_opencv_superres ON
BUILD_opencv_surface_matching ON
BUILD_opencv_text ON
BUILD_opencv_tracking ON
BUILD_opencv_ts ON
BUILD_opencv_video ON
BUILD_opencv_videoio ON
BUILD_opencv_videostab ON
BUILD_opencv_world OFF
BUILD_opencv_xfeatures2d ON
BUILD_opencv_ximgproc ON
BUILD_opencv_xobjdetect ON
BUILD_opencv_xphoto ON
CAROTENE_NS carotene_o4t
CCACHE_PROGRAM CCACHE_PROGRAM-NOTFOUND
CLAMDBLAS_INCLUDE_DIR CLAMDBLAS_INCLUDE_DIR-NOTFOUND
CLAMDBLAS_ROOT_DIR CLAMDBLAS_ROOT_DIR-NOTFOUND
CLAMDFFT_INCLUDE_DIR CLAMDFFT_INCLUDE_DIR-NOTFOUND
CLAMDFFT_ROOT_DIR CLAMDFFT_ROOT_DIR-NOTFOUND
CMAKE_BUILD_TYPE RELEASE
CMAKE_CONFIGURATION_TYPES Debug;Release
CMAKE_INSTALL_PREFIX /usr/local
CPU_BASELINE NEON;FP16
CPU_BASELINE_DISABLE ;VFPV3
CPU_BASELINE_REQUIRE ;NEON
CPU_DISPATCH
CUDA_ARCH_BIN 7.2
CUDA_ARCH_PTX
CUDA_FAST_MATH ON
CUDA_GENERATION
CUDA_HOST_COMPILER /usr/bin/cc
CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda-10.2
CUDA_USE_STATIC_CUDA_RUNTIME ON
CUDA_rt_LIBRARY /usr/lib/aarch64-linux-gnu/librt.so
CV_DISABLE_OPTIMIZATION OFF
CV_ENABLE_INTRINSICS ON
CV_TRACE ON
Caffe_INCLUDE_DIR Caffe_INCLUDE_DIR-NOTFOUND
Caffe_LIBS Caffe_LIBS-NOTFOUND
Ceres_DIR Ceres_DIR-NOTFOUND
ENABLE_BUILD_HARDENING OFF
ENABLE_CCACHE ON
ENABLE_CONFIG_VERIFICATION OFF
ENABLE_COVERAGE OFF
ENABLE_FAST_MATH ON
ENABLE_FLAKE8 OFF
ENABLE_GNU_STL_DEBUG OFF
ENABLE_IMPL_COLLECTION OFF
ENABLE_INSTRUMENTATION OFF
ENABLE_LTO OFF
ENABLE_NEON ON
ENABLE_NOISY_WARNINGS OFF
ENABLE_OMIT_FRAME_POINTER ON
ENABLE_PIC ON
ENABLE_PRECOMPILED_HEADERS OFF
ENABLE_PROFILING OFF
ENABLE_PYLINT OFF
ENABLE_SOLUTION_FOLDERS OFF
ENABLE_VFPV3 OFF
EXECUTABLE_OUTPUT_PATH /home/dronemaitre/Documents/opencv_cpp/opencv/build/bin
Eigen3_DIR /usr/lib/cmake/eigen3
GENERATE_ABI_DESCRIPTOR OFF
Glog_LIBS /usr/lib/aarch64-linux-gnu/libglog.so
HDF5_C_LIBRARY_dl /usr/lib/aarch64-linux-gnu/libdl.so
HDF5_C_LIBRARY_hdf5 /usr/lib/aarch64-linux-gnu/hdf5/serial/libhdf5.so
HDF5_C_LIBRARY_m /usr/lib/aarch64-linux-gnu/libm.so
HDF5_C_LIBRARY_pthread /usr/lib/aarch64-linux-gnu/libpthread.so
HDF5_C_LIBRARY_sz /usr/lib/aarch64-linux-gnu/libsz.so
HDF5_C_LIBRARY_z /usr/lib/aarch64-linux-gnu/libz.so
INSTALL_CREATE_DISTRIB OFF
INSTALL_C_EXAMPLES OFF
INSTALL_PYTHON_EXAMPLES OFF
INSTALL_TESTS OFF
INSTALL_TO_MANGLED_PATHS OFF
LAPACKE_INCLUDE_DIR LAPACKE_INCLUDE_DIR-NOTFOUND
LAPACK_CBLAS_H
LAPACK_IMPL Unknown
LAPACK_INCLUDE_DIR
LAPACK_LAPACKE_H
LAPACK_LIBRARIES
Lept_LIBRARY Lept_LIBRARY-NOTFOUND
MKL_INCLUDE_DIRS MKL_ROOT_DIR-NOTFOUND/include
MKL_LAPACKE_INCLUDE_DIR MKL_LAPACKE_INCLUDE_DIR-NOTFOUND
MKL_ROOT_DIR MKL_ROOT_DIR-NOTFOUND
MKL_WITH_OPENMP OFF
MKL_WITH_TBB OFF
OGRE_DIR OGRE_DIR-NOTFOUND
OPENCL_FOUND ON
OPENCV_CONFIG_FILE_INCLUDE_DIR /home/dronemaitre/Documents/opencv_cpp/opencv/build
OPENCV_DNN_CUDA OFF
OPENCV_DNN_OPENCL ON
OPENCV_DOWNLOAD_PATH /home/dronemaitre/Documents/opencv_cpp/opencv/.cache
OPENCV_DUMP_HOOKS_FLOW OFF
OPENCV_ENABLE_ALLOCATOR_STATS ON
OPENCV_ENABLE_ATOMIC_LONG_LONG OFF
OPENCV_ENABLE_MEMALIGN ON
OPENCV_ENABLE_MEMORY_SANITIZER OFF
OPENCV_ENABLE_NONFREE OFF
OPENCV_EXTRA_MODULES_PATH /home/dronemaitre/Documents/opencv_cpp/opencv_contrib/modules
OPENCV_FORCE_3RDPARTY_BUILD OFF
OPENCV_FORCE_PYTHON_LIBS OFF
OPENCV_GENERATE_PKGCONFIG ON
OPENCV_GENERATE_SETUPVARS ON
OPENCV_JAVA_SOURCE_VERSION
OPENCV_JAVA_TARGET_VERSION
OPENCV_MATHJAX_RELPATH https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0
OPENCV_PYTHON3_VERSION OFF
OPENCV_TIMESTAMP 2021-01-18T12:55:10Z
OPENCV_WARNINGS_ARE_ERRORS OFF
OPENEXR_INCLUDE_PATH OPENEXR_INCLUDE_PATH-NOTFOUND
OpenCV_HAL_DIR OpenCV_HAL_DIR-NOTFOUND
OpenJPEG_DIR OpenJPEG_DIR-NOTFOUND
PROTOBUF_UPDATE_FILES OFF
PYTHON2_EXECUTABLE /usr/bin/python2.7
PYTHON2_INCLUDE_DIR /usr/include/python2.7
PYTHON2_INCLUDE_DIR2
PYTHON2_LIBRARY /usr/lib/aarch64-linux-gnu/libpython2.7.so
PYTHON2_LIBRARY_DEBUG
PYTHON2_NUMPY_INCLUDE_DIRS /usr/lib/python2.7/dist-packages/numpy/core/include
PYTHON2_PACKAGES_PATH lib/python2.7/dist-packages
PYTHON3_EXECUTABLE /usr/bin/python3
PYTHON3_INCLUDE_DIR /usr/include/python3.6m
PYTHON3_INCLUDE_DIR2
PYTHON3_LIBRARY /usr/lib/aarch64-linux-gnu/libpython3.6m.so
PYTHON3_LIBRARY_DEBUG
PYTHON3_NUMPY_INCLUDE_DIRS /usr/lib/python3/dist-packages/numpy/core/include
PYTHON3_PACKAGES_PATH lib/python3.6/dist-packages
Qt5Concurrent_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5Concurrent
Qt5Core_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5Core
Qt5Gui_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5Gui
Qt5OpenGL_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5OpenGL
Qt5Test_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5Test
Qt5Widgets_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5Widgets
Qt5_DIR /usr/lib/aarch64-linux-gnu/cmake/Qt5
TBB_DIR TBB_DIR-NOTFOUND
TBB_ENV_INCLUDE /usr/include
TBB_ENV_LIB /usr/lib/aarch64-linux-gnu/libtbb.so
TBB_ENV_LIB_DEBUG TBB_ENV_LIB_DEBUG-NOTFOUND
TBB_VER_FILE /usr/include/tbb/tbb_stddef.h
Tesseract_DIR Tesseract_DIR-NOTFOUND
Tesseract_INCLUDE_DIR Tesseract_INCLUDE_DIR-NOTFOUND
Tesseract_LIBRARY Tesseract_LIBRARY-NOTFOUND
VTK_DIR VTK_DIR-NOTFOUND
WEBP_INCLUDE_DIR WEBP_INCLUDE_DIR-NOTFOUND
WITH_1394 ON
WITH_ADE ON
WITH_ARAVIS OFF
WITH_CAROTENE ON
WITH_CLP OFF
WITH_CUBLAS ON
WITH_CUDA ON
WITH_CUDNN ON
WITH_CUFFT ON
WITH_EIGEN ON
WITH_FFMPEG ON
WITH_FREETYPE OFF
WITH_GDAL OFF
WITH_GDCM OFF
WITH_GPHOTO2 OFF
WITH_GSTREAMER ON
WITH_GTK ON
WITH_GTK_2_X OFF
WITH_HALIDE OFF
WITH_HPX OFF
WITH_IMGCODEC_HDR ON
WITH_IMGCODEC_PFM ON
WITH_IMGCODEC_PXM ON
WITH_IMGCODEC_SUNRASTER ON
WITH_INF_ENGINE OFF
WITH_ITT ON
WITH_JASPER ON
WITH_JPEG ON
WITH_LAPACK ON
WITH_LIBREALSENSE OFF
WITH_MATLAB OFF
WITH_MFX OFF
WITH_NGRAPH OFF
WITH_NVCUVID ON
WITH_OPENCL ON
WITH_OPENCLAMDBLAS ON
WITH_OPENCLAMDFFT ON
WITH_OPENCL_SVM OFF
WITH_OPENEXR ON
WITH_OPENGL ON
WITH_OPENJPEG ON
WITH_OPENMP OFF
WITH_OPENNI OFF
WITH_OPENNI2 OFF
WITH_OPENVX OFF
WITH_PLAIDML OFF
WITH_PNG ON
WITH_PROTOBUF ON
WITH_PTHREADS_PF ON
WITH_PVAPI OFF
WITH_QT ON
WITH_QUIRC ON
WITH_TBB ON
WITH_TENGINE OFF
WITH_TESSERACT ON
WITH_TIFF ON
WITH_V4L ON
WITH_VA OFF
WITH_VA_INTEL OFF
WITH_VTK ON
WITH_VULKAN OFF
WITH_WEBP ON
WITH_XIMEA OFF
WITH_XINE OFF
opencv_dnn_PERF_CAFFE OFF
opencv_dnn_PERF_CLCAFFE OFF
We can see that CUDA is enable imo but also that NVCUVID is even if I thought it was not until now
END EDIT
At last I will try the ccmake function when the current build is over and edit or post the result.
Once again thank you all for your support !!
It took me more than two weeks / dozens of hours to finally make it work (my config is similar). Here's what I did (I hope I remembered everything):
my system:
Ubuntu 18.04 on i7-4790 + GTX1050Ti (driver ver. 460.39) + CUDA 10.2 + OpenCV 4.5.1 + ffmpeg
OpenCV and ffmpeg were build with CUDA support.
OpenCV build options:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_C_COMPILER=/usr/bin/gcc-7 \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=ON \
-D WITH_TBB=ON \
-D WITH_CUDA=ON \
-D WITH_NVCUVID=ON \
-D WITH_NVCUVENC=OFF \
-D BUILD_opencv_cudacodec=ON \
-D WITH_CUDNN=OFF \
-D OPENCV_DNN_CUDA=OFF \
-D CUDA_ARCH_BIN=6.1 \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D WITH_V4L=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D WITH_GSTREAMER=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_PC_FILE_NAME=opencv4.pc \
-D OPENCV_ENABLE_NONFREE=ON \
-D OPENCV_PYTHON3_INSTALL_PATH=/usr/lib/python3.6/site-packages \
-D OPENCV_EXTRA_MODULES_PATH=/path/to/opencv_contrib-4.5.1/modules \
-D PYTHON_EXECUTABLE="/usr/bin/python2" \
-D PYTHON_DEFAULT_EXECUTABLE="/usr/bin/python3" \
-D PYTHON3_EXECUTABLE="/usr/bin/python3" \
-D BUILD_EXAMPLES=ON ..
ffmpeg - I used one of many widely available tutorials on building ffmepg with CUDA support, my build looks like this:
ffmpeg version N-101174-g14dc28e969 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/home/lg/ffmpeg_build2 --pkg-config-flags=--static --extra-cflags=-I/home/lg/ffmpeg_build2/include --extra-ldflags=-L/home/lg/ffmpeg_build2/lib --extra-libs='-lpthread -lm' --bindir=/home/lg/bin2 --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags=-I/usr/local/cuda/include/ --extra-ldflags=-L/usr/local/cuda/lib64/ --enable-gpl --enable-opencl --enable-opengl --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libvpx --enable-libx264 --enable-libx265 --enable-nvenc --enable-vaapi --enable-vdpau --enable-nonfree --cpu=native --extra-cflags='-march=native'
Although compiling OpenCV 4.5.1 was successfull, the c++ samples using simple cv::cudacodec::createVideoReader() didn't work, the error was
The function/feature is not implemented) The called functionality is disabled for current build or platform in function 'throw_no_cuda'
I downloaded NVIDIA's Video_Codec_SDK_10.0.26 and copied nvcuvid.h, cuviddec.h and nvEncodeAPI.h from /Interface to CUDA's include dir (in my case /usr/local/cuda-10.2/targets/x86_64-linux/include) and to /usr/inlcude. It was probably not necessary to put all these files to both locations.
recompile OpenCV again. It was crucial to set these two options:
-D WITH_NVCUVID=ON \
-D BUILD_opencv_cudacodec=ON \
Without them the OpenCV didn't have NVCUVID module installed.
Compiling failed with error, it complained about cudaVideoCodec_AV1 is not declared or something similar, in file opencv_contrib-4.5.1/modules/cudacodec/src/video_decoder.cpp, line 81.
Since I didn't plan to use AV1, I simply removed this line. After this the compilation was finally successful.
Time to check the CUDA VideoReader sample - decoding H264 worked! But HEVC didn't - the error was unknown FourCC code in opencv_contrib-4.5.1/modules/cudacodec/src/ffmpeg_video_source.cpp (my video has 'hev1' FourCC).
So I added the missing definitions:
case CV_FOURCC_MACRO('H', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', 'e', 'v', 'c'): return HEVC;
changed to:
case CV_FOURCC_MACRO('H', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', '2', '6', '5'): // fallthru
case CV_FOURCC_MACRO('h', 'e', 'v', '1'): // fallthru
case CV_FOURCC_MACRO('h', 'v', 'c', '1'): // fallthru
case CV_FOURCC_MACRO('h', 'e', 'v', 'c'): return HEVC;
Then recompile OpenCV for the last time and finally everything works.
(This answer is only speculative; and I'll (possibly) edit it if you post information about your CMake build log.)
OpenCV is telling you that it has no_cuda, i.e. CUDA functionality is disabled for current build or platform
That means one of two things:
Despite your "best intentions" setting a bunch of CMake flags, your OpenCV was built without CUDA support. This is quite possible, since sometimes -D values are ignored in favor of what's detected, or cannot apply without certain additional settings etc. You should try using ccmake in your build directory and see what comes up.
The build is CUDA-enabled, but OpenCV code was unable to find a CUDA driver, or the CUDA runtime library, or a usable responsive GPU etc. I'm not an OpenCV expert, but assuming it offers some logging facilities, I'd check that out. #user2986898 adds that you can get the build information at run-time using the cv::getBuildInformation() function.
It might also be useful to build the tests or examples for OpenCV and check whether those work.
My Environment info:
Operating system: Ubuntu 18.04
OpenCV: 4.3.0
CUDA: 10.2
NVIDIA gpu: GEFORCE RTX 2060
My cmake list before install opencv:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_C_EXAMPLES=ON
-D INSTALL_PYTHON_EXAMPLES=OFF
-D WITH_TBB=ON \ -D WITH_CUDA=ON
-D CUDA_GENERATION=Turing \ -D BUILD_opencv_cudacodec=ON
-D ENABLE_FAST_MATH=ON
-D NVCUVID_FAST_MATH=ON
-D CUDA_FAST_MATH=ON
-D WITH_CUBLAS=ON
-D BUILD_opencv_java=OFF
-D BUILD_ZLIB=ON
-D BUILD_TIFF=ON
-D WITH_GTK=ON
-D WITH_NVCUVID=ON
-D WITH_FFMPEG=ON
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2
-D WITH_1394=ON
-D CUDNN_INCLUDE_DIR=/usr/local/cuda/include
-D CUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so.7.6.5
-D OPENCV_GENERATE_PKGCONFIG=ON
-D OPENCV_PC_FILE_NAME=opencv4.pc
-D OPENCV_ENABLE_NONFREE=ON
-D WITH_GSTREAMER=ON
-D WITH_V4L=ON
-D OPENCV_PYTHON3_INSTALL_PATH=$cwd/OpenCV-4.3.0-py3/lib/python3.5/site-packages
-D WITH_QT=ON
-D WITH_CUDNN=ON
-D OPENCV_DNN_CUDA=ON
-D WITH_OPENGL=ON
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules
-D BUILD_EXAMPLES=ON ..
After Cmake a part of output:
. .
-- Video I/O:
-- DC1394: YES (2.2.5)
-- FFMPEG: YES
-- avcodec: YES (57.107.100)
-- avformat: YES (57.83.100)
-- avutil: YES (55.78.100)
-- swscale: YES (4.8.100)
-- avresample: YES (3.7.0)
-- GStreamer: YES (1.14.5)
-- v4l/v4l2: YES (linux/videodev2.h)
--
-- Parallel framework: TBB (ver 2017.0 interface 9107)
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Intel IPP: 2020.0.0 Gold [2020.0.0]
-- at: /home/yongatek02/opencv/build/3rdparty/ippicv/ippicv_lnx/icv
-- Intel IPP IW: sources (2020.0.0)
-- at: /home/yongatek02/opencv/build/3rdparty/ippicv/ippicv_lnx/iw
-- Lapack: NO
-- Eigen: YES (ver 3.3.4)
-- Custom HAL: NO
-- Protobuf: build (3.5.1)
--
-- NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS NVCUVID FAST_MATH)
-- NVIDIA GPU arch: 75
-- NVIDIA PTX archs:
--
-- cuDNN: YES (ver 7.6.5)
--
-- OpenCL: YES (no extra features)
-- Include path: /home/yongatek02/opencv/3rdparty/include/opencl/1.2
-- Link libraries: Dynamic load . .
I tested simple cuda examples and OpenCV and working fine no problem. I tried this example to be able to decode my IP camera stream with GPU. It compiled fine with this command via on terminal:
g++ -std=c++11 codec.cpp `pkg-config --libs --cflags opencv4` -o output
Here is also my code:
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/cudacodec.hpp>
#include <opencv2/highgui.hpp>
int main(int argc, const char* argv[])
{
const std::string fname = "rtsp://usrname/ipadress..."; // Tried also different formats of videos such as YUV,mp4 webM
cv::namedWindow("GPU", cv::WINDOW_NORMAL);
cv::cuda::GpuMat d_frame;
cv::Ptr<cv::cudacodec::VideoReader> d_reader = cv::cudacodec::createVideoReader(fname);
for (;;)
{
if (!d_reader->nextFrame(d_frame))
break;
cv::Mat frame;
d_frame.download(frame);
cv::imshow("GPU", frame);
if (cv::waitKey(3) > 0)
break;
}
return 0;
}
But when I tried to run it, it gives me this error:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.3.0)
/home/yongatek02/opencv_contrib/modules/cudacodec/src/video_decoder.cpp:101:
error: (-210:Unsupported format or combination of formats) Video
source is not supported by hardware video decoder in function 'create'
Aborted (core dumped)
I also tried to use some different types of formats such as YUV, MP4, webm etc. and the error is still the same.
What I am missing here ?
I had the same problem when I was processing video files on local disk. It turned out that the cudacodec did not support the codec of its audio track. I used ffmpeg to drop the audio track and it worked properly.
ffmpeg -i input.mp4 -an output.mp4
Re: Static compilation. Qt 5.12.3
Good day
Qt Forum suggested I create a new post as the linked one is 'quite old'
This essentially serves as a confirmation of some 'bug', what the exact problem is I am not sure, but I can simply provide you with my compile script and the error.
The purpose is to compile OpenSSL against Qt, which will allow me to compile a single all-in-one binary application I can ship. I was able to achieve this but had inconsistency issues, thus bringing me back to the recompilation side.
The error compilation line repeating is shown below:
..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
#include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Question:
How can I statically compile Qt with OpenSSL using the -openssl-linked configuration flag?
Further additional details below:
My Setup Environment:
Using MinGW32 for compilation
Using OpenSSL 1.1.1d precompiled downloadable from here, it has MinGW libs which I link to, shown further down in the post.
PATH has the OpenSSL /bin added with version OpenSSL 1.1.1d 10 Sep 2019
The script I am using to compile Qt can be found here, provided by Qt on this page. For the addition of OpenSSL, I am using this as a guide.
My compile scirpt configuration is:
$QtSrcUrl = "F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1.tar",
$QtStaticDir = "F:\Qt\Static-OpenSSL-Linked",
$QtVersion = "",
$arch = "32",
$MingwDir = "",
$threads = "16",
$OPENSSL_HOME = "C:\OpenSSL\OpenSSL-Win$($arch)",
set OPENSSL_LIBS="-lssl -lcrypto"
cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -openssl-linked -I $($OPENSSL_HOME)\include -L$($OPENSSL_HOME)\lib\MinGW `
-opensource -confirm-license `
-make libs -nomake tools -nomake examples -nomake tests"
cmd /c "mingw32-make -k -j$($threads)"
I already have OpenSSL installed at
PS C:\OpenSSL\OpenSSL-Win32> ls
Directory: C:\OpenSSL\OpenSSL-Win32
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2019/09/30 07:27 bin
d----- 2019/09/30 07:27 exp
d----- 2019/09/30 07:27 include
d----- 2019/09/30 07:27 lib
d----- 2019/09/30 07:27 tests
-a---- 2019/09/11 18:10 89 acknowledgements.txt
-a---- 2019/09/11 18:10 752 authors.txt
-a---- 2019/09/11 18:10 596279 changes.txt
-a---- 2019/09/11 18:10 6408 c_rehash.pl
-a---- 2019/09/11 18:10 86 faq.txt
-a---- 2019/09/11 18:10 2515456 libcrypto-1_1.dll
-a---- 2019/09/11 18:10 530432 libssl-1_1.dll
-a---- 2019/09/11 18:10 6246 license.txt
-a---- 2019/09/11 18:10 43136 news.txt
-a---- 2019/09/11 18:10 3251 readme.txt
-a---- 2019/09/30 07:27 96904 unins000.dat
-a---- 2019/09/30 07:26 730789 unins000.exe
I saw some posts refering to %OPENSSL_HOME% and %OPENSSL_HOME%\libs and using an env variable set as
OPENSSL_LIBS="-lssl -lcrypto"
which I tried, but always complained that "-lssl" could not be found. Thus I opted for the following dir, and it appeared to work correctly and picked up -lssl -lcrypto (not sure if this may be an accomplice with the compilation issue).
PS C:\OpenSSL\OpenSSL-Win32\lib\MinGW> ls
Directory: C:\OpenSSL\OpenSSL-Win32\lib\MinGW
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2019/09/11 18:11 3347286 libcrypto.a
-a---- 2019/09/11 18:10 109020 libcrypto.def
-a---- 2019/09/11 18:11 385126 libssl.a
-a---- 2019/09/11 18:10 14033 libssl.def
Configuration Summary: (the important bit)
Qt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
Schannel ............................... no
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ yes
OpenSSL 1.1 ............................ yes
DTLS ................................... yes
OCSP-stapling .......................... yes
SCTP ................................... no
Use system proxies ..................... yes
Further examples of the error line can be seen below:
In file included from uiautomation\qwindowsuiabaseprovider.h:50:0,
from uiautomation\qwindowsuiabaseprovider.cpp:43:
..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
#include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[6]: *** [Makefile.Debug:11357: .obj/debug/qwindowsuiabaseprovider.o] Error 1
g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -ffunction-sections -fdata-sections -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_CAST_FROM_ASCII -DQT_NO_FOREACH -DLIBEGL_NAME=libEGL -DLIBGLESV2_NAME=libGLESv2 -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_WINDOWSUIAUTOMATION_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_PLUGIN_RESOURCE_INIT_FUNCTION=qwindowsd_plugin_resource_init -I. -I. -I..\..\..\3rdparty\wintab -I..\..\..\..\include -I..\..\..\..\include\QtEventDispatcherSupport -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1 -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1\QtEventDispatcherSupport -I..\..\..\..\include\QtFontDatabaseSupport -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1 -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1\QtFontDatabaseSupport -I..\..\..\..\include\QtThemeSupport -I..\..\..\..\include\QtThemeSupport\5.13.1 -I..\..\..\..\include\QtThemeSupport\5.13.1\QtThemeSupport -I..\..\..\..\include\QtAccessibilitySupport -I..\..\..\..\include\QtAccessibilitySupport\5.13.1 -I..\..\..\..\include\QtAccessibilitySupport\5.13.1\QtAccessibilitySupport -I..\..\..\..\include\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1 -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtGui\5.13.1 -I..\..\..\..\include\QtGui\5.13.1\QtGui -I..\..\..\..\include\QtGui -I..\..\..\..\include\QtCore\5.13.1 -I..\..\..\..\include\QtCore\5.13.1\QtCore -I..\..\..\..\include\QtCore -I.moc\debug -IC:\OpenSSL\OpenSSL-Win32\include -I..\..\..\..\mkspecs\win32-g++ -o .obj\debug\qwindowsuiavalueprovider.o uiautomation\qwindowsuiavalueprovider.cpp
and another example
In file included from ..\windows\uiautomation\qwindowsuiabaseprovider.h:50:0,
from ..\windows\uiautomation\qwindowsuiagriditemprovider.h:46,
from ..\windows\uiautomation\qwindowsuiagriditemprovider.cpp:43:
..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
#include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[6]: *** [Makefile.Debug:14323: .obj/debug/qwindowsuiagriditemprovider.o] Error 1
g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -ffunction-sections -fdata-sections -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_CAST_FROM_ASCII -DQT_NO_FOREACH -DLIBEGL_NAME=libEGL -DLIBGLESV2_NAME=libGLESv2 -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_WINDOWSUIAUTOMATION_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_PLUGIN_RESOURCE_INIT_FUNCTION=qdirect2dd_plugin_resource_init -I. -I..\windows -I..\..\..\3rdparty\wintab -I..\..\..\..\include -I..\..\..\..\include\QtEventDispatcherSupport -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1 -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1\QtEventDispatcherSupport -I..\..\..\..\include\QtFontDatabaseSupport -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1 -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1\QtFontDatabaseSupport -I..\..\..\..\include\QtThemeSupport -I..\..\..\..\include\QtThemeSupport\5.13.1 -I..\..\..\..\include\QtThemeSupport\5.13.1\QtThemeSupport -I..\..\..\..\include\QtAccessibilitySupport -I..\..\..\..\include\QtAccessibilitySupport\5.13.1 -I..\..\..\..\include\QtAccessibilitySupport\5.13.1\QtAccessibilitySupport -I..\..\..\..\include\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1 -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtGui\5.13.1 -I..\..\..\..\include\QtGui\5.13.1\QtGui -I..\..\..\..\include\QtGui -I..\..\..\..\include\QtCore\5.13.1 -I..\..\..\..\include\QtCore\5.13.1\QtCore -I..\..\..\..\include\QtCore -I.moc\debug -IC:\OpenSSL\OpenSSL-Win32\include -I..\..\..\..\mkspecs\win32-g++ -o .obj\debug\qwindowsuiawindowprovider.o ..\windows\uiautomation\qwindowsuiawindowprovider.cpp
The last few lines before compilation completion, I have this:
F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\bin\qmake.exe -install qinstall F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\mkspecs\winrt-x86-msvc2017 F:\Qt\Static-OpenSSL-Linked\5.13.1_x32\mkspecs\winrt-x86-msvc2017
F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\bin\qmake.exe -install qinstall F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\mkspecs\winrt-x86-msvc2019 F:\Qt\Static-OpenSSL-Linked\5.13.1_x32\mkspecs\winrt-x86-msvc2019
mingw32-make[1]: Target 'install' not remade because of errors.
mingw32-make[1]: Leaving directory 'F:/Qt/Static-OpenSSL-Linked/src/qt-everywhere-src-5.13.1/qtbase'
mingw32-make: *** [Makefile:94: module-qtbase-install_subtargets] Error 2
mingw32-make: Target 'install' not remade because of errors.
Configuration Summary:
Build type: win32-g++ (i386, CPU features: <none>)
Compiler: gcc 7.3.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples f16c largefile optimize_debug precompile_header rdrnd shani x86SimdAlways debug_and_release release debug build_all c++11 c++14 c++1z concurrent dbus no-pkg-config release_tools static stl
Build options:
Mode ................................... debug and release; default link: debug; optimized tools
Optimize debug build ................... yes
Optimize release build for size ........ no
Building shared libraries .............. no
Using C standard ....................... C11
Using C++ standard ..................... C++17
Generating GDB index ................... no
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
AVX .................................. AVX AVX2
AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
Other x86 ............................ AES F16C RDRAND SHA
Intrinsics without -mXXX option ...... yes
Build parts ............................ libs
App store compliance ................... no
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... no
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... no
udev ................................... no
Using system zlib ...................... no
Zstandard support ...................... no
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... no
iconv .................................. no
ICU .................................... no
Built-in copy of the MIME database ..... yes
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
Schannel ............................... no
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ yes
OpenSSL 1.1 ............................ yes
DTLS ................................... yes
OCSP-stapling .......................... yes
SCTP ................................... no
Use system proxies ..................... yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ no
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. no
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ no
EGL .................................... no
OpenVG ................................. no
OpenGL:
ANGLE ................................ no
Desktop OpenGL ....................... yes
Dynamic OpenGL ....................... no
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 ........................ no
Vulkan ................................. no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. no
libinput ............................... no
INTEGRITY HID .......................... no
mtdev .................................. no
tslib .................................. no
xkbcommon .............................. no
X11 specific:
XLib ................................. no
XCB Xlib ............................. no
EGL on X11 ........................... no
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
LinuxFB ................................ no
VNC .................................... no
Mir client ............................. no
Windows:
Direct 2D ............................ yes
DirectWrite .......................... yes
DirectWrite 2 ........................ yes
Qt Sql:
SQL item models ........................ yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows WindowsVista
Qt PrintSupport:
CUPS ................................... no
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Testlib:
Tester for item models ................. yes
Qt SerialBus:
Socket CAN ............................. no
Socket CAN FD .......................... no
SerialPort Support ..................... yes
Further Image Formats:
JasPer ................................. no
MNG .................................... no
TIFF ................................... yes
Using system libtiff ................. no
WEBP ................................... yes
Using system libwebp ................. no
Qt QML:
QML network support .................... yes
QML debugging and profiling support .... yes
QML tracing JIT support ................ no
QML sequence object .................... yes
QML list model ......................... yes
QML XML http request ................... yes
QML Locale ............................. yes
QML delegate model ..................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Qt Quick Designer .......... yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
TableView item ......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
Repeater item .......................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Scxml:
ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
Assimp ................................. yes
System Assimp .......................... no
Output Qt3D Job traces ................. no
Output Qt3D GL traces .................. no
Use SSE2 instructions .................. no
Use AVX2 instructions .................. no
Aspects:
Render aspect ........................ yes
Input aspect ......................... yes
Logic aspect ......................... yes
Animation aspect ..................... yes
Extras aspect ........................ yes
Qt 3D Renderers:
OpenGL Renderer ........................ yes
Qt 3D GeometryLoaders:
Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
WinRT Bluetooth API (desktop & UWP) .... no
WinRT advanced bluetooth low energy API (desktop & UWP) . no
Qt Sensors:
sensorfw ............................... no
Qt Quick Controls 2:
Styles ................................. Default Fusion Imagine Material Universal
Qt Quick Templates 2:
Hover support .......................... yes
Multi-touch support .................... yes
Qt Positioning:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Location:
Qt.labs.location experimental QML plugin . yes
Geoservice plugins:
OpenStreetMap ........................ yes
HERE ................................. yes
Esri ................................. yes
Mapbox ............................... yes
MapboxGL ............................. yes
Itemsoverlay ......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt Multimedia:
ALSA ................................... no
GStreamer 1.0 .......................... no
GStreamer 0.10 ......................... no
Video for Linux ........................ no
OpenAL ................................. no
PulseAudio ............................. no
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. yes
Windows Media Foundation ............... no
Qt Tools:
QDoc ................................... no
Qt WebEngineCore:
Qt WebEngine Widgets ................... yes
Qt WebEngine Qml ....................... yes
Embedded build ......................... no
Full debug information ................. no
Pepper Plugins ......................... yes
Printing and PDF ....................... yes
Proprietary Codecs ..................... no
Spellchecker ........................... yes
Native Spellchecker .................... no
WebRTC ................................. yes
Use System Ninja ....................... no
Geolocation ............................ yes
WebChannel support ..................... yes
Use v8 snapshot ........................ yes
Kerberos Authentication ................ yes
Extensions ............................. yes
Qt WebEngineQml:
UI Delegates ........................... yes
Test Support ........................... no
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.
Note: When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
Error message from Xcode
I need to use ximgproc module from OpenCV_contrib into my Xcode project. When I run the project I have an error like above.
Xcode 9.1 (9B55)
Target: iOS 11
OpenCV -> https://github.com/opencv/opencv
OpenCV_Contrib -> https://github.com/opencv/opencv_contrib
I have connected modules from these two libraries into one opencv2.framework .
xcrun -sdk iphoneos lipo -info ios/opencv2.framework/opencv2
Architectures in the fat file: ios/opencv2.framework/opencv2 are: armv7 armv7s i386 x86_64 arm64
Architectures are fine.
Below Xcode project settings:
Xcode configuration
I am stuck. I was trying everything.
I was trying everything according to:
http://ioscake.com/how-to-compile-opencv-for-ios7-arm64.html
https://www.extendi.it/blog/2015/5/22/46-how-to-add-opencv-2-4-11-in-your-ios-project -> I added also extra libraries to the project:
Accelerate
AssetsLibrary
AVFoundation
CoreGraphics
CoreImage
CoreMedia
CoreVideo
QuartzCore
UIKit
Foundation
and
libc++.dylib
Has anyone idea how to solve the problem?
I installed OpenCV3.3 with CUDA in ubuntu 16.04.
I tried to build OpenCV with CUDA sample code.
Code compile succeeded but I faced following error message when I executed binary.
error message is "* stack smashing detected *: ./test terminated
Aborted (core dumped)"
I want to delete this error message. How do I fix code or settings ?
my test code is
#include <opencv2/core.hpp>
#include <opencv2/core/cuda.hpp>
#include <opencv2/imgcodecs.hpp>
#include <iostream>
using namespace cv;
int main(int argc, const char* argv[])
{
// view OpenCV build information
std::cout << cv::getBuildInformation() << std::endl;
// view CUDA infomation
int dev_id = cv::cuda::getDevice();
std::cout << "cuda get device id is " << dev_id << " getCudaEnabledDeviceCount is " << cv::cuda::getCudaEnabledDeviceCount() << std::endl;
cv::cuda::setDevice(dev_id);
cv::cuda::printCudaDeviceInfo(dev_id);
cv::cuda::resetDevice();
}
and message
----------
General configuration for OpenCV 3.3.0 =====================================
Version control: unknown
Platform:
Timestamp: 2017-08-23T01:49:09Z
Host: Linux 4.10.0-32-generic x86_64
CMake: 3.5.1
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: RELEASE
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2
SSE4_1 (2 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 5.4.0)
C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef dow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -mssisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef dow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -mssisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissin-Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse-DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissin-Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse-O0 -DDEBUG -D_DEBUG
Linker flags (Release):
Linker flags (Debug):
ccache: NO
Precompiled headers: YES
Extra dependencies: /usr/lib/x86_64-linux-gnu/libcuda.so /usr/lib/libnvcuvid.so Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent Qt5::OpenGL /usr/lib/x86_64-linux-gnu/libpng.so /usr//lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-li-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so gstbase-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 gstvideo-1.0 gstapp-1.0 gstriff-1.0 gstpbutils-1.0 dc1394 avcodec-ffmpeg avformat-ffmpeg avutle-ffmpeg dl m pthread rt /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libtbb.so cudart nppc nppi npps cublas cufft -L/usr/local/cuda-8.0/lib64
3rdparty dependencies:
OpenCV modules:
To be built: cudev core cudaarithm flann imgproc ml objdetect video cudabgsegm cudafilters cudaimgproc cudawarping dnn imgcodecs photo shape videoio cudacodec highgui features2d calib3bjdetect cudaoptflow cudastereo stitching superres videostab python3
Disabled: world
Disabled by dependency: -
Unavailable: java python2 ts viz
GUI:
QT 5.x: YES (ver 5.5.1)
QT OpenGL support: YES (Qt5::OpenGL 5.5.1)
OpenGL support: YES (/usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so)
VTK support: NO
Media I/O:
ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
WEBP: build (ver encoder: 0x020e)
PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)
TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.6)
JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux
GDAL: NO
GDCM: NO
Video I/O:
DC1394 1.x: NO
DC1394 2.x: YES (ver 2.2.4)
FFMPEG: YES
avcodec: YES (ver 56.60.100)
avformat: YES (ver 56.40.101)
avutil: YES (ver 54.31.100)
swscale: YES (ver 3.1.101)
avresample: YES (ver 2.1.0)
GStreamer:
base: YES (ver 1.8.3)
video: YES (ver 1.8.3)
app: YES (ver 1.8.3)
riff: YES (ver 1.8.3)
pbutils: YES (ver 1.8.3)
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
Aravis SDK: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: NO/YES
XIMEA: NO
Xine: NO
Intel Media SDK: NO
gPhoto2: NO
Parallel framework: TBB (ver 4.4 interface 9002)
Trace: YES (with Intel ITT)
Other third-party libraries:
Use Intel IPP: 2017.0.2 [2017.0.2]
at: /home/test/OpenCv/opencv-3.3.0/build/3rdparty/ippicv/ippicv_lnx
Use Intel IPP IW: prebuilt binaries (2017.0.2)
Use Intel IPP Async: NO
Use VA: NO
Use Intel VA-API/OpenCL: NO
Use Lapack: NO
Use Eigen: YES (ver 3.2.92)
Use Cuda: YES (ver 8.0)
Use OpenCL: YES
Use OpenVX: NO
Use custom HAL: NO
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: YES
USE NVCUVID: YES
NVIDIA GPU arch: 20 30 35 37 50 52 60 61
NVIDIA PTX archs:
Use fast math: YES
OpenCL: <Dynamic loading of OpenCL library>
Include path: /home/test/OpenCv/opencv-3.3.0/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: /usr/bin/python2.7 (ver 2.7.12)
Python 3:
Interpreter: /usr/bin/python3 (ver 3.5.2)
Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2)
numpy: /usr/local/lib/python3.5/dist-packages/numpy/core/include (ver 1.13.1)
packages path: lib/python3.5/dist-packages
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab: Matlab not found or implicitly disabled
Documentation:
Doxygen: NO
Tests and samples:
Tests: NO
Performance tests: NO
C/C++ Examples: YES
Install path: /usr/local
cvconfig.h is in: /home/test/OpenCv/opencv-3.3.0/build
-----------------------------------------------------------------
cuda get device id is 0 getCudaEnabledDeviceCount is 1
*** CUDA Device Query (Runtime API) version (CUDART static linking) ***
Device count: 1
Device 0: "GeForce GTX 1080"
CUDA Driver Version / Runtime Version 8.0 / 8.0
CUDA Capability Major/Minor version number: 6.1
Total amount of global memory: 8112 MBytes (8506048512 bytes)
GPU Clock Speed: 1.73 GHz
Max Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072,65536), 3D=(16384,16384,16384)
Max Layered Texture Size (dim) x layers 1D=(32768) x 2048, 2D=(32768,32768) x 2048
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 x 1024 x 64
Maximum sizes of each dimension of a grid: 2147483647 x 65535 x 65535
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and execution: Yes with 2 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Concurrent kernel execution: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support enabled: No
Device is using TCC driver mode: No
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 2 / 0
Compute Mode:
Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1
*** stack smashing detected ***: ./test terminated
Aborted (core dumped)
----------
How fixed this error?
I get "stack smashing" quite often. The CUDA code is in a static library, linked in a simple CLI executable. A Clean Rebuild always makes it go away. I suspect my IDE is not rebuilding and relinking edited files as it should.