Closed realdannys closed 4 years ago
Looks like an upstream problem in the cmake-clang integration, which only expects to be given "Clang". This went under the radar as there are no standalone MacOSX builds (and I have no idea how to generate them either).
Blocked by: https://github.com/Xaymar/cmake-clang/issues/1
Looks like an upstream problem in the cmake-clang integration, which only expects to be given "Clang". This went under the radar as there are no standalone MacOSX builds (and I have no idea how to generate them either).
Thanks Xaymar. I did think that maybe the latest Catalina update had updated to a version of Clang/AppleClang that wasn't supported but when I downloaded an old Xcode Command Line tools it actually updated Clang to an even newer version! Maybe if it could be rolled back again it could be fixed?
Please try with the updated submodule in #237
Hey Xaymar,
I got a lot further this time - but I believe I had an error linked to the other one.
clang: error: invalid argument '-compatibility_version 0.8.0' only allowed with '-dynamiclib'
make[2]: *** [UI/frontend-plugins/streamfx/StreamFX.so] Error 1
make[1]: *** [UI/frontend-plugins/streamfx/CMakeFiles/StreamFX.dir/all] Error 2
make: *** [all] Error 2
Is that beacuse i've only been able ot pull in the 237 change and not the 230 one (I changed the branch to "pr-cmake-appleclang" how can I pull the changes from both into the submodule?)
You should be able to cherry pick a specific commit if you know the hash for it. For the other fix it is f5e585d19511882d77b63a7a1cf534a317e55326
, so run git cherry-pick f5e585d19511882d77b63a7a1cf534a317e55326
in the directory where you have StreamFX in.
You should be able to cherry pick a specific commit if you know the hash for it. For the other fix it is
f5e585d19511882d77b63a7a1cf534a317e55326
, so rungit cherry-pick f5e585d19511882d77b63a7a1cf534a317e55326
in the directory where you have StreamFX in.
Hi Xaymar,
I changed my branch back to master and did
git cherry-pick f5e585d19511882d77b63a7a1cf534a317e55326
and
git cherry-pick d6c06ab02bf91f54483459b305e3b386de1f9f8f
for both fixes.
I then ran cmake .. && make again in the root directory but got the following result.
clang: error: invalid argument '-compatibility_version 0.8.0' only allowed with '-dynamiclib'
make[2]: *** [UI/frontend-plugins/streamfx/StreamFX.so] Error 1
make[1]: *** [UI/frontend-plugins/streamfx/CMakeFiles/StreamFX.dir/all] Error 2
make: *** [all] Error 2
Do I need to do another pull or something before building?
I did run git submodule update --init --recursive and created a new build directory but unfortunately got the following...
-- Found AppKit: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework
-- StreamFX: Using native obs-studio.
Clang for CMake: C ID 'AppleClang'
Clang for CMake: C Version '11.0.3.11030032'
Clang for CMake: C++ ID 'AppleClang'
Clang for CMake: C++ Version '11.0.3.11030032'
CMake Error at UI/frontend-plugins/streamfx/cmake/clang/Clang.cmake:110 (message):
Clang for CMake: Current Compiler is not yet supported, please open an
issue for it.
Call Stack (most recent call first):
UI/frontend-plugins/streamfx/CMakeLists.txt:1009 (generate_compile_commands_json)
-- Configuring incomplete, errors occurred!
See also "/Users/mbp/documents/OBS/obs-studio/build/CMakeFiles/CMakeOutput.log".
See also "/Users/mbp/documents/OBS/obs-studio/build/CMakeFiles/CMakeError.log".
I see the problem. UNIX is true for all unix like systems, including Apple Mac. Will fix it.
The version PR now correctly checks for "Not Apple" instead for "Is Unix". Also the other PR now has an option to disable clang integration.
Well I think i'm updating everything correctly - I did a git fetch in the streamlabs directory to get the new commits.
I then did
git cherry-pick f56ba364a6fc582d2f50f922187c2d49b258783e
and
git cherry-pick 079aaeb9e456285be485e03f65815c301a49dcbd
ran git submodule update --init --recursive just to be sure but cmake .. && make
just gives me the same error. Also sometimes it'll compiled all the way to 99% and then give me an error now it's just stopping within a few seconds with this.
-- StreamFX: Using native obs-studio.
Clang for CMake: C ID 'AppleClang'
Clang for CMake: C Version '11.0.3.11030032'
Clang for CMake: C++ ID 'AppleClang'
Clang for CMake: C++ Version '11.0.3.11030032'
CMake Error at UI/frontend-plugins/streamfx/cmake/clang/Clang.cmake:110 (message):
Clang for CMake: Current Compiler is not yet supported, please open an
issue for it.
Call Stack (most recent call first):
UI/frontend-plugins/streamfx/CMakeLists.txt:1009 (generate_compile_commands_json)
-- Configuring incomplete, errors occurred!
See also "/Users/mbp/documents/OBS/obs-studio/build/CMakeFiles/CMakeOutput.log".
See also "/Users/mbp/documents/OBS/obs-studio/build/CMakeFiles/CMakeError.log".
Anything in the error logs going to be useful?
You have to update submodules after cherry picking the changes
I have run git submodule update
Ok i'm lost - I started the entire thing from scratch, here are my steps below, all my git commands and then the final output (with the same result) from cmake. Am I doing something wrong or does something need changing still?
MacBookPro:obs2 user1$ git clone --recursive https://github.com/obsproject/obs-studio.git
Cloning into 'obs-studio'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 60104 (delta 0), reused 0 (delta 0), pack-reused 60103
Receiving objects: 100% (60104/60104), 32.88 MiB | 16.96 MiB/s, done.
Resolving deltas: 100% (40471/40471), done.
Submodule 'plugins/enc-amf' (https://github.com/obsproject/obs-amd-encoder.git) registered for path 'plugins/enc-amf'
Submodule 'plugins/mac-syphon/syphon-framework' (https://github.com/palana/Syphon-Framework.git) registered for path 'plugins/mac-syphon/syphon-framework'
Submodule 'plugins/obs-browser' (https://github.com/obsproject/obs-browser.git) registered for path 'plugins/obs-browser'
Submodule 'plugins/obs-outputs/ftl-sdk' (https://github.com/Mixer/ftl-sdk.git) registered for path 'plugins/obs-outputs/ftl-sdk'
Submodule 'plugins/obs-vst' (https://github.com/obsproject/obs-vst.git) registered for path 'plugins/obs-vst'
Submodule 'plugins/win-dshow/libdshowcapture' (https://github.com/obsproject/libdshowcapture.git) registered for path 'plugins/win-dshow/libdshowcapture'
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/enc-amf'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 8076 (delta 4), reused 9 (delta 3), pack-reused 8062
Receiving objects: 100% (8076/8076), 14.42 MiB | 11.83 MiB/s, done.
Resolving deltas: 100% (5652/5652), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/mac-syphon/syphon-framework'...
remote: Enumerating objects: 453, done.
remote: Total 453 (delta 0), reused 0 (delta 0), pack-reused 453
Receiving objects: 100% (453/453), 393.37 KiB | 1.13 MiB/s, done.
Resolving deltas: 100% (306/306), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/obs-browser'...
remote: Enumerating objects: 2100, done.
remote: Total 2100 (delta 0), reused 0 (delta 0), pack-reused 2100
Receiving objects: 100% (2100/2100), 636.22 KiB | 1.61 MiB/s, done.
Resolving deltas: 100% (1424/1424), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/obs-outputs/ftl-sdk'...
remote: Enumerating objects: 2720, done.
remote: Total 2720 (delta 0), reused 0 (delta 0), pack-reused 2720
Receiving objects: 100% (2720/2720), 895.99 KiB | 2.04 MiB/s, done.
Resolving deltas: 100% (1926/1926), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/obs-vst'...
remote: Enumerating objects: 55, done.
remote: Counting objects: 100% (55/55), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 630 (delta 21), reused 26 (delta 6), pack-reused 575
Receiving objects: 100% (630/630), 614.01 KiB | 1.84 MiB/s, done.
Resolving deltas: 100% (356/356), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/win-dshow/libdshowcapture'...
remote: Enumerating objects: 784, done.
remote: Total 784 (delta 0), reused 0 (delta 0), pack-reused 784
Receiving objects: 100% (784/784), 240.01 KiB | 1.00 MiB/s, done.
Resolving deltas: 100% (547/547), done.
Submodule path 'plugins/enc-amf': checked out '6e934b6b281cf675522ea43391376bd6bb089256'
Submodule path 'plugins/mac-syphon/syphon-framework': checked out '01b144811f6f7080b70b2d7cc729da071f86f9d7'
Submodule path 'plugins/obs-browser': checked out '22510c95068dd1986f1962c671f83e483ca9f5d4'
Submodule path 'plugins/obs-outputs/ftl-sdk': checked out 'd0c8469f66806b5ea738d607f7d2b000af8b1129'
Submodule 'libcurl' (https://github.com/curl/curl) registered for path 'plugins/obs-outputs/ftl-sdk/libcurl'
Submodule 'libjansson' (https://github.com/akheron/jansson) registered for path 'plugins/obs-outputs/ftl-sdk/libjansson'
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/obs-outputs/ftl-sdk/libcurl'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 152383 (delta 20), reused 25 (delta 11), pack-reused 152337
Receiving objects: 100% (152383/152383), 67.37 MiB | 14.56 MiB/s, done.
Resolving deltas: 100% (118928/118928), done.
Cloning into '/Users/user1/Documents/OBS2/obs-studio/plugins/obs-outputs/ftl-sdk/libjansson'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6346 (delta 0), reused 1 (delta 0), pack-reused 6341
Receiving objects: 100% (6346/6346), 1.65 MiB | 3.28 MiB/s, done.
Resolving deltas: 100% (3800/3800), done.
Submodule path 'plugins/obs-outputs/ftl-sdk/libcurl': checked out '44b9b4d4f56d6f6de92c89636994c03984e9cd01'
Submodule path 'plugins/obs-outputs/ftl-sdk/libjansson': checked out 'bc5741fb1ac730ead24e9bd08977fc6c248e04b0'
Submodule path 'plugins/obs-vst': checked out '83e1bf241007480a796c0c3f65018d1f0e482447'
Submodule path 'plugins/win-dshow/libdshowcapture': checked out '03fbb3814b2ad678f5be4b23b8ca05fb4172e12e'
MacBookPro:obs2 user1$ cd obs-studio
MacBookPro:obs-studio user1$ cd UI
MacBookPro:UI user1$ cd frontend-plugins
MacBookPro:frontend-plugins user1$ git submodule add 'https://github.com/Xaymar/obs-StreamFX.git' streamfx
Cloning into '/Users/user1/Documents/OBS2/obs-studio/UI/frontend-plugins/streamfx'...
remote: Enumerating objects: 185, done.
remote: Counting objects: 100% (185/185), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 6119 (delta 89), reused 67 (delta 41), pack-reused 5934
Receiving objects: 100% (6119/6119), 13.53 MiB | 14.60 MiB/s, done.
Resolving deltas: 100% (4463/4463), done.
MacBookPro:frontend-plugins user1$ nano CMakeLists.txt
MacBookPro:frontend-plugins user1$ cd streamfx
MacBookPro:streamfx user1$ git fetch
MacBookPro:streamfx user1$ git pull
Already up to date.
MacBookPro:streamfx user1$ git cherry-pick d6c06ab02bf91f54483459b305e3b386de1f9f8f
[master 5ea42a0] cmake: Update Clang integration to support AppleClang
Author: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
Date: Sun May 31 02:05:36 2020 +0200
1 file changed, 1 insertion(+), 1 deletion(-)
MacBookPro:streamfx user1$ git cherry-pick f56ba364a6fc582d2f50f922187c2d49b258783e
[master d4c7d55] cmake: Add an option to turn off clang integration
Author: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
Date: Sun May 31 16:50:59 2020 +0200
1 file changed, 5 insertions(+), 3 deletions(-)
MacBookPro:streamfx user1$ git cherry-pick 079aaeb9e456285be485e03f65815c301a49dcbd
Auto-merging CMakeLists.txt
[master a08f061] cmake: Don't set version for Mac dynamic libraries
Author: Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
Date: Sun May 31 01:44:12 2020 +0200
1 file changed, 1 insertion(+), 1 deletion(-)
MacBookPro:streamfx user1$ git submodule update
MacBookPro:streamfx user1$ cd ..
MacBookPro:frontend-plugins user1$ git submodule update
Submodule path 'streamfx': checked out '8a8b0cf3fa72ea523648601685ccbaad172fda7a'
MacBookPro:frontend-plugins user1$ cd ..
MacBookPro:UI user1$ cd ..
MacBookPro:obs-studio user1$ mkdir build
MacBookPro:obs-studio user1$ cd build
MacBookPro:build user1$ git submodule update --init --recursive
Submodule 'cmake/clang' (https://github.com/Xaymar/cmake-clang.git) registered for path '../UI/frontend-plugins/streamfx/cmake/clang'
Submodule 'third-party/nvidia-arsdk' (https://github.com/NVIDIA/BROADCAST-AR-SDK.git) registered for path '../UI/frontend-plugins/streamfx/third-party/nvidia-arsdk'
Cloning into '/Users/user1/Documents/OBS2/obs-studio/UI/frontend-plugins/streamfx/cmake/clang'...
Cloning into '/Users/user1/Documents/OBS2/obs-studio/UI/frontend-plugins/streamfx/third-party/nvidia-arsdk'...
Submodule path '../UI/frontend-plugins/streamfx/cmake/clang': checked out '58da85a255b468ad170603e9528d63cf0d73bd27'
Submodule path '../UI/frontend-plugins/streamfx/third-party/nvidia-arsdk': checked out '3765f94a8a981552a2fb0665ae84af7272322219'
MacBookPro:build user1$ export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/
MacBookPro:build user1$ cmake .. && make
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OBS_VERSION: 25.0.7-180-g699ce4d2-modified
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework
-- Found FFmpeg: /usr/local/Cellar/ffmpeg/4.2.3/lib/../lib/libavcodec.dylib (found version "58.54.100") found components: avcodec avdevice avutil avformat
-- Found Libcurl: /usr/bin/../lib/libcurl.dylib
-- Luajit support not found.
-- Scripting: Python 3 supported
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.0.1", minimum required is "2")
-- Jansson >=2.5 not found, building bundled version
C compiler: Clang
-- Looking for include file endian.h
-- Looking for include file endian.h - not found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file sched.h
-- Looking for include file sched.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for close
-- Looking for close - found
-- Looking for getpid
-- Looking for getpid - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for open
-- Looking for open - found
-- Looking for read
-- Looking for read - found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int64
-- Check size of __int64 - failed
-- Check size of int64_t
-- Check size of int64_t - done
-- Check size of long long
-- Check size of long long - done
-- Check size of int32_t
-- Check size of int32_t - done
-- Check size of __int32
-- Check size of __int32 - failed
-- Check size of long
-- Check size of long - done
-- Check size of int
-- Check size of int - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of __uint32
-- Check size of __uint32 - failed
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of __uint16
-- Check size of __uint16 - failed
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Check size of __uint8
-- Check size of __uint8 - failed
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of SSIZE_T
-- Check size of SSIZE_T - failed
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - found
-- Looking for _strtoi64
-- Looking for _strtoi64 - not found
-- Looking for include file locale.h
-- Looking for include file locale.h - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for setlocale
-- Looking for setlocale - found
-- Performing Test HAVE_INLINE
-- Performing Test HAVE_INLINE - Success
-- Performing Test HAVE___INLINE
-- Performing Test HAVE___INLINE - Success
-- Performing Test HAVE___INLINE__
-- Performing Test HAVE___INLINE__ - Success
-- Performing Test HAVE_SYNC_BUILTINS
-- Performing Test HAVE_SYNC_BUILTINS - Success
-- Performing Test HAVE_ATOMIC_BUILTINS
-- Performing Test HAVE_ATOMIC_BUILTINS - Success
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found FFmpeg: /usr/local/Cellar/ffmpeg/4.2.3/lib/../lib/libavformat.dylib (found version "58.29.100") found components: avformat avutil swscale swresample avcodec
-- Using libavcodec for image loading in libobs
-- Found ZLIB: /usr/bin/../lib/libz.dylib
-- Could NOT find LibVLC (missing: VLC_INCLUDE_DIR)
-- VLC video plugin disabled
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'jack'
-- Found jack, version 0.125.0
-- Found jack: /usr/local/lib/libjack.dylib
-- Using the bundled VST header.
-- Found Libx264: /usr/local/Cellar/x264/r2999/lib/../lib/libx264.dylib
-- Libfdk not found - obs-libfdk plugin disabled
-- Found FFmpeg: /usr/local/Cellar/ffmpeg/4.2.3/lib/../lib/libavcodec.dylib (found version "58.54.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample
-- Found FFmpeg: /usr/local/Cellar/ffmpeg/4.2.3/lib/../lib/libavcodec.dylib (found version "58.54.100") found components: avcodec avutil avformat
-- Found MbedTLS: /usr/local/sbin/../lib/libmbedtls.dylib;/usr/local/sbin/../lib/libmbedcrypto.dylib;/usr/local/sbin/../lib/libmbedx509.dylib
-- Found ftl-sdk: ftl outputs enabled
-- SpeexDSP support not found
-- Found AppKit: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework
-- StreamFX: Using native obs-studio.
Clang for CMake: C ID 'AppleClang'
Clang for CMake: C Version '11.0.3.11030032'
Clang for CMake: C++ ID 'AppleClang'
Clang for CMake: C++ Version '11.0.3.11030032'
CMake Error at UI/frontend-plugins/streamfx/cmake/clang/Clang.cmake:110 (message):
Clang for CMake: Current Compiler is not yet supported, please open an
issue for it.
Call Stack (most recent call first):
UI/frontend-plugins/streamfx/CMakeLists.txt:1012 (generate_compile_commands_json)
-- Configuring incomplete, errors occurred!
See also "/Users/user1/documents/OBS2/obs-studio/build/CMakeFiles/CMakeOutput.log".
See also "/Users/user1/documents/OBS2/obs-studio/build/CMakeFiles/CMakeError.log".
The below command should apply both fixes at the same time.
git fetch -q --all -f -t
git switch -c issue-229
git pull origin pr-mac-version-bug
git pull origin pr-cmake-appleclang
git submodule update --init --recursive --force
Above command assume that the remote is called "origin".
The below command should apply both fixes at the same time.
git fetch -q --all -f -t git switch -c issue-229 git pull origin pr-mac-version-bug git pull origin pr-cmake-appleclang git submodule update --init --recursive --force
Above command assume that the remote is called "origin".
That did it! The fixes work, build was successful, all seems to be running ok!
Hi,
Trying to build a OBS for Mac from source with StreamFX as per the instructions but i'm hit with the following error message...
Running macOS 10.15.5 Catalina.