occ-ai / obs-urlsource

OBS plugin to fetch data from a URL or file, connect to an API or AI service, parse responses and display text, image or audio on scene
https://obsproject.com/forum/resources/url-api-source-fetch-live-data-and-display-it-on-screen.1756/
GNU General Public License v2.0
130 stars 18 forks source link

FTBFS since Lexbor inclusion in urlsource 0.2.1 #54

Closed flexiondotorg closed 7 months ago

flexiondotorg commented 7 months ago

URL Source 0.2.1 and 0.2.2 FTBFS.

I build OBS Studio and 50 plugins from source as a portable build for Ubuntu.

Most plugins, including urlsource, are built in the same way. Here is the generic build for a plugin:

A couple of flags are provided for URL Source to prevent compiler warnings from failing the build:

Since Lexbor was included in URL Source 0.2.1, the plugin fails to build from source. Here is the log:

+ cmake -S /root/obs-30/plugins/obs-urlsource -B /root/obs-30/plugins/obs-urlsource/build -G Ninja -DCMAKE_BUILD_TYPE=Release '-DCMAKE_CXX_FLAGS= -Wno-error=conversion -Wno-error=shadow' '-DCMAKE_C_FLAGS= -Wno-error=conversion -Wno-error=shadow' -DCMAKE_INSTALL_PREFIX=/root/obs-30/obs-portable-30.0.0-r23321-ubuntu-23.04 -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_PUGIXML=ON --preset linux-x86_64 -Wno-dev
+ tee /root/obs-30/build/cmake-obs-urlsource.log
Preset CMake variables:

  ENABLE_FRONTEND_API:BOOL="TRUE"
  ENABLE_QT:BOOL="TRUE"
  QT_VERSION="6"

-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.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
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Qt version found: 6
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.5.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.88.1")  
-- jsoncons v0.171.0
-- Version 12.3.0
Config:
 target        = single_include/inja/inja.hpp
 working_dir   = /root/obs-30/plugins/obs-urlsource/vendor/inja
 include_paths = []
Creating amalgamation:
 - processing "inja/inja.hpp"
...done!

Files processed: ['inja/inja.hpp']
Files included: ['inja/inja.hpp', 'inja/environment.hpp', 'inja/config.hpp', 'inja/template.hpp', 'inja/node.hpp', 'inja/function_storage.hpp', 'inja/utils.hpp', 'inja/exceptions.hpp', 'inja/statistics.hpp', 'inja/parser.hpp', 'inja/lexer.hpp', 'inja/token.hpp', 'inja/renderer.hpp']

-- lexbor will be installed to /root/obs-30/plugins/obs-urlsource/build/lexbor_build-prefix
-- lexbor library expected at /root/obs-30/plugins/obs-urlsource/build/lexbor_build-prefix/lib/liblexbor_static.a
-- Configuring done
-- Generating done
-- Build files have been written to: /root/obs-30/plugins/obs-urlsource/build
+ cmake --build /root/obs-30/plugins/obs-urlsource/build
ninja: error: 'lexbor_build-prefix/lib/liblexbor_static.a', needed by 'obs-urlsource.so', missing and no known rule to make it

A few weeks ago, I experienced a similar pugixml issue in this project. I worked around it by using a system-provided pugixml.

I cannot use the same workaround for Lexbor as it is not published in Debian/Ubuntu archives.

royshil commented 7 months ago

thanks for the input! there was a thing i had to put in place for Linux so this would work with building Lexbor but i thought i got that fixed... the missing cmake dependency the CI builds it fine on Ubuntu i can look at it on my Ubuntu machine and try to build from source

royshil commented 7 months ago

im able to replicate this on my ubuntu trying to fix it...

royshil commented 7 months ago

@flexiondotorg can you check #55 ? it fixed the problem for me

flexiondotorg commented 7 months ago

@royshil Thanks for working on a fix :bow:

I confirm that building from source using the roy.fix_linux_build_lexbor branch is successful :+1:

royshil commented 7 months ago

fixed on master