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

PKGBUILD archlinux minor issues #16

Closed
krisezra87 opened this issue May 11, 2021 · 11 comments
Closed

PKGBUILD archlinux minor issues #16

krisezra87 opened this issue May 11, 2021 · 11 comments

Comments

@krisezra87
Copy link
Contributor

  • pkgver_hyphen variable definition requires a tag on the latest git commit (which is not always the case). This is easily fixed by either adding a tag for each commit, or something like:

pkgver_hyphen=$(git describe --exact-match --tags $(git rev-list --tags --max-count=1))

  • Also a minor issue in the build file where SIPNet_Softmax.onnx is not included in the data folder. I THINK it has worked by changing line 242 in the CmakeLists.txt to read install(FILES "data/SINet_Softmax_simple.onnx"
This was referenced May 11, 2021
@krisezra87
Copy link
Contributor Author

Despite what seems to be a good compile now, obs-studio doesn't see the plugin. Even if I try the approaches the others in the issues list have recommended: moving into /usr/share and /usr/lib as well as into .config/obs-studio...

Not really sure what to make of that.

@krisezra87
Copy link
Contributor Author

A little digging with strace says:

warning: Module '/usr//lib/obs-plugins/obs-backgroundremoval.so' not loaded

So it is indeed seeing the plugin, but choosing not to load it.

Tips or advice?

@royshil
Copy link
Collaborator

royshil commented May 13, 2021

usually it fails to load because of missing dependencies...
can you inspect the shared library deps of your obs-backgroundremoval.so file?
perhaps it's just a e.g. LD_LIBRARY_PATH issue

@krisezra87
Copy link
Contributor Author

Ah yes, I see I don't have libonnxruntime.so. This is a real bear to get installed for some reason on arch. I did a fresh pull from github from the link you have in the description and for some reason it won't build to completion. The work continues.

@laundry-96
Copy link

@krisezra87 Have you been able to get this installed on Arch? I am not seemingly having any luck...

@krisezra87
Copy link
Contributor Author

@laundry-96 no I have not been able to make it work yet unfortunately. I have tried several onnx installs but nothing has generated that .so file for me yet. You have reminded me that this was on my todo list. I think I am going to nuke my install and start fresh.

@krisezra87
Copy link
Contributor Author

@laundry-96 I got it! I'm by no means an expert here, but it looks like the onnxruntime files are actually obtained during the make and perhaps cleaned up. I went here:

https://github.com/microsoft/onnxruntime/releases/tag/v1.7.0

And downloaded / extracted the x64 tgz file for this release (it's the one that is shown as being necessary in the makeprg call and from objdump -p /usr/local/lib/obs-plugins/obs-backgroundremoval.so). Inside the extracted tgz there is a lib folder that contains libonnxruntime.so and libonnxruntime.so.1.7.0. I symlinked these both into /usr/lib.

I put the plugin in a variety of places at the advice of other people in the issues list and I'm not sure which one eventually loaded... but I'm fairly certain this is the key right here.

It's ugly, but it worked!

@royshil
Copy link
Collaborator

royshil commented May 25, 2021

@krisezra87 please let me know if the latest release works https://github.com/royshil/obs-backgroundremoval/releases/tag/v0.2.5-beta

@krisezra87
Copy link
Contributor Author

@royshil this looks much better and is very close. No longer need the ~/.config/obs-studio/plugins symbolic links which is great, and I didn't have to manually symlink libonnxruntime.so into /usr/lib.

Some minor issues I'm not sure how to fix in a pull request:

  1. The checksum is wrong. I bypassed with makepkg --skipchecksums -si
  2. Install instructions are slightly wrong. You need the -i flag above to get the .so files distributed.
  3. Minor: I can't actually start up the virtual camera in obs-studio without running as sudo. There seems to be something slightly weird with the polkit settings and the agent prompts for password (but it won't take my password).

All told, running now with makepkg --skipchecksums -si in the scripts folder works properly out of the box, provided that obs is launched with sudo... which I don't like, but I'm willing to roll with for now :).

@laundry-96
Copy link

I'm able to build the latest commit with makepkg, and install with makepkg -i with no issues.

@royshil
Copy link
Collaborator

royshil commented May 31, 2021

going to close this issue as most acute problems are resolved

@royshil royshil closed this as completed May 31, 2021
royshil pushed a commit that referenced this issue Mar 7, 2023
* Add obs-plugintemplate files (#1)

* Add obs-plugintemplate files

* Rename

* Update CMakeLists.txt

* Update main.yml

* files

* Update CMakeLists.txt

* Fix

* Update .Brewfile

* Update main.yml

* Update main.yml

* check-cmake.sh

* Update main.yml

* Update main.yml

* Build my opencv (#2)

* BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* check-cmake

* Update main.yml

* Update buildspec.json

* Update CMakeLists.txt

* Build my onnxruntime (#3)

* fix

* Update BuildMyOnnxruntime.cmake

* Enable arm64

* 0.5.2

* Update BuildMyOnnxruntime.cmake

* Update .Brewfile

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* fix

* Fix

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* a

* Create .gitmodules

* Create onnxruntime

* Update onnxruntime

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* fix

* Update BuildMyOnnxruntime.cmake

* ARCHITECTURE

* Apply

* Update BuildMyOnnxruntime.cmake

* fix

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* aaa

* Enable Windows build (#4)

* Enable Windows build

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Fix linkage

* Remove /WX

* Update ObsPluginHelpers.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update CMakeLists.txt

* Fix

* Update CMakeLists.txt

* a

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Disable DML

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update background-filter.cpp

* Update BuildMyOnnxruntime.cmake

* Disable DML

* Fix segfault (#6)

* Update Model.h

* 0.5.6

* Ccache macos (#8)

* Ccache

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Revert "Update BuildMyOnnxruntime.cmake"

This reverts commit 44d9caa.

* Revert "Update BuildMyOnnxruntime.cmake"

This reverts commit 9294106.

* Direct ml (#7)

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* dml

* 0.5.7

* Update CMakeLists.txt

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* a

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Fix

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* Linux build (#9)

* linux

* 0.5.8

* Update BuildMyOnnxruntime.cmake

* Update setup_ccache (#10)

* bump version (#11)

* Use ninja on windows (#12)

* Update main.yml

* Update main.yml

* Use Ninja

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* ccache

* Update BuildMyOpenCV.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* Update main.yml

* Update CMakeLists.txt

* Update BuildMyOnnxruntime.cmake

* Long path

* Update main.yml

* Update BuildMyOnnxruntime.cmake

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOnnxruntime.cmake

* Windows opencv ccache (#13)

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Update main.yml

* Update BuildMyOpenCV.cmake

* bump 0.5.10 (#14)

* Cleanup (#15)

* Cleanup

* bump version

* Fix ep (#16)

* Update BuildMyOnnxruntime.cmake

* Update BuildMyOpenCV.cmake

* Update main.yml (#18)

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* 0.5.12

* Fix

* Update package-macos.zsh

* Update package-linux.zsh

* Update CMakeLists.txt

* ci

* Fix

* Update background-filter.cpp

* Fix

* clang-format

* cmake-format

* Update BuildMyOpenCV.cmake

* Update BuildMyOnnxruntime.cmake

* Fix errors

* Use -isystem

* Use list in set_target_properties

* INTERFACE_INCLUDE_DIRECTORIES must be on IMPORTED TARGET

* Update ObsPluginHelpers.cmake
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

No branches or pull requests

3 participants