Xaymar/obs-StreamFX

How to build this plugin together with obs portable build? #324

zenny posted onGitHub

Hi,

@Xaymar Thanks for your mindblowing plugin. :+1:

After failing to build this distro in voidlinux (see https://github.com/void-linux/void-packages/issues/24706#issuecomment-687720959), I just pulled the ubuntu 20.04 alpha release (binary) to voidlinux and copied them to the obs-plugins directory which worked perfect.

However, I could not figure out how to build this plugin for a portable build of obs by default in line with https://github.com/obsproject/obs-studio/wiki/install-instructions#linux-portable-mode-all-distros?

Cheers, and stay safe, /z


I'm not sure why you are looking at the OBS Studio wiki for help on how to build a plugin. It is actually fully explained on the plugin's wiki.

posted by Xaymar over 4 years ago

I'm not sure why you are looking at the OBS Studio wiki for help on how to build a plugin. It is actually fully explained on the plugin's wiki.

Thanks @Xaymar , I tried first to build your wiki to get an RPATH issue as stated in https://github.com/void-linux/void-packages/issues/24706#issuecomment-687720959, viz.

-- StreamFX: Using packaged or remote obs-studio.
Linux builds require your install the necessary development packages, take a look at the obs-studio build guide for them.
-- Configuring done
CMake Error at CMakeLists.txt:943 (add_library):
  The install of the StreamFX target requires changing an RPATH from the
  build tree, but this is not supported with the Ninja generator unless on an
  ELF-based platform.  The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
  to avoid this relinking step.


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Did I miss something? Thanks,

posted by zenny over 4 years ago

What CMake version are you using?

posted by Xaymar over 4 years ago

Quick googling revealed a potential fix for your platform: https://cmake.org/cmake/help/latest/variable/CMAKE_NO_BUILTIN_CHRPATH.html

Edit: Another way might be to set CMAKE_SKIP_RPATH to YES/TRUE/ON (or CMAKE_SKIP_INSTALL_RPATH)

posted by Xaymar over 4 years ago

What CMake version are you using?

cmake-3.18.2_1

Quick googling revealed a potential fix for your platform: https://cmake.org/cmake/help/latest/variable/CMAKE_NO_BUILTIN_CHRPATH.html

Edit: Another way might be to set CMAKE_SKIP_RPATH to YES/TRUE/ON (or CMAKE_SKIP_INSTALL_RPATH)

Thanks @Xaymar .

posted by zenny over 4 years ago

Configured and compiled. :+1:

-DCMAKE_PACKAGE_PREFIX="build/package" -DCMAKE_INSTALL_PREFIX="build/distrib" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_SKIP_RPATH="YES"

-- StreamFX: Using packaged or remote obs-studio.
Linux builds require your install the necessary development packages, take a look at the obs-studio build guide for them.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zenny/Downloads/obs/obs-StreamFX/build/flux

BTW, does it make difference if there are some warnings while compiling and building with cmake?

$ cmake --build "build/flux" --config RelWithDebInfo --target install
[2/73] Automatic MOC and UIC for target StreamFX
AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-audio.hpp" is empty.

AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-texture.hpp" is empty.

AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-matrix.hpp" is empty.

AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-audio.cpp" is empty.

AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-matrix.cpp" is empty.

AutoGen warning: "SRC:/source/gfx/shader/gfx-shader-param-texture.cpp" is empty.

[7/73] Building CXX object CMakeFiles/StreamFX.dir/source/ffmpeg/tools.cpp.o
../../source/ffmpeg/tools.cpp:28: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   28 | #pragma warning(push)
      |
../../source/ffmpeg/tools.cpp:29: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   29 | #pragma warning(disable : 4244)
      |
../../source/ffmpeg/tools.cpp:34: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   34 | #pragma warning(pop)
      |
../../source/ffmpeg/tools.cpp: In function 'std::vector<AVPixelFormat> ffmpeg::tools::get_software_formats(const AVPixelFormat*)':
../../source/ffmpeg/tools.cpp:204:18: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
  204 |  return std::move(fmts);
      |         ~~~~~~~~~^~~~~~
../../source/ffmpeg/tools.cpp:204:18: note: remove 'std::move' call
[16/73] Building CXX object CMakeFiles/St....dir/source/encoders/encoder-ffmpeg.cpp.o
In file included from ../../source/encoders/encoder-ffmpeg.hpp:34,
                 from ../../source/encoders/encoder-ffmpeg.cpp:22:
../../source/encoders/handlers/handler.hpp:27: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   27 | #pragma warning(push)
      |
../../source/encoders/handlers/handler.hpp:28: warning: ignoring #pragma warning  [-Wunknown-pragmas]
...
posted by zenny over 4 years ago

The warnings shown there don't seem to matter much. The AutoGen ones are just Qt being annoying and not liking empty files, while the others are a potential slow down or non-standard behavior.

posted by Xaymar over 4 years ago

The warnings shown there don't seem to matter much. The AutoGen ones are just Qt being annoying and not liking empty files, while the others are a potential slow down or non-standard behavior.

Any advice to overcome latter if they are "a potential slowdown"? Thanks!

posted by zenny over 4 years ago

Either fix them (warnings usually give hints as to what is wrong), or wait until someone else fixes them.

posted by Xaymar over 4 years ago

Closing as the original question was solved.

posted by Xaymar about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests