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

obs-scripting fails to build on Ubuntu 18.04 with python 3.8 (Upstream SWIG issue) #6225

Closed
theofficialgman opened this issue Mar 28, 2022 · 15 comments
Labels
Dependency Issue Issue is in external library or dependency, not OBS itself Linux Affects Linux

Comments

@theofficialgman
Copy link

theofficialgman commented Mar 28, 2022

Operating System Info

Ubuntu 18.04

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

Master (which is commit 525c535)

OBS Studio Log URL

Not relevant

OBS Studio Crash Log URL

No response

Expected Behavior

The ability to build with obs-scripting enabled since it has now been enabled by default.

Current Behavior

Unable to build, errors with the following

[ 77%] Built target decklink-output-ui
[ 77%] Building C object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/frontend-tools.c.o
[ 77%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/auto-scene-switcher.cpp.o
[ 77%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/output-timer.cpp.o
[ 78%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/combobox-ignorewheel.cpp.o
[ 78%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/double-slider.cpp.o
[ 78%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/horizontal-scroll-area.cpp.o
[ 78%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/properties-view.cpp.o
[ 78%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/qt-wrappers.cpp.o
[ 79%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/spinbox-ignorewheel.cpp.o
[ 79%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/slider-ignorewheel.cpp.o
[ 79%] Building CXX object UI/frontend-plugins/frontend-tools/CMakeFiles/frontend-tools.dir/__/__/vertical-scroll-area.cpp.o
/home/garrett/obs-studio-updates/obs-studio/build/deps/obs-scripting/obspython/CMakeFiles/obspython.dir/obspythonPYTHON_wrap.c: In function ‘SwigPyStaticVar_dealloc’:
/home/garrett/obs-studio-updates/obs-studio/build/deps/obs-scripting/obspython/CMakeFiles/obspython.dir/obspythonPYTHON_wrap.c:3096:3: error: implicit declaration of function ‘_PyObject_GC_UNTRACK’; did you mean ‘_PyObject_GC_IS_TRACKED’? [-Werror=implicit-function-declaration]
   _PyObject_GC_UNTRACK(descr);
   ^~~~~~~~~~~~~~~~~~~~
   _PyObject_GC_IS_TRACKED
cc1: some warnings being treated as errors
deps/obs-scripting/obspython/CMakeFiles/obspython.dir/build.make:75: recipe for target 'deps/obs-scripting/obspython/CMakeFiles/obspython.dir/CMakeFiles/obspython.dir/obspythonPYTHON_wrap.c.o' failed
make[2]: *** [deps/obs-scripting/obspython/CMakeFiles/obspython.dir/CMakeFiles/obspython.dir/obspythonPYTHON_wrap.c.o] Error 1
CMakeFiles/Makefile2:971: recipe for target 'deps/obs-scripting/obspython/CMakeFiles/obspython.dir/all' failed
make[1]: *** [deps/obs-scripting/obspython/CMakeFiles/obspython.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Steps to Reproduce

  1. git clone --recursive https://github.com/obsproject/obs-studio.git
  2. cd obs-studio
  3. mkdir build
  4. cd build
  5. cmake .. -DUNIX_STRUCTURE=1 -DENABLE_PIPEWIRE=OFF -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_BROWSER=OFF -DENABLE_AJA=0
  6. make

Anything else we should know?

I recently built 27.2.3 without any issues.
and yes, with python scripting disabled I am able to build

@theofficialgman
Copy link
Author

theofficialgman commented Mar 28, 2022

cmake output:

-- OBS:  Application Version: 27.2.0-178-g525c53545 - Build Number: 1
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- 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
-- Performing Test C_COMPILER_SUPPORTS_OPENMP_SIMD
-- Performing Test C_COMPILER_SUPPORTS_OPENMP_SIMD - Success
-- Performing Test CXX_COMPILER_SUPPORTS_OPENMP_SIMD
-- Performing Test CXX_COMPILER_SUPPORTS_OPENMP_SIMD - Success
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so   
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/aarch64-linux-gnu/libX11.so;/usr/lib/aarch64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/aarch64-linux-gnu/libX11.so;/usr/lib/aarch64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavcodec.so (found version "57.107.100") found components: avcodec avdevice avutil avformat 
-- Found CURL: /usr/lib/aarch64-linux-gnu/libcurl.so (found version "7.58.0")  
-- Found Luajit: /usr/lib/aarch64-linux-gnu/libluajit-5.1.so  
-- Found SWIG: /usr/bin/swig3.0 (found suitable version "3.0.12", minimum required is "3")  
-- OBS:  ENABLED    obslua
-- OBS:  obs-scripting -> Luajit found.
-- Found Python: /usr/bin/python3.8 (found version "3.8.0") found components: Interpreter Development Development.Module Development.Embed 
-- OBS:  ENABLED    obspython
-- OBS:  obs-scripting -> Python 3.8.0 found.
-- OBS:  Using system Jansson library.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- XCB[XCB]: Found component XCB
-- Found XCB: /usr/lib/aarch64-linux-gnu/libxcb.so  found components: XCB 
-- Found X11_XCB: /usr/lib/aarch64-linux-gnu/libX11-xcb.so  
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so  found components: EGL 
-- Found Wayland: /usr/lib/aarch64-linux-gnu/libwayland-client.so;/usr/lib/aarch64-linux-gnu/libwayland-server.so;/usr/lib/aarch64-linux-gnu/libwayland-egl.so;/usr/lib/aarch64-linux-gnu/libwayland-cursor.so   
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavformat.so (found version "57.83.100") found components: avformat avutil swscale swresample avcodec 
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11") 
-- Checking for modules 'gio-2.0;gio-unix-2.0'
--   Found gio-2.0, version 2.56.4
--   Found gio-unix-2.0, version 2.56.4
-- Found Gio: /usr/lib/aarch64-linux-gnu/libgio-2.0.so  
-- Found Wayland: /usr/lib/aarch64-linux-gnu/libwayland-client.so;/usr/lib/aarch64-linux-gnu/libwayland-server.so;/usr/lib/aarch64-linux-gnu/libwayland-egl.so;/usr/lib/aarch64-linux-gnu/libwayland-cursor.so  found components: Client 
-- Found Xkbcommon: /usr/lib/aarch64-linux-gnu/libxkbcommon.so  
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- XCB[XCB]: Found component XCB
-- XCB[XFIXES]: Found component XFIXES
-- XCB[RANDR]: Found component RANDR
-- XCB[SHM]: Found component SHM
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB: /usr/lib/aarch64-linux-gnu/libxcb.so;/usr/lib/aarch64-linux-gnu/libxcb-xfixes.so;/usr/lib/aarch64-linux-gnu/libxcb-randr.so;/usr/lib/aarch64-linux-gnu/libxcb-shm.so;/usr/lib/aarch64-linux-gnu/libxcb-xinerama.so  found components: XCB XFIXES RANDR SHM XINERAMA 
-- OBS:  ENABLED    linux-capture
-- OBS:  ENABLED    linux-pulseaudio
-- Found Libv4l2: /usr/lib/aarch64-linux-gnu/libv4l2.so  
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavcodec.so (found version "57.107.100") found components: avcodec avutil avformat 
-- Found Udev: /lib/aarch64-linux-gnu/libudev.so  
-- OBS:  ENABLED    linux-v4l2
-- OBS:  DISABLED   linux-jack
-- Found ALSA: /usr/lib/aarch64-linux-gnu/libasound.so (found version "1.1.3") 
-- OBS:  ENABLED    linux-alsa
-- OBS:  DISABLED   linux-pipewire
-- OBS:  ENABLED    decklink
-- Found LibVLC: /usr/include/vlc  
-- OBS:  ENABLED    vlc-video
-- OBS:  DISABLED   sndio
-- OBS:  DISABLED   obs-browser
CMake Warning at plugins/obs-browser/CMakeLists.txt:46 (message):
  Browser source support is not enabled by default - please switch
  ENABLE_BROWSER to ON and specify CEF_ROOT_DIR to enable this functionality.


-- OBS:    -        obs-vst uses bundled VST headers
-- OBS:  ENABLED    obs-vst
-- OBS:  ENABLED    image-source
-- Found Libx264: /usr/lib/aarch64-linux-gnu/libx264.so  
-- OBS:  ENABLED    obs-x264
-- OBS:  DISABLED   obs-libfdk
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavcodec.so (found version "57.107.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample 
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavcodec.so (found version "57.107.100") found components: avcodec avutil avformat 
-- Checking for module 'libpci'
--   Found libpci, version 3.5.2
-- Found Libpci: /usr/lib/aarch64-linux-gnu/libpci.so  
-- OBS:  ENABLED    obs-ffmpeg
-- Found MbedTLS: /usr/lib/aarch64-linux-gnu/libmbedtls.so;/usr/lib/aarch64-linux-gnu/libmbedcrypto.so;/usr/lib/aarch64-linux-gnu/libmbedx509.so  
CMake Deprecation Warning at cmake/Modules/ObsHelpers.cmake:397 (message):
  OBS: The feature enabled by 'FTL_FOUND' is deprecated and will soon be
  removed from OBS.
Call Stack (most recent call first):
  cmake/Modules/DeprecationHelpers.cmake:179 (obs_status)
  /usr/share/cmake-3.21/Modules/FindPkgConfig.cmake:9223372036854775807 (__deprecated_feature)
  /usr/share/cmake-3.21/Modules/FindPkgConfig.cmake:781 (if)
  plugins/obs-outputs/CMakeLists.txt:110 (pkg_check_modules)


-- OBS:  ENABLED    ftl ouputs (bundled ftl-sdk)
-- OBS:  ENABLED    obs-outputs
-- Found Libspeexdsp: /usr/lib/aarch64-linux-gnu/libspeexdsp.so  
-- OBS:  obs-filters -> using bundled RNNoise library
-- OBS:  DISABLED   NVidia Audio FX support
-- OBS:  ENABLED    obs-filters
-- OBS:  ENABLED    obs-transitions
-- OBS:  ENABLED    rtmp-services
-- Found Freetype: /usr/lib/aarch64-linux-gnu/libfreetype.so (found version "2.8.1") 
-- Found Fontconfig: /usr/lib/aarch64-linux-gnu/libfontconfig.so (found version "2.12.6") 
-- OBS:  ENABLED    text-freetype2
-- OBS:  DISABLED   aja
-- OBS:  ENABLED    decklink-output-ui
-- OBS:  ENABLED    frontend-tools
-- OBS:  ENABLED    decklink-captions
-- Configuring done
-- Generating done
-- Build files have been written to: /home/garrett/obs-studio-updates/obs-studio/build

@kkartaltepe
Copy link
Collaborator

kkartaltepe commented Mar 28, 2022

We no longer disable functionality if you dont have the required dependencies. It is expected that you will disable all the functionality your build doesnt support explicitly now.

@WizardCM
Copy link
Member

This is a strange error - we don't define any _PyObject_GC_** variables anywhere, so I'm unsure where this conflict could be coming from.

@WizardCM
Copy link
Member

We recommend running a clean build / full rebuild to ensure any stray bits from an outdated OBS build (or an outdated dependency definition) get replaced properly.

@theofficialgman
Copy link
Author

We recommend running a clean build / full rebuild to ensure any stray bits from an outdated OBS build (or an outdated dependency definition) get replaced properly.

@WizardCM @kkartaltepe please re-open, this was a clean build and as seen I have python 3.8. I did exactly as my steps listed. there was no source folder previously.

I have just double verified with another clean pull of the sourcec and build in a totally separate directly and this does happen.

@WizardCM WizardCM reopened this Mar 28, 2022
@kkartaltepe
Copy link
Collaborator

Since python3 is currently appears to be 3.6.5 on ubuntu 18 and your claim python 3.8, im not sure we support building in whatever configuration you seem have managed for yourself. If this occurs in a clean build you likely have an unsupportable system.

@kkartaltepe kkartaltepe changed the title Unable to build since obs-scripting enabled by default obs-scripting fails to build on Ubuntu 18.04 with python 3.8 Mar 28, 2022
@theofficialgman
Copy link
Author

ubuntu 18.04 has python 3.6.9, python 3.7.5, and python 3.8.0 all available in the official repos. this is not custom and an officially supported install of ubuntu

you can find all of them here:
https://packages.ubuntu.com/bionic/python3.6
https://packages.ubuntu.com/bionic/python3.7
https://packages.ubuntu.com/bionic/python3.8

python apt packages (other dependencies that ubuntu distributes via apt) are based on the python3.6 version. 3.7 and 3.8 are minimal installs

@theofficialgman
Copy link
Author

also I am just "claming" python3.8 at all, see it in the cmake output I posted

@theofficialgman
Copy link
Author

theofficialgman commented Mar 28, 2022

anyway... the error originates in an autogenerated file from SWIG during the buildprocess
obs-studio/build/deps/obs-scripting/obspython/CMakeFiles/obspython.dir/obspythonPYTHON_wrap.c

it appears this was a longstanding issue in swig and was never fixed until switch 4.0.1. bionic does not have 4.0.1
https://git.ligo.org/lscsoft/lalsuite/-/issues/279
swig/swig#1586

@WizardCM WizardCM added the Dependency Issue Issue is in external library or dependency, not OBS itself label Mar 28, 2022
@theofficialgman
Copy link
Author

I've filed a bug report upstream at the ubuntu swig package in hopes they add the patch to bionic swig
https://bugs.launchpad.net/ubuntu/+source/swig/+bug/1966617

No changes here should be necessary

@WizardCM WizardCM added the Linux Affects Linux label Mar 28, 2022
@Fenrirthviti Fenrirthviti changed the title obs-scripting fails to build on Ubuntu 18.04 with python 3.8 obs-scripting fails to build on Ubuntu 18.04 with python 3.8 (Upstream SWIG issue) Mar 28, 2022
@Fenrirthviti
Copy link
Member

Fenrirthviti commented Mar 28, 2022

I'm still on the fence if we keep upstream bugs open just for reference/tracking on our side, but I'll leave this for now. Updated the title to reflect it's an upstream issue.

@dodgepong
Copy link
Member

I would argue in favor of keeping them open as tracking issues so that they can be closed once we've integrated the upstream change.

@kkartaltepe
Copy link
Collaborator

kkartaltepe commented Mar 29, 2022

there is nothing to integrate, its just a question of if canonical patches their package or not. considering the existing 4 year queue of bugs for swig the likely hood of them incorporating a one off patch (or even responding) seems low. So we would likely leave this open until we drop support for 18.04 or 18.04 end of lifes in 2023.

@theofficialgman
Copy link
Author

Well this issue doesn't block building for 18.04 on most systems. It just happens to be I have python 3.8 installed (alongside the default 3.6.9).
I'll give whoever got notified a week to respond, then I'll email the maintainer who commited the last patch a few months ago.
This is a simple one line change after all

@RytoEX
Copy link
Member

RytoEX commented Jul 11, 2022

To clarify, this is an issue with the SWIG package for Ubuntu 18.04 (as noted in https://bugs.launchpad.net/ubuntu/+source/swig/+bug/1966617), which is version 3.0.12. The SWIG PR was merged for SWIG version 4.0.1, which is the version of the package for Ubuntu 20.04. This is nothing for us to change on our end here. If the Ubuntu SWIG package maintainer backports the SWIG fix to the 18.04 package, then this will be fixed.

As we will be dropping Ubuntu 18.04 support in OBS Studio 28, we consider this Issue closed as not planned.

@RytoEX RytoEX closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependency Issue Issue is in external library or dependency, not OBS itself Linux Affects Linux
Projects
None yet
Development

No branches or pull requests

7 participants
@kkartaltepe @RytoEX @dodgepong @WizardCM @Fenrirthviti @theofficialgman and others