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

add opencv build without openblas dependencies #987

Merged
merged 6 commits into from
Dec 24, 2020

Conversation

n-kai-cj
Copy link
Contributor

I'd like to add an option to build OpenCV without OpenBLAS dependencies.
apply patch to exclude OpenBLAS dependencies when environment variable NOOPENBLAS is set to yes.

build

NOOPENBLAS=yes bash cppbuild.sh -platform windows-x86_64 install opencv
mvn clean install -Djavacpp.platform=windows-x86_64 -Djavacpp.cppbuild.skip=true --projects opencv

then opencv-windows-x86_64-noopenblas.jar is created.

It's a pity that we have to modify the patch file whenever we upgrade OpenBLAS versions.

@saudet
Copy link
Member

saudet commented Dec 17, 2020

It's a pity that we have to modify the patch file whenever we upgrade OpenBLAS versions.

We could use sed...

@n-kai-cj
Copy link
Contributor Author

fix to remove version number by sed before applying patch, so no need to modify patch file when upgrade OpenBLAS version.
I know I should fix all changes by sed without patch...

@saudet
Copy link
Member

saudet commented Dec 19, 2020

I know I should fix all changes by sed without patch...

Right, please try :)

@n-kai-cj
Copy link
Contributor Author

done!

opencv/cppbuild.sh Outdated Show resolved Hide resolved
@saudet
Copy link
Member

saudet commented Dec 22, 2020

Hum, since we need to modify the pom.xml files, it's too late to modify them once Maven has been launched. Of course, we can manually call the cppbuild.sh script, but this patch isn't about C++. What about putting the content in a separate script like noopenblas.sh or something like that? Users will need to execute that manually before the build itself though... It's not pretty, but I don't have a better idea right now. Would you? Do you feel that it's OK to leave this in cppbuild.sh?

@n-kai-cj
Copy link
Contributor Author

Oh, it seems github actions doesn't call bash cppbuild.sh before mvn -Djavacpp.cppbuild.skip=true install, but just call mvn install, then it's too late...
Actually I don't understand the reason why we should separate scripts, but I don't care separate or not. Please as you like.

@saudet saudet merged commit 65ac0fa into bytedeco:master Dec 24, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants