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

Fix PKGBUILD #266

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Fix PKGBUILD #266

merged 3 commits into from
Apr 24, 2023

Conversation

umireon
Copy link
Member

@umireon umireon commented Apr 19, 2023

Closes #262
Closes #172
Closes #34

@ngoonee
Copy link

ngoonee commented Apr 20, 2023

On Arch this still results in

make[2]: *** No rule to make target 'OpenCV_Build-prefix/lib/libopencv_imgproc.a', needed by 'obs-backgroundremoval.so'. Stop.

@umireon
Copy link
Member Author

umireon commented Apr 20, 2023

@ngoonee
I have tested this PKGBUILD on my Arch Linux and the build has ended successfully.
Could you ensure you are using the latest PKGBUILD on this PR and test the build again?
Please attach the full log here if the problem still persists.

@umireon umireon requested a review from royshil April 20, 2023 02:52
@ngoonee
Copy link

ngoonee commented Apr 20, 2023

The PKGBUILD I am using is this one (from the PR) -
PKGBUILD.txt

The full build log is here -
errors.txt

@umireon
Copy link
Member Author

umireon commented Apr 20, 2023

@ngoonee Can you create a completely clean build tree and try to run makepkg -s?

git clone https://github.com/royshil/obs-backgroundremoval.git
git switch umireon.fix-arch-pkgbuild
cd scripts
makepkg -s

And can you tell me what commands you used to create your build?

It seems that OpenCV built shared libraries and this resulted in the file missing error because this plugin expected statically-linking OpenCV libraries.

@umireon umireon mentioned this pull request Apr 21, 2023
@JayceFayne
Copy link

@ngoonee Can you create a completely clean build tree and try to run makepkg -s?

git clone https://github.com/royshil/obs-backgroundremoval.git
git switch umireon.fix-arch-pkgbuild
cd scripts
makepkg -s

And can you tell me what commands you used to create your build?

It seems that OpenCV built shared libraries and this resulted in the file missing error because this plugin expected statically-linking OpenCV libraries.

I created a clean checkout and can confirm that the error still persists

[ 72%] Completed 'OpenCV_Build'
[ 72%] Built target OpenCV_Build
make[2]: *** No rule to make target 'OpenCV_Build-prefix/lib/libopencv_imgproc.a', needed by 'obs-backgroundremoval.so'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 81%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/plugin-main.cpp.o
[ 90%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/background-filter.cpp.o
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/obs-backgroundremoval.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
    ```

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

I have updated the PKGBUILD to use the system OpenCV library and now everything will go fine.
@ngoonee @JayceFayne Can you try this again?

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

I believe #257 must be merged to get this plugin worked on Arch but just building will work by this PR.

@JayceFayne
Copy link

Can confirm, build passes now! 🎉

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

For now, you can check if the CPU version works by removing libonnxruntime_providers_*.so.

sudo rm /usr/lib/obs-plugins/libonnxruntime_providers_*.so

@JayceFayne
Copy link

JayceFayne commented Apr 23, 2023

I have updated the PKGBUILD to use the system OpenCV library and now everything will go fine. @ngoonee @JayceFayne Can you try this again?

Works fine with the version built from this PKGBUILD
Maybe because I am using the CPU version? (I have an AMD GPU)

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

The GPU version is still broken now.

@royshil
Copy link
Collaborator

royshil commented Apr 23, 2023

The GPU version is still broken now.

Should we merge this and take of GPU in another PR? @umireon

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

The GPU feature on Linux will be fixed on #257

@umireon
Copy link
Member Author

umireon commented Apr 23, 2023

I suppose the remaining problem reported on #257 is an issue of setting up CUDA and not an issue of this plugin.

Copy link
Collaborator

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@umireon umireon merged commit dba6450 into main Apr 24, 2023
@umireon umireon deleted the umireon.fix-arch-pkgbuild branch April 25, 2023 17:48
@ngoonee ngoonee mentioned this pull request Apr 26, 2023
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.

Unable to build on Arch Unable to build from git in Arch Linux Obs Background Removal for Ubuntu
4 participants