Closed vonorfasyexela closed 3 years ago
It's correct. That's the Twitch integration for browser panels. It requires obs-browser. I don't build for linux so I didn't ifdef that part. At the time there was no good linux browser support. If you don't need the Twitch integration, just disable it.
On Wed, Mar 3, 2021, 00:46 Alexey Safronov notifications@github.com wrote:
Describe the bug I was building OBS Studio (your fork) from sources under freshly installed Ubuntu 20.04. I installed all necessary dependencies according the documentation and came to this part:
https://github.com/obsproject/obs-studio/wiki/Install-Instructions#linux-portable-mode-all-distros
Here I selected to build the application without browser source. That is for cmake I used the following command:
$ cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" ..
Then, after configuration I ran make and got the following linker error:
[ 92%] Linking CXX executable obs
/usr/bin/ld: CMakeFiles/obs.dir/window-basic-main.cpp.o: in function `OBSBasic::OBSBasic(QWidget*)':
/home/alexey/obs-studio/UI/window-basic-main.cpp:204: undefined reference to `RegisterTwitchAuth()'
collect2: error: ld returned 1 exit status
make[2]: *** [UI/CMakeFiles/obs.dir/build.make:1384: UI/obs] Error 1
make[1]: *** [CMakeFiles/Makefile2:1818: UI/CMakeFiles/obs.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Desktop (please complete the following information):
- OS: Ubuntu
- Version 20.04.2
Additional context I made some investigation of this issue. It turned out that it is building successfully only with browser source. That is with this cmake command:
$ cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" ..
These two cases differ in this option: -DBUILD_BROWSER=ON. I wondered what changes in this fork could lead to such behaviour. And found this commit: obsproject@05d8c20 https://github.com/obsproject/obs-studio/commit/05d8c2025358c88af64c853f06c55aef2f9a2910
So here it simply sets TWITCH_ENABLED variable into TRUE without any conditions. This change leads to executing this part of code:
if TWITCH_ENABLED
RegisterTwitchAuth();
endif
The function RegisterTwitchAuth() is defined in file auth-twitch.cpp, but this file adding to the codebase conditionally (only when BROWSER_AVAILABLE_INTERNAL=ON and TWITCH_ENABLED=ON):
if(BROWSER_AVAILABLE_INTERNAL)
…
if(TWITCH_ENABLED)
list(APPEND obs_PLATFORM_SOURCES auth-twitch.cpp ) list(APPEND obs_PLATFORM_HEADERS auth-twitch.hpp )
endif()
…
endif()
In our case only TWITCH_ENABLED=ON and this file is not included into the list of sources. And that's why the building system doesn't see it and gives an error.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pkviet/obs-studio/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG2OT7HEHRLFBFJUVWIX23TBV2E5ANCNFSM4YP6MFEQ .
Ok, thanks for a quick response.
Describe the bug I was building OBS Studio (your fork) from sources under freshly installed Ubuntu 20.04. I installed all necessary dependencies according the documentation and came to this part:
https://github.com/obsproject/obs-studio/wiki/Install-Instructions#linux-portable-mode-all-distros
Here I selected to build the application without browser source. That is for cmake I used the following command:
$ cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" ..
Then, after configuration I ran make and got the following linker error:
Desktop (please complete the following information):
Additional context I made some investigation of this issue. It turned out that it is building successfully only with browser source. That is with this cmake command:
$ cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" ..
These two cases differ in this option: -DBUILD_BROWSER=ON. I wondered what changes in this fork could lead to such behaviour. And found this commit: https://github.com/obsproject/obs-studio/commit/05d8c2025358c88af64c853f06c55aef2f9a2910
So here it simply sets TWITCH_ENABLED variable into TRUE without any conditions:
This change leads to executing this part of code:
The function RegisterTwitchAuth() is defined in file auth-twitch.cpp, but this file adding to the codebase conditionally (only when BROWSER_AVAILABLE_INTERNAL=ON and TWITCH_ENABLED=ON):
The variable BROWSER_AVAILABLE_INTERNAL is only set to ON when we provide -DBUILD_BROWSER=ON according to this:
In our case only TWITCH_ENABLED=ON and this file is not included into the list of sources. And that's why the building system doesn't see it and gives an error.