[ISSUE] Building on Debian 10.10 works, but links against non existant glibc symbol `__libc_single_threaded`?
Closed this issue · 2 comments
The problem
Building on Debian 10.10, either with gcc-8.3.0
or clang-13.0.1
ends up with successful build, but OBS itself will not load the plugin saying it tries to use an undefined symbol __libc_single_threaded
.
To Reproduce
With GCC (native way):
- Clone the repository
- Edit
cmake/linux/compilerconfig.cmake
- Add
-fPIC
on top ofset(_obs_gcc_c_options
list - Remove
-Wenum-conversion
from the same list - Run
cmake -S . -B "build"
- Run
cmake --build build
- Run
cmake --install build --prefix "/usr/local"
- Run
obs
via terminal
With clang (more tricky):
- Clone the repository
- Edit
cmake/linux/compilerconfig.cmake
- Add
-fPIC
on top ofset(_obs_gcc_c_options
list - Remove the entire codeblock starting with
if(CMAKE_COMPILE_WARNING_AS_ERROR)
uptoendif()
- Run
export CC=/usr/bin/clang
- Run
export CXX=/usr/bin/clang++
- Run
cmake -S . -B "build"
- Edit
build/src/update-checker/CurlClient/CMakeFiles/CurlClient.dir/flags.make
- Add
-fPIC
at the beginning ofCXX_FLAGS
- Edit
build/CMakeFiles/plugin-support.dir/flags.make
- Add
-fPIC
at the beginning ofC_FLAGS
- Run
cmake --build build
- Run
cmake --install build --prefix "/usr/local"
- Run
obs
via terminal
When trying to run OBS, you will notice:
error: os_dlopen(/usr/local//lib/obs-plugins/obs-backgroundremoval.so->/usr/local//lib/obs-plugins/obs-backgroundremoval.so): /usr/local//lib/obs-plugins/obs-backgroundremoval.so: undefined symbol: __libc_single_threaded
warning: Module '/usr/local//lib/obs-plugins/obs-backgroundremoval.so' not loaded
If you check for existence of that symbol in this file, indeed it is there:
nm -a /usr/local/lib/obs-plugins/obs-backgroundremoval.so|c++filt|grep single
U __libc_single_threaded
...which makes it even more strange, as according to https://gcc.gnu.org/pipermail/libstdc++-cvs/2020q3/034683.html
that symbol was introduced in glibc-2.32
. Debian 10.10 (Deepin) sports glibc-2.28
:
# ldd --version ldd|head -1
ldd (Debian GLIBC 2.28.21-1+deepin-1) 2.28
...so how the heck did it manage to link against it while using this symbol in the first place?
Also I noticed the official binary release of the plugin links against glibc-2.29
making it again useless in Debian 10.10.
(edit) Also, if this could be of any help:
$ cmake --version
cmake version 3.22.1
$ obs --version
OBS Studio - 29.1.3-modified
(OBS is self compiled, fully working)
Big question is
How do I build this plugin while making sure it WILL NOT USE the __libc_single_threaded
symbol?
Thanks!
We don't support Debian and our plugin does not work with OBS 29 now. I'd like you to update your Debian and OBS to the latest release and try to build our plugin again!
Thank you for reporting!
We don't support Debian
That is a SHAME.
I'd like you to update your Debian and OBS to the latest release and try to build our plugin again!
Very sadly, that's not an option on this machine. Not anywhat soon anyway.
I will continue experimenting in that field and maybe write a custom Debian build tutorial once I manage to get it working.
Thanks!