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

[package] OpenCV/4.5.5: LNK1104 opencv_xobjdetect455 #10997

Closed
xakod opened this issue May 31, 2022 · 1 comment · Fixed by #11009
Closed

[package] OpenCV/4.5.5: LNK1104 opencv_xobjdetect455 #10997

xakod opened this issue May 31, 2022 · 1 comment · Fixed by #11009
Labels
bug Something isn't working

Comments

@xakod
Copy link
Contributor

xakod commented May 31, 2022

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: opencv/4.5.5
  • Operating System+version: Microsoft Windows Server 2019 Standard Evaluation 10.0.17763 N/A Build 17763
  • Compiler+version: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30143 for x64
  • Conan version: conan 1.47.0
  • Python version: Python 3.10.4

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MDd
compiler.version=16
os=Windows
os_build=Windows

Steps to reproduce (Include if Applicable)

conanfile:

[requires]
opencv/4.5.5

[options]
opencv:contrib=True
opencv:with_ffmpeg=False
opencv:dnn=False
opencv:with_ade=False

[generators]
cmake_find_package

cmake:

find_package(OpenCV REQUIRED)
add_executable(plot plot_demo.cpp)

# Use the global target
target_link_libraries(plot opencv::opencv)

plot_demo.cpp: https://raw.githubusercontent.com/opencv/opencv_contrib/master/modules/plot/samples/plot_demo.cpp

Logs (Include/Attach if Applicable)

Click to expand log
Linking CXX executable C:\Users\user\source\project\bin\plot.exe
FAILED: C:/Users/user/source/project/bin/plot.exe 
cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=services\lobe_binary_accessor\CMakeFiles\plot.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\plot.rsp  /out:C:\Users\user\source\project\bin\plot.exe /implib:services\lobe_binary_accessor\plot.lib /pdb:C:\Users\user\source\project\bin\plot.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\plot.rsp /out:C:\Users\user\source\project\bin\plot.exe /implib:services\lobe_binary_accessor\plot.lib /pdb:C:\Users\user\source\project\bin\plot.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console /MANIFEST /MANIFESTFILE:services\lobe_binary_accessor\CMakeFiles\plot.dir/intermediate.manifest services\lobe_binary_accessor\CMakeFiles\plot.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'opencv_xobjdetect455d.lib'
ninja: build stopped: subcommand failed.
@xakod xakod added the bug Something isn't working label May 31, 2022
@xakod xakod changed the title [package] <OpenCV>/<4.5.5>: LNK1104 opencv_xobjdetect455 [package] OpenCV/4.5.5: LNK1104 opencv_xobjdetect455 May 31, 2022
@xakod
Copy link
Contributor Author

xakod commented Jun 1, 2022

get_target_property(OUT opencv::opencv_xobjdetect INTERFACE_LINK_LIBRARIES)
message(STATUS ${OUT})

message(STATUS ${opencv_LIBRARY_LIST})
message(STATUS ${opencv_LIB_DIRS})

file(GLOB CVPLOT_LIB_FILES ${opencv_LIB_DIRS}/*.lib)
message(STATUS ${CVPLOT_LIB_FILES})

OUT:

opencv_xobjdetect455dopencv::opencv_coreopencv::opencv_flannopencv::opencv_imgprocopencv::opencv_features2dopencv::opencv_imgcodecsopencv::opencv_calib3dopencv::opencv_objdetectEigen3::Eigen3$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:>$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:>$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:>

opencv_LIBRARY_LIST:

opencv_stitching455dopencv_quality455dopencv_reg455dopencv_surface_matching455dopencv_xphoto455dopencv_fuzzy455dopencv_hfs455dopencv_img_hash455dopencv_line_descriptor455dopencv_saliency455dopencv_rgbd455dopencv_structured_light455dopencv_phase_unwrapping455dopencv_videostab455dopencv_xfeatures2d455dopencv_shape455dopencv_xobjdetect455dopencv_aruco455dopencv_bgsegm455dopencv_bioinspired455dopencv_ccalib455dopencv_dpm455dopencv_highgui455dopencv_face455dopencv_photo455dopencv_objdetect455dopencv_superres455dopencv_videoio455dopencv_optflow455dopencv_ximgproc455dopencv_stereo455dopencv_tracking455dopencv_video455dopencv_plot455dopencv_datasets455dopencv_ml455dopencv_imgcodecs455dopencv_intensity_transform455dopencv_alphamat455dopencv_rapid455dopencv_calib3d455dopencv_features2d455dopencv_flann455dopencv_imgproc455dopencv_core455d

opencv_LIB_DIRS:

-- C:/.conan/99cb87/1/lib

CVPLOT_LIB_FILES:

-- C:/.conan/99cb87/1/lib/opencv_alphamat455d.libC:/.conan/99cb87/1/lib/opencv_aruco455d.libC:/.conan/99cb87/1/lib/opencv_bgsegm455d.libC:/.conan/99cb87/1/lib/opencv_bioinspired455d.libC:/.conan/99cb87/1/lib/opencv_calib3d455d.libC:/.conan/99cb87/1/lib/opencv_ccalib455d.libC:/.conan/99cb87/1/lib/opencv_core455d.libC:/.conan/99cb87/1/lib/opencv_datasets455d.libC:/.conan/99cb87/1/lib/opencv_features2d455d.libC:/.conan/99cb87/1/lib/opencv_flann455d.libC:/.conan/99cb87/1/lib/opencv_fuzzy455d.libC:/.conan/99cb87/1/lib/opencv_hfs455d.libC:/.conan/99cb87/1/lib/opencv_highgui455d.libC:/.conan/99cb87/1/lib/opencv_img_hash455d.libC:/.conan/99cb87/1/lib/opencv_imgcodecs455d.libC:/.conan/99cb87/1/lib/opencv_imgproc455d.libC:/.conan/99cb87/1/lib/opencv_intensity_transform455d.libC:/.conan/99cb87/1/lib/opencv_line_descriptor455d.libC:/.conan/99cb87/1/lib/opencv_ml455d.libC:/.conan/99cb87/1/lib/opencv_optflow455d.libC:/.conan/99cb87/1/lib/opencv_phase_unwrapping455d.libC:/.conan/99cb87/1/lib/opencv_photo455d.libC:/.conan/99cb87/1/lib/opencv_plot455d.libC:/.conan/99cb87/1/lib/opencv_quality455d.libC:/.conan/99cb87/1/lib/opencv_rapid455d.libC:/.conan/99cb87/1/lib/opencv_reg455d.libC:/.conan/99cb87/1/lib/opencv_rgbd455d.libC:/.conan/99cb87/1/lib/opencv_saliency455d.libC:/.conan/99cb87/1/lib/opencv_shape455d.libC:/.conan/99cb87/1/lib/opencv_stereo455d.libC:/.conan/99cb87/1/lib/opencv_stitching455d.libC:/.conan/99cb87/1/lib/opencv_structured_light455d.libC:/.conan/99cb87/1/lib/opencv_superres455d.libC:/.conan/99cb87/1/lib/opencv_surface_matching455d.libC:/.conan/99cb87/1/lib/opencv_tracking455d.libC:/.conan/99cb87/1/lib/opencv_video455d.libC:/.conan/99cb87/1/lib/opencv_videoio455d.libC:/.conan/99cb87/1/lib/opencv_videostab455d.libC:/.conan/99cb87/1/lib/opencv_xfeatures2d455d.libC:/.conan/99cb87/1/lib/opencv_ximgproc455d.libC:/.conan/99cb87/1/lib/opencv_xphoto455d.lib

opencv_xobjdetect contains interface linked library opencv_xobjdetect455 but opencv_LIB_DIR doesn't contain related .lib file. Looks like imported non-built target.

Try to rebuild opencv: https://pastebin.com/XXjvDmSB

--   OpenCV modules:
--     To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core datasets features2d flann fuzzy hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching tracking video videoio videostab xfeatures2d ximgproc xphoto
--     Disabled:                    python_tests world
--     Disabled by dependency:      barcode dnn_objdetect dnn_superres dpm face mcc objdetect text wechat_qrcode xobjdetect

xobjdetect was disabled but imported target was created (same for objdetect)

Problem is here https://github.com/opencv/opencv/blob/ed6ca0d7fab5381c6aa6062c49c3c99ee828fadb/modules/objdetect/CMakeLists.txt#L7 but dnn is optional. I don't understand why objdetect cannot be build without dnn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant