how to build debug opencv
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- opencv, python
- Domain
- build-system, tooling
Research direction
Start with the manual debug-build instructions linked in the issue and inspect setup.py, especially the Python library configuration and _classify_installed_files_override around line 450. Reproduce the Windows Python 3.11 Debug build, then compare the generated _skbuild\win32-3.11\make-build\lib\python3\debug\cv2.pyd path with the path the classifier expects. Done means the documented debug build completes without the missing-file exception.
Written by the indexing model from the issue text.
Description
I followed the instructions in link A and installed scikit build and numpy, then ran python setup. py bdistw_heel -- build type=Debug. First, it would report an error that it couldn't find the libs/python311-d. lib file, but I'm sure it exists in my python. It always defaults to finding the release version libs/python311.lib. In order to find it,I tried many methods and finally added :
'$lib-dbg='D:/Program/miniconda 3/env/opencv-build/libs/python311-d.lib'
$env: MAKE-ARGS="-DPYTHON3_LIBRRY=$lib-dbg -DPython3_LIBRRY=$lib-dbg"
This command forces DPYTHON3_LIBRRY to be python311-d.lib '
This command is mandatory for python311-d. lib 'to be found. Then, run python setup. py bdistw_heel -- build type=Debug to find python311-d. lib
This is very strange. Is it designed this way? Do you need to manually modify this path yourself?
- build type=Debug, won't he automatically find this path
Then all of these passed smoothly and reported an error:
Traceback (most recent call last):
File "D:\github\opencv-python\opencv-python\setup.py", line 537, in <module>
main()
File "D:\github\opencv-python\opencv-python\setup.py", line 266, in main
setup(
File "D:\Myprogram\miniconda3\envs\opencv_build\Lib\site-packages\skbuild\setuptools_wrap.py", line 700, in setup
_classify_installed_files(
File "D:\github\opencv-python\opencv-python\setup.py", line 450, in _classify_installed_files_override
raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2/python-3.*/cv2.*'
Check if the directory I generated is
_stkbuild \ win32-3.11 \ make-build \ lib \ python3 \ debug \ cv2.pyd, cv2.pdb
Is it because there are no sub version numbers generated, so none of them are available? Why does it automatically generate folders that it cannot read?
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opencv/opencv-python
-
[DOC] README file Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
opencv/opencv-python#1217 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opencv/opencv-python#1165 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
opencv/opencv-python#1273 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
opencv/opencv-python#1272 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
opencv/opencv-python#1268 · 1 comment ·
All issues in opencv/opencv-python
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100