-
Notifications
You must be signed in to change notification settings - Fork 876
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
Can gocv package OpenCV into a binary file through cgo? #1056
Comments
for deployment copy opencv libs and set LD_LIBRARY_PATH to that folder thats what we do for builds |
https://github.com/jan-bar/xgo/blob/master/docker/readme.md You can try my project, I made a docker image. And completed the compilation of window under Linux, and also used cgo. gocv supports static compilation. You can prepare cross-compilation tools and use static compilation, which should be able to achieve the effect you want. |
Sure, I’d be happy to give it a try! Thank you! |
It seems to be not working well. I encountered an error when compiling gocv on the ARM platform. You can refer to my question here: #1057 |
I don't have an arm-based device, and cross-compiling opencv for arm always reports an error. It seems that you need to explore it carefully. I think some libraries also need to be cross-compiled. If there is an arm-based environment, I may not have such trouble. You can refer to the official method for cross-compilation
https://github.com/opencv/opencv/blob/4.x/.github/workflows/arm64-build-checks.yml |
@yh4922 same problem see here:JuliaLang/julia#41613 After my unremitting efforts, I finally found that opencv cannot be compiled on the arm64 platform. Eventually there will be compilation errors
|
May I ask if there is any solution? The normal compilation method works on arm64, but static compilation does not.
|
@yh4922 I have tried without success,you can study further. |
Okay, thank you very much. |
I’m having a problem similar to this one, so maybe someone has already come in a solution to that. I did a program in Go using gocv and go-face, it is working and compiling perfectly in Ubuntu. But I would like to build for Windows platform. If I try to cross-platform appear syntax errors in the code... If you take the code for Windows and try to compile, there is always a library or other that the compiler does not find or the path to the file is non-existent. Would anyone have a path that could go to solve this problem? PS. I have already followed the installation tutorials of dependencies, both gocv and go-face, among others. |
For me, it's also not possible to build a static binary on ARM64 (Raspberry Pi 5 with PiOS-Bookwork):
|
I would like to know if this issue has received support. |
Hi Yohann,
I'm still having difficulty building my project on the Windows platform for
distribution. Do you have the knowledge to build this? Front fyne(front)
and backend with OpenCV.
thank you for your time.
…On Mon, Mar 11, 2024 at 7:31 AM Yohann ***@***.***> wrote:
I would like to know if this issue has received support.
—
Reply to this email directly, view it on GitHub
<#1056 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQP2B7BAMO7YP5HI6YMGDG3YXWBX5AVCNFSM6AAAAAAVCVIVUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGA4TOOJZGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
There is a requirement that the project needs to be deployed on many devices, and some devices cannot even install docker and there is no way to precompile opencv
If there is a way to package opencv into a binary file at compile time, it should be a good solution to this problem
Similar to go-sqlite3
The text was updated successfully, but these errors were encountered: