I'm trying to build Dolphin w/ ffmpeg & sdl2 so I can frame dump .avi videos and use my pro controller's joystick.
I'm working with these things:
- QT 5.12.11
- XCode 10.1 | macOS 10.14 SDK
- Dolphin source commit: acc7d3710d60552769f61f4b44bc8533a940df36
- FFmpeg 3.1 source
This is my procedure:
Install QT with the creator & macOS (binaries?)
Add these lines to .bash_profile
export PATH=/Users/xteal/Qt5.12.11/5.12.11/clang_64/bin:$PATH
export Qt5_DIR=/Users/xteal/Qt5.12.11/5.12.11/clang_64/lib/cmake/Qt5/Qt5Config.cmake
Install homebrew (package manager, not homebrew channel), then run these commands:
brew install nasm
brew install yasm
Open ffmpeg folder in terminal & run commands:
./configure
make
make install
Then, open the dolphin folder in terminal and run commands:
mkdir build
cd build
(change set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14.0" CACHE STRING "") to 10.12.0 in CMakeLists.txt) (I use 10.13.6, leaving this as 10.14.0 will make it so I can't open the app)
(prevent dolphin from bundling postprocessing in /source/core/dolphinqt/cmakelists.txt)
cmake ..
make -j5
I'm hit with this LONG error, to make it short here's the first and last few lines of my error:
This is my cmake output:
I'm no C++ expert, but I took a look at XCode, specifically this file:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h
That contains this mysterious "SSLCreateContext" function that make is complaining about from the start of the stack trace.
I've isolated this issue down to this: ffmpeg.
I've tried to install ffmpeg with brew, but it's a huge pain in the ass. First, I have to install a newer curl to download theora, then brew kills itself for some WTF make reason with nettle. I've given up at that part.
The whole point of me compiling Dolphin was to frame dump an .avi file.
Dolphin 5.0 STABLE can dump an .avi file without me needing to do anything fairly hacky with it, and only drops the FPS by 30%, compared to a beta build of Dolphin 5.0 dropping it by almost 80%. If I were to put ffmpeg on a modern build of Dolphin, hopefully it would lag less right?
I'm working with these things:
- QT 5.12.11
- XCode 10.1 | macOS 10.14 SDK
- Dolphin source commit: acc7d3710d60552769f61f4b44bc8533a940df36
- FFmpeg 3.1 source
This is my procedure:
Install QT with the creator & macOS (binaries?)
Add these lines to .bash_profile
export PATH=/Users/xteal/Qt5.12.11/5.12.11/clang_64/bin:$PATH
export Qt5_DIR=/Users/xteal/Qt5.12.11/5.12.11/clang_64/lib/cmake/Qt5/Qt5Config.cmake
Install homebrew (package manager, not homebrew channel), then run these commands:
brew install nasm
brew install yasm
Open ffmpeg folder in terminal & run commands:
./configure
make
make install
Then, open the dolphin folder in terminal and run commands:
mkdir build
cd build
(change set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14.0" CACHE STRING "") to 10.12.0 in CMakeLists.txt) (I use 10.13.6, leaving this as 10.14.0 will make it so I can't open the app)
(prevent dolphin from bundling postprocessing in /source/core/dolphinqt/cmakelists.txt)
cmake ..
make -j5
I'm hit with this LONG error, to make it short here's the first and last few lines of my error:
Code:
Undefined symbols for architecture x86_64:
"_SSLCreateContext", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetPeerDomainName", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLSetIOFuncs", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SecItemImport", referenced from:
_import_pem in libavformat.a(tls_securetransport.o)
"_SSLClose", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
_tls_close in libavformat.a(tls_securetransport.o)
"_SSLHandshake", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SSLCopyPeerTrust", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_SecTrustSetAnchorCertificates", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_swr_close", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
_opus_decode_flush in libavcodec.a(opusdec.o)
"_swr_is_initialized", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
...
...
...
"_kCVImageBufferTransferFunction_ITU_R_709_2", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_SSLRead", referenced from:
_tls_read in libavformat.a(tls_securetransport.o)
"_SSLSetSessionOption", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_CMSampleBufferGetDataBuffer", referenced from:
_vtenc_frame in libavcodec.a(videotoolboxenc.o)
"_kVTCompressionPropertyKey_MoreFramesBeforeStart", referenced from:
_vtenc_create_encoder in libavcodec.a(videotoolboxenc.o)
"_kVDADecoderConfiguration_Height", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
"_kVTProfileLevel_H264_Main_4_2", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_VTDecompressionSessionDecodeFrame", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_AudioConverterSetProperty", referenced from:
_ffat_create_decoder in libavcodec.a(audiotoolboxdec.o)
_ffat_init_encoder in libavcodec.a(audiotoolboxenc.o)
"_AudioConverterGetPropertyInfo", referenced from:
_ffat_create_decoder in libavcodec.a(audiotoolboxdec.o)
_ffat_init_encoder in libavcodec.a(audiotoolboxenc.o)
"_kVTProfileLevel_H264_High_3_1", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_CVPixelBufferRetain", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
_vda_decoder_callback in libavcodec.a(vda_h264.o)
"_kVTEncodeFrameOptionKey_ForceKeyFrame", referenced from:
_vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
"_AudioFormatGetProperty", referenced from:
_ffat_create_decoder in libavcodec.a(audiotoolboxdec.o)
"_kCMTimeInvalid", referenced from:
_vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
"_kVTProfileLevel_H264_Main_5_0", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_kVTProfileLevel_H264_Baseline_3_2", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_SecIdentityCreate", referenced from:
_tls_open in libavformat.a(tls_securetransport.o)
"_kCVImageBufferYCbCrMatrix_ITU_R_601_4", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
"_kCMTimeIndefinite", referenced from:
_vtenc_init in libavcodec.a(videotoolboxenc.o)
_vtenc_frame in libavcodec.a(videotoolboxenc.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Binaries/Dolphin.app/Contents/MacOS/Dolphin] Error 1
make[1]: *** [Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2
This is my cmake output:
Code:
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- Detected architecture: x86_64
-- Found avcodec: /usr/local/include /usr/local/lib/libavcodec.a
-- Found avdevice: /usr/local/include /usr/local/lib/libavdevice.a
-- Found avfilter: /usr/local/include /usr/local/lib/libavfilter.a
-- Found avformat: /usr/local/include /usr/local/lib/libavformat.a
-- Found avutil: /usr/local/include /usr/local/lib/libavutil.a
-- Found swresample: /usr/local/include /usr/local/lib/libswresample.a
-- Found swscale: /usr/local/include /usr/local/lib/libswscale.a
-- libav/ffmpeg found, enabling AVI frame dumps
-- Using named pipes as controller inputs
-- Watching game memory for changes
-- Enabling analytics collection (subject to end-user opt-in)
CMake Warning at CMakeLists.txt:561 (find_package):
By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "fmt", but
CMake did not find one.
Could not find a package configuration file provided by "fmt" (requested
version 7.1) with any of the following names:
fmtConfig.cmake
fmt-config.cmake
Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
to a directory containing one of the above files. If "fmt" provides a
separate development package or SDK, be sure it has been installed.
-- Using static fmt from Externals
-- Version: 7.1.0
-- Build type: Release
-- CXX_STANDARD: 11
-- Required features: cxx_variadic_templates
-- Could NOT find pugixml (missing: pugixml_LIBRARIES pugixml_INCLUDE_DIRS)
-- Using static pugixml from Externals
-- Using static enet from Externals
-- Using static xxhash from Externals
-- Using shared bzip2
-- Shared lzma found but lacks headers, falling back to the static library
-- Shared zstd found but lacks headers, falling back to the static library
-- Using shared zlib
-- Checking for module 'minizip>=2.0.0'
-- No package 'minizip' found
-- Shared minizip not found, falling back to the static library
-- Using static lzo from Externals
-- Using static libpng from Externals
-- Using static FreeSurround from Externals
-- Using ed25519 from Externals
-- Could NOT find CUBEB (missing: CUBEB_INCLUDE_DIR CUBEB_LIBRARY)
-- Using static cubeb from Externals
-- Using static LibUSB from Externals
-- Using static SFML 2.1 from Externals
-- Using static miniupnpc from Externals
-- Using static mbed TLS from Externals
-- Using shared libcurl
-- Could NOT find HIDAPI (missing: HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR)
-- Using static HIDAPI from Externals
-- Using static DiscordRPC from Externals
-- Could NOT find SYSTEMD (missing: SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS)
-- libsystemd not found, disabling traversal server watchdog support
-- Using static gtest from Externals
-- Could NOT find OpenSLES (missing: OPENSLES_LIBRARY OPENSLES_INCLUDE_DIR)
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- ALSA NOT found, disabling ALSA sound backend
-- PulseAudio NOT found, disabling PulseAudio sound backend
-- Using shared SDL2
-- Found Qt version 5.12.11
CMake Warning (dev) at /Applications/CMake.app/Contents/share/cmake-3.20/Modules/BundleUtilities.cmake:237 (message):
Policy CMP0080 is not set: BundleUtilities cannot be included at configure
time. Run "cmake --help-policy CMP0080" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.20/Modules/BundleUtilities.cmake:246 (_warn_cmp0080)
Source/Core/DolphinQt/CMakeLists.txt:469 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
I'm no C++ expert, but I took a look at XCode, specifically this file:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h
That contains this mysterious "SSLCreateContext" function that make is complaining about from the start of the stack trace.
I've isolated this issue down to this: ffmpeg.
I've tried to install ffmpeg with brew, but it's a huge pain in the ass. First, I have to install a newer curl to download theora, then brew kills itself for some WTF make reason with nettle. I've given up at that part.
The whole point of me compiling Dolphin was to frame dump an .avi file.
Dolphin 5.0 STABLE can dump an .avi file without me needing to do anything fairly hacky with it, and only drops the FPS by 30%, compared to a beta build of Dolphin 5.0 dropping it by almost 80%. If I were to put ffmpeg on a modern build of Dolphin, hopefully it would lag less right?