doc: add crosscompile_with_multiarch#24629
Conversation
asmorkalov
left a comment
There was a problem hiding this comment.
Sounds great! Very useful tutorial. Also it'll be very useful, if you mention Jetson or Raspbery Pi and how to select proper host system for cross build. jetson OS is based on Ubuntu and Pi os is Debian based.
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
|
|
||
| cmake --build build4-full_armhf | ||
| sudo cmake --install build4-full_armhf | ||
| ``` |
There was a problem hiding this comment.
As the last step please describe execution on cross-compilation target: you need to install the same versions of 3rdparty packages, etc.
There was a problem hiding this comment.
I agree with you, I will note section tomorrow, thank you very much !
There was a problem hiding this comment.
I separate (a) install external libraries, and (b) install opencv which is cross-compile. And I added warning comment that libraries version between compiling and running should be same. Thank you !!
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
| ``` | ||
| [Host] | ||
| $ sudo dpkg --add-architecture arm64 | ||
| $ sudo dpkg --add-architecture armhf |
There was a problem hiding this comment.
There is a mix of terminal snippets - starting with $ and without. Prefer avoid $ as documentation does not support copy-to-clipboard option.
There was a problem hiding this comment.
I was worried about how to distinguish between lines input by the user and lines output by the program. So I added a $ sign to the beginning of each line.
However, it becomes a problem when copying and pasting. These have been removed.
[Host] and [Target] to indicate the execution environment also seem to get in the way... I think I'll remove this tomorrow too. Thank you !
There was a problem hiding this comment.
Yes, I fixed them. In recent document I think it is suitable to copy and paste ! Thank you for your point!
There was a problem hiding this comment.
Maybe something like this?
Step3) Update dpkg setting
Update dpkg settings to support foreign architectures.
Execute dpkg --add-architecture with a target architecture:
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture armhf
And the following comand shows what foreign architectures are supported.
sudo dpkg --print-architecture
arm64
armhf
There was a problem hiding this comment.
Yes, I split bach script and its result, thank you for your suggestion.
(It was also used for ldd command to detect dependency section.)
|
Most of the renovations have been completed, but the remaining parts will take a little more time. This is an interim report.
Maybe, numpy should be installed with pip. |
|
I believe that I have been fixed all points and applied suggestions. Thank you very much !! I believe this tutorial is very helpful to challenge cross-compile. |
|
Test is not passed, however it may be misjudge I think. |
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Show resolved
Hide resolved
doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
Outdated
Show resolved
Hide resolved
- Installing runtime packages instead of dev packages in target. - Add warning for apt package naming. - Add command to confirm python3 wrapper.
|
Thank you very much for fixing many problems that I missed !! |
|
|
||
| @code{.bash} | ||
| sudo apt install -y \ | ||
| python3-dev \ |
There was a problem hiding this comment.
Thank you for your comment, it is same as "Install OpenCV-Python in Ubuntu".
https://docs.opencv.org/4.x/d2/de6/tutorial_py_setup_in_ubuntu.html
to support python3:
sudo apt-get install python3-dev python3-numpy
There was a problem hiding this comment.
python3-dev might conflict with libpython3-dev:aarch64
There was a problem hiding this comment.
OK, I created new issue #24695 to commit fix. Thank you !!
…ultiarch doc: add crosscompile_with_multiarch opencv#24629 Add cross compile tutorial for ubuntu/debian. ( I'm sorry to my poor English. ) Fix opencv#24628 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
Add cross compile tutorial for ubuntu/debian.
( I'm sorry to my poor English. )
Fix #24628
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.