I am trying to build x265 on macOS 15.2 (Sequoia). I followed the Linux instructions on the wiki and it failed (CMake version 3.31.4):
linux % make
[ 1%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/pixel-a.asm.o
[ 2%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/const-a.asm.o
[ 3%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/cpu-a.asm.o
/x265_git/source/common/x86/cpu-a.asm:181: error: symbol `..plt' not defined
/x265_git/source/common/../common/x86/x86inc.asm:1095: ... from macro `call' defined here
make[2]: *** [common/CMakeFiles/common.dir/x86/cpu-a.asm.o] Error 1
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
make: *** [all] Error 2
I tried running build/xcode/make-project.sh
and that also failed:
-- Configuring done (25.6s)
CMake Error in CMakeLists.txt:
The custom command generating
/x265_git/build/xcode/pixel-a.asm.o
is attached to multiple targets:
cli
x265-static
x265-shared
but none of these is a common dependency of the other(s). This is not
allowed by the Xcode "new build system".
-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.
I have successfully built x265 on older versions of macOS. The version I installed in August 2023 with macOS 13 (Ventura) says:
% x265 --version
x265 [info]: HEVC encoder version 3.5+103-8f18e3ad3
x265 [info]: build info [Mac OS X][clang 14.0.3][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
This is all beyond my level of technical expertise. Is there something I can do to make it work or is it just not possible on this version of macOS (15.2 Sequoia)?
This is a new regression from x265 master that assumes all Unix is using ELF binary which causes this build error on macOS.
I reported this already: https://bitbucket.org/multicoreware/x265_git/issues/980/source-common-x86-cpu-aasm-assumes-all
You can revert commit f5e4a648727ea86828df236eb44742fe3e3bf366 to workaround this for now if you want to build master.