Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.63 compile failed #330

Closed
wellitecho opened this issue Mar 15, 2022 · 2 comments
Closed

0.63 compile failed #330

wellitecho opened this issue Mar 15, 2022 · 2 comments

Comments

@wellitecho
Copy link

wellitecho commented Mar 15, 2022

Windows 11 Pro 22000.556
OpenCV 4.5.5 installed by: choco install llvm opencv
(at first I tried to use vcpkg to install llvm, but it failed due to insufficient hard drive storage. Then I used choco to successfully install llvm and opencv. Also I tried #326 , to no avail).
rustc 1.58.1 (db9d1b20b 2022-01-20)

Full output is some 2000+ lines, so I pasted it here
some of it are:

[opencv 0.63.0] === Crate version: Some("0.63.0")
[opencv 0.63.0] === Environment configuration:
[opencv 0.63.0] ===   OPENCV_PACKAGE_NAME = None
[opencv 0.63.0] ===   OPENCV_PKGCONFIG_NAME = None
[opencv 0.63.0] ===   OPENCV_CMAKE_NAME = None
[opencv 0.63.0] ===   OPENCV_CMAKE_BIN = None
[opencv 0.63.0] ===   OPENCV_VCPKG_NAME = None
[opencv 0.63.0] ===   OPENCV_LINK_LIBS = Some("opencv_world455")
[opencv 0.63.0] ===   OPENCV_LINK_PATHS = Some("c:\\tools\\opencv\\build\\x64\\vc15\\lib")
[opencv 0.63.0] ===   OPENCV_INCLUDE_PATHS = Some("c:\\tools\\opencv\\build\\include")
[opencv 0.63.0] ===   OPENCV_DISABLE_PROBES = None
[opencv 0.63.0] ===   CMAKE_PREFIX_PATH = None
[opencv 0.63.0] ===   OpenCV_DIR = None
[opencv 0.63.0] ===   PKG_CONFIG_PATH = None
[opencv 0.63.0] ===   VCPKG_ROOT = None
[opencv 0.63.0] ===   VCPKGRS_DYNAMIC = Some("true")
[opencv 0.63.0] === Enabled features:
[opencv 0.63.0] ===   ALPHAMAT
[opencv 0.63.0] ===   ARUCO
[opencv 0.63.0] ===   BARCODE
[opencv 0.63.0] ===   BGSEGM
[opencv 0.63.0] ===   BIOINSPIRED
[opencv 0.63.0] ===   CALIB3D
[opencv 0.63.0] ===   CCALIB
[opencv 0.63.0] ===   CUDAARITHM
[opencv 0.63.0] ===   CUDABGSEGM
[opencv 0.63.0] ===   CUDACODEC
[opencv 0.63.0] ===   CUDAFEATURES2D
[opencv 0.63.0] ===   CUDAFILTERS
[opencv 0.63.0] ===   CUDAIMGPROC
[opencv 0.63.0] ===   CUDAOBJDETECT
[opencv 0.63.0] ===   CUDAOPTFLOW
[opencv 0.63.0] ===   CUDASTEREO
[opencv 0.63.0] ===   CUDAWARPING
[opencv 0.63.0] ===   CVV
[opencv 0.63.0] ===   DEFAULT
[opencv 0.63.0] ===   DNN
[opencv 0.63.0] ===   DNN_SUPERRES
[opencv 0.63.0] ===   DPM
[opencv 0.63.0] ===   FACE
[opencv 0.63.0] ===   FEATURES2D
[opencv 0.63.0] ===   FLANN
[opencv 0.63.0] ===   FREETYPE
[opencv 0.63.0] ===   FUZZY
[opencv 0.63.0] ===   GAPI
[opencv 0.63.0] ===   HDF
[opencv 0.63.0] ===   HFS
[opencv 0.63.0] ===   HIGHGUI
[opencv 0.63.0] ===   IMGCODECS
[opencv 0.63.0] ===   IMGPROC
[opencv 0.63.0] ===   IMG_HASH
[opencv 0.63.0] ===   INTENSITY_TRANSFORM
[opencv 0.63.0] ===   LINE_DESCRIPTOR
[opencv 0.63.0] ===   MCC
[opencv 0.63.0] ===   ML
[opencv 0.63.0] ===   OBJDETECT
[opencv 0.63.0] ===   OPTFLOW
[opencv 0.63.0] ===   OVIS
[opencv 0.63.0] ===   PHASE_UNWRAPPING
[opencv 0.63.0] ===   PHOTO
[opencv 0.63.0] ===   PLOT
[opencv 0.63.0] ===   QUALITY
[opencv 0.63.0] ===   RAPID
[opencv 0.63.0] ===   RGBD
[opencv 0.63.0] ===   SALIENCY
[opencv 0.63.0] ===   SFM
[opencv 0.63.0] ===   SHAPE
[opencv 0.63.0] ===   STEREO
[opencv 0.63.0] ===   STITCHING
[opencv 0.63.0] ===   STRUCTURED_LIGHT
[opencv 0.63.0] ===   SUPERRES
[opencv 0.63.0] ===   SURFACE_MATCHING
[opencv 0.63.0] ===   TEXT
[opencv 0.63.0] ===   TRACKING
[opencv 0.63.0] ===   VIDEO
[opencv 0.63.0] ===   VIDEOIO
[opencv 0.63.0] ===   VIDEOSTAB
[opencv 0.63.0] ===   VIZ
[opencv 0.63.0] ===   WECHAT_QRCODE
[opencv 0.63.0] ===   XFEATURES2D
[opencv 0.63.0] ===   XIMGPROC
[opencv 0.63.0] ===   XOBJDETECT
[opencv 0.63.0] ===   XPHOTO
[opencv 0.63.0] === Detected probe priority based on environment vars: pkg_config: false, cmake: false, vcpkg: true
[opencv 0.63.0] === Probing the OpenCV library in the following order: environment, vcpkg_cmake, vcpkg, pkg_config, cmake
[opencv 0.63.0] === Configuring OpenCV library from the environment:
[opencv 0.63.0] ===   include_paths: c:\tools\opencv\build\include
[opencv 0.63.0] ===   link_paths: c:\tools\opencv\build\x64\vc15\lib
[opencv 0.63.0] ===   link_libs: opencv_world455
[opencv 0.63.0] === OpenCV library configuration: Library {
[opencv 0.63.0]     include_paths: [
[opencv 0.63.0]         "c:\\tools\\opencv\\build\\include",
[opencv 0.63.0]     ],
[opencv 0.63.0]     version: Version {
[opencv 0.63.0]         major: 4,
[opencv 0.63.0]         minor: 5,
[opencv 0.63.0]         patch: 5,
[opencv 0.63.0]     },
[opencv 0.63.0]     cargo_metadata: [
[opencv 0.63.0]         "cargo:rustc-link-search=c:\\tools\\opencv\\build\\x64\\vc15\\lib",
[opencv 0.63.0]         "cargo:rustc-link-lib=opencv_world455",
[opencv 0.63.0]     ],
[opencv 0.63.0] }
[opencv 0.63.0] cargo:rustc-cfg=ocvrs_opencv_branch_4
[opencv 0.63.0] === Detected OpenCV module header dir at: c:\tools\opencv\build\include\opencv2
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_PACKAGE_NAME
[opencv 0.63.0] === Found OpenCV version: 4.5.5 in headers located at: c:\tools\opencv\build\include
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_PKGCONFIG_NAME
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_CMAKE_NAME
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_CMAKE_BIN
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_VCPKG_NAME
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_LINK_LIBS
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_LINK_PATHS
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_INCLUDE_PATHS
[opencv 0.63.0] cargo:rerun-if-env-changed=OPENCV_DISABLE_PROBES
[opencv 0.63.0] cargo:rerun-if-env-changed=CMAKE_PREFIX_PATH
[opencv 0.63.0] cargo:rerun-if-env-changed=OpenCV_DIR
[opencv 0.63.0] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[opencv 0.63.0] cargo:rerun-if-env-changed=VCPKG_ROOT
[opencv 0.63.0] cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\alphamat.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\aruco.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\bioinspired.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\ccalib.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\core.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\dnn.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\face.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\gapi.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\hdf.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\manual-core.cpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\manual-dnn.cpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\manual-features2d.cpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\ocvrs_common.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\photo.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\sfm.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\videoio.hpp
[opencv 0.63.0] cargo:rerun-if-changed=C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src_cpp\xfeatures2d.hpp
[opencv 0.63.0] cargo:rerun-if-changed=Cargo.toml
[opencv 0.63.0] === Generating code in: c:\Users\username\cargo_target_dir\debug\build\opencv-10d26f06b09d77df\out
[opencv 0.63.0] === Placing generated bindings into: C:\Users\username\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\opencv-0.63.0\src\opencv
[opencv 0.63.0] === Using OpenCV headers from: c:\tools\opencv\build\include
[opencv 0.63.0] === Clang: clang version 13.0.1
[opencv 0.63.0] === Clang command line args: [
[opencv 0.63.0]     "-isystemc:\\mingw64\\include\\c++\\11.2.0",
[opencv 0.63.0]     "-isystemc:\\mingw64\\include\\c++\\11.2.0\\x86_64-w64-mingw32",
[opencv 0.63.0]     "-isystemc:\\mingw64\\include\\c++\\11.2.0\\backward",
[opencv 0.63.0]     "-isystemc:\\mingw64\\lib\\clang\\13.0.0\\include",
[opencv 0.63.0]     "-isystemc:\\mingw64\\x86_64-w64-mingw32\\include",
[opencv 0.63.0]     "-isystemc:\\mingw64\\include",
[opencv 0.63.0]     "-IC:\\tools\\opencv\\build\\include",
[opencv 0.63.0]     "-FC:\\tools\\opencv\\build\\include",
[opencv 0.63.0]     "-IC:\\Users\\username\\.cargo\\registry\\src\\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\\opencv-0.63.0\\src_cpp",
[opencv 0.63.0]     "-FC:\\Users\\username\\.cargo\\registry\\src\\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\\opencv-0.63.0\\src_cpp",
[opencv 0.63.0]     "-DOCVRS_PARSING_HEADERS",
[opencv 0.63.0]     "-includeocvrs_ephemeral.hpp",
[opencv 0.63.0]     "-std=c++14",
[opencv 0.63.0] ]
[opencv 0.63.0] === WARNING: 22 diagnostic messages
[opencv 0.63.0] ===    fatal error: too many errors emitted, stopping now [-ferror-limit=]
[opencv 0.63.0] ===    c:\mingw64\include\c++\11.2.0\x86_64-w64-mingw32\bits/c++config.h:573:2: warning: "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-W#warnings]
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:388:47: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:389:48: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:391:53: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:396:26: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:681:69: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:683:48: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdlib.h:684:55: error: expected ';' after top level declarator
[opencv 0.63.0] ===    c:\mingw64\x86_64-w64-mingw32\include\stdio.h:184:63: error: expected ';' after top level declarator

@twistedfall
Copy link
Owner

I see that you're using mingw toolchain, there were reports that it was causing issues, will you please follow the comments in #322 and #305 to see if that helps.

@wellitecho
Copy link
Author

Uninstalled Visual Studio 2019, installed Visual Studio 2022, problem solved. Don't know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants