obsproject/obs-deps

MacOS Catalina has unmet dependencies pcre & zx

mtippett opened this issue · 2 comments

Platform

Operating system and version: macOS Catalina (10.15.6)
OBS Studio version: git (commit 2744ca99 - 6 Aug 2020)

Expected Behavior

CI/full-build-macos.sh -b build completes successfully with a OBS.App in

Current Behavior

The build is successful, the bundling fails -

Without pcre, obslua fails to build. Bundling fails.

[OBS-Studio] Bundle dylibs for macOS application
  + Run dylibBundler..
Collecting dependencies...
/Library/Developer/CommandLineTools/usr/bin/objdump: error: './OBS.app/Contents/MacOS/obslua.so': No such file or directory


/!\ ERROR: Cannot find file ./OBS.app/Contents/MacOS/obslua.so to read its load commands
  + ERROR during build step: bundle app

root cause appears highlighted below.

[OBS-Studio] Run CMAKE for OBS...
-- OBS_VERSION: 25.0.7-478-g2744ca99
-- Found FFmpeg: /tmp/obsdeps/lib/../bin/libavcodec.dylib (found version "58.54.100") found components: avcodec avdevice avutil avformat
-- Scripting: Luajit supported
-- Scripting: Python 3 support disabled
-- Command "/tmp/obsdeps/bin/swig -swiglib" failed with output:
dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
  Referenced from: /tmp/obsdeps/bin/swig
  Reason: image not found

-- Scripting: SWIG not found; scripting disabled

As a shortcut, installing pcre via brew allows the bundling to be sucessful.

Likewise without xz, libavcodec fails to build, and is highlighted at the bundling stage.

[OBS-Studio] Bundle dylibs for macOS application
  + Run dylibBundler..
Collecting dependencies...

/!\ WARNING: Dependency liblzma.5.dylib of /private/tmp/obsdeps/bin/libavcodec.58.dylib not found

liblzma is included in brew's xz package.

Steps to Reproduce

  1. Fresh install with brew (or brew remove xz pcre)
  2. CI/full-build-macos.sh -b will fail with the two error messages.

Additional information

Related to obsproject/obs-studio#3242

Probably same issue as before, CI build environment isn't "clean" and thus includes Homebrew libraries. Will take a look at it tomorrow.

Quick update: At least pcre is a hard dependency for Swig, so we need to build pcre on CI for Swig, which uses bzip2 and zlib from macOS.

As for xz I still have to check if it is a hard requirement for libavcodec and build it on CI as well to remove Homebrew references.