Fedora build adjustments
Hello I made some adjustments to be able to compile in fedora, there's only some changes in CMakeLists to look for the libraries in the correct directories and the instructions with dependencies in README file.
Works perfectly with Fedora 36. Thanks mate!
Just tried that on fedora 36 as well. Works like a charm. Thanks a lot!
Also confirming these instructions work great on Fedora 36. Thanks!
confirming plugin builds on fedora 36
$ cmake -DLIBOBS_INCLUDE_DIR=/usr/share/obs/libobs -DEXTRA_LIBRARY_PATH=/usr/include/obs -DWITH_CUDA=ON .. && cmake --build . && sudo cmake --install .
-- Found Git: /usr/bin/git (found version "2.37.2")
-- The C compiler identification is GNU 12.1.1
-- The CXX compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Onnxruntime: /usr/local/include
-- Found OpenCV: /usr (found suitable version "4.5.5", minimum required is "4.5") found components: core imgproc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tomas/build/obs-backgroundremoval-fedora/build
[ 33%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/background-filter.cpp.o
[ 66%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/plugin-main.cpp.o
[100%] Linking CXX shared module obs-backgroundremoval.so
[100%] Built target obs-backgroundremoval
-- Install configuration: ""
-- Installing: /usr/local/lib64/obs-plugins/obs-backgroundremoval.so
-- Set runtime path of "/usr/local/lib64/obs-plugins/obs-backgroundremoval.so" to ""
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/locale/en-US.ini
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/SINet_Softmax_simple.onnx
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/mediapipe.onnx
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/modnet_simple.onnx
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/rvm_mobilenetv3_fp32.onnx
-- Installing: /usr/local/share/obs/obs-plugins/obs-backgroundremoval/selfie_segmentation.onnx
plugin is loaded when starting obs
info: [obs-backgroundremoval] plugin loaded successfully (version 0.4.0)
ping @royshil
Worked for me as well, thank you!
Worked for me as well, thank you!
Great
is anyone from the contributor team ready to merge/rebase on main and bring this up in CI?
I think the current version can be built on Fedora without modification and thus we can close this PR as already implemented. We still need concise documentation for Fedora but it can be handled within another PR.
@royshil Can we close this PR as completed?
Can confirm that the version as of 2023-04-23(db8791aa47c4c1e99e2d42b7057d73e51f6df0be) (been meaning to make this comment for a while) does build on fedora 37, however the build script needs to be updated todo so. I've published my changes that got it to work here: https://github.com/jagg2/obs-backgroundremoval/commit/8c9f7eed5be8f8aea6ad6f0e03218babb82eb18b However i'm not sure if this is the best solution, (hence why i'm not making a PR) but might be a good starting point for someone else looking todo a fedora build.
notes: uses the git build of obs, and will cause problems with any existing obs on the system. (flatpak, .rpm) doesn't create an .rpm package. need to manually copy the files to install. recommend referring to the .deb structure
@jagg2 We would not fix the build scripts because the Fedora distribution of OBS is not official but will provide some documentation to use CMake directly. And I am planning to provide rpm on Packman. Does this make sense?