Open MattBelanger321 opened 1 year ago
Have you solved this error?
ybe this can be a simple as adding the fix to conan
Package and Environment Details
not yet
I am slso getting "error: control reaches end of non-void function [-Werror=return-type]" when building the gapi file: ~/.conan/data/opencv/4.5.5///build/2d1073e04ab069672479e5d847b9070b3b0cca28/src/modules/gapi/src/compiler/gislandmodel.cpp:
I'm trying to manually set -Wno-error -Wno-return-type
manually via CXX
, CMAKE_CXX_FLAGS
environment variables but the build seems to ignore those. Really painful as I cannot build OpenCV through conan on gcc121
Has anyone figured how to build this yet?
I think, this is not conan error. I tried to build OpenCV 4.5.2, 4.6.0 from official repo manually and met the same error. I used next flags:
cmake -D CMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./install -DWITH_CUDA=OFF -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -DWITH_QUIRC=OFF -DBUILD_JAVA=OFF ..
The version 4.7.0 was the only successful to build.
Its not conan but OpenCV corrected this error already. Do they need need to upload to cinan again or something?
did you build version 4.7.0 using conan? I do not see 4.7.0 here: https://conan.io/center/opencv , I am curious to how you accomplished this. I am using conan version 1 as an FYI
Description
There is a function in the library that has an Assert(false) instead of a return value but conan forces OpenCV to be built with -Werror=return-type so this is treated as an error.
src/modules/gapi/src/compiler/gislandmodel.cpp:124:1: error: control reaches end of non-void function [-Werror=return-type] 124 | }
I saw that warning was corrected in the opencv issues so maybe this can be a simple as adding the fix to conan
Package and Environment Details
Conan profile
[settings] os=Linux os_build=Linux arch=x86_64 arch_build=x86_64 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 build_type=Release [options] [build_requires] [env] [conf] tools.system.package_manager:mode=install
Steps to reproduce
conan install .. -s build_type=Debug --build missing
with conanfile.txt:
` [requires]
zlib/1.2.13
eigen/3.4.0 gtest/1.10.0
opencv/4.3.0@conan/stable
opencv/4.5.5 spdlog/1.11.0
spdlog/1.8.2
fmt/9.1.0
nlohmann_json/3.9.1
nlohmann_json/3.10.5 rapidjson/1.1.0 ixwebsocket/11.4.3 glm/0.9.9.8 redis-plus-plus/1.3.3
protobuf/3.21.4
lib usb to list usb devices
libusb/1.0.26
This is required for serial port communication
serial/1.2.1
fourier transform for signal processing
fftw/3.3.9 zlib/1.2.13 json-schema-validator/2.1.0
[generators] cmake_paths
cmake_find_package CMakeDeps
[options]
opencv:shared=True
opencv:with_cuda=False
opencv:contrib=True
opencv:contrionfigure made a mistake, make sure you are using the latestb_freetype=False
the following libraries depende on webp, which depends on libvpr which is not supporting vs17 yet(libvpr-11.0)!
opencv:with_webp=False
opencv:with_tiff=False
opencv:with_ffmpeg=False
[imports] bin, .dll -> ./bin # Copies all dll files from packages bin folder to my local "bin" folder lib, .dylib* -> ./bin # Copies all dylib files from packages lib folder to my local "bin" folder
./res/bindings, imgui_impl_glfw.cpp -> ./bindings ./res/bindings, imgui_impl_opengl3.cpp -> ./bindings ./res/bindings, imgui_impl_glfw.h -> ./bindings ./res/bindings, imgui_impl_opengl3_loader.h -> ./bindings ./res/bindings, imgui_impl_opengl3.h -> ./bindings
., license* -> ./licenses @ folder=True, ignore_case=True `
Logs
Click to expand log
``` -- Conan: Target declared 'vulkan-headers::vulkan-headers' -- Allocator metrics storage type: 'long long' -- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /root/.conan/data/opencv/4.5.5/_/_/build/0cdf0e505083b7936c10c8382552d563d196c28c/src/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake -- Performing Test HAVE_CXX_WNO_DEPRECATED -- Performing Test HAVE_CXX_WNO_DEPRECATED - Success -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES -- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS -- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success -- Performing Test HAVE_CXX_WNO_SHADOW -- Performing Test HAVE_CXX_WNO_SHADOW - Success -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER -- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE -- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success -- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF -- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success -- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE -- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Success -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS -- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success -- opencv_dnn: filter out ocl4dnn source code -- opencv_dnn: filter out cuda4dnn source code -- Excluding from source files list: