For those coming to this thread after me, and for those earlier who wanted updated build instructions; as of 22 Dec 2021, the PR in question appears to be
#20200, which doesn't come up on a search for M1 or Apple Silicon, which makes some sense as it would be applicable to Intel too; as Fuzzard said earlier, it's M1 that's the motivation to finally get done what's been wanting doing for a while (dropping the SDL1 dependency), but Intel Macs should benefit too. The branch is
fuzzard:osx_nativeSDL. At the time of posting this was at commit 4a991c7.
Notes while building... (I did finally get the full Xcode installed - it took a while! - so I'll be attempting to follow the instructions that use that.)
Following instructions
here.
Building all the binary add ons fails, in step 5. It starts to go wrong when trying to build openssl, which it's doing apparently as a dependency of vfs.sftp. Many, many errors that look like it's trying to assemble x86-64 code (presumably without an x86-64 assembler). It starts like this:
Code:
[100%] Completed 'vfs.rar'
[100%] Built target vfs.rar
[ 33%] Built target zlib
[ 33%] Performing build step for 'openssl'
[ 12%] Performing build step for 'openssl'
crypto/aes/aesni-mb-x86_64.s:10:7: error: unknown token in expression
movq %rsp,%rax
^
crypto/aes/aesni-mb-x86_64.s:10:7: error: invalid operand
movq %rsp,%rax
^
and goes on in the same vein for a long time, but all essentialy the same errors, apparently with each line in assembler.
After that, the visualisation addons also fail, all in the same way, because glm fails:
Code:
make[9]: *** [crypto/aes/aesni-x86_64.o] Error 1
make[8]: *** [all] Error 2
make[7]: *** [openssl-prefix/src/openssl-stamp/openssl-build] Error 2
make[6]: *** [CMakeFiles/openssl.dir/all] Error 2
make[5]: *** [all] Error 2
make[4]: *** [build/openssl/src/openssl-stamp/openssl-build] Error 2
make[3]: *** [CMakeFiles/openssl.dir/all] Error 2
make[2]: *** [CMakeFiles/vfs.sftp.dir/rule] Error 2
make[1]: *** [vfs.sftp] Error 2
[ 0%] Performing build step for 'glm'
[ 50%] Building CXX object glm/CMakeFiles/glm_static.dir/detail/glm.cpp.o
clang: error: argument unused during compilation: '-msse2' [-Werror,-Wunused-command-line-argument]
make[7]: *** [glm/CMakeFiles/glm_static.dir/detail/glm.cpp.o] Error 1
make[6]: *** [glm/CMakeFiles/glm_static.dir/all] Error 2
make[5]: *** [all] Error 2
make[4]: *** [build/glm/src/glm-stamp/glm-build] Error 2
make[3]: *** [CMakeFiles/glm.dir/all] Error 2
make[2]: *** [CMakeFiles/visualization.fishbmc.dir/rule] Error 2
make[1]: *** [visualization.fishbmc] Error 2
[ 0%] Performing build step for 'glm'
[ 50%] Building CXX object glm/CMakeFiles/glm_static.dir/detail/glm.cpp.o
clang: error: argument unused during compilation: '-msse2' [-Werror,-Wunused-command-line-argument]
It does this for each of the visualisations, and then gives up.
(sse2 in aarch64? 😀 Something seems to have forgotten what it's compiling for...)
I tried just excluding those addons, using:
Code:
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons distclean
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="-vfs.sftp -visualization.*"
but that didn't work. It seemed to match those addons and then say they didn't exist:
Code:
[100%] Completed 'binary-addons'
[100%] Built target binary-addons
-- Exclusion list: vfs.sftp;visualization.*
-- Exact Match list:
-- Regex list:
-- Addon vfs.sftp matches exclusion rule -vfs.sftp
-- Addon visualization.fishbmc matches exclusion rule -visualization.*
-- Addon visualization.goom matches exclusion rule -visualization.*
-- Addon visualization.matrix matches exclusion rule -visualization.*
-- Addon visualization.milkdrop matches exclusion rule -visualization.*
-- Addon visualization.milkdrop2 matches exclusion rule -visualization.*
-- Addon visualization.pictureit matches exclusion rule -visualization.*
-- Addon visualization.projectm matches exclusion rule -visualization.*
-- Addon visualization.shadertoy matches exclusion rule -visualization.*
-- Addon visualization.spectrum matches exclusion rule -visualization.*
-- Addon visualization.starburst matches exclusion rule -visualization.*
-- Addon visualization.waveform matches exclusion rule -visualization.*
--
CMake Error at CMakeLists.txt:510 (message):
-vfs.sftp;-visualization.* did not match any of the supported addons. A
list of supported addons can be viewed by building the 'supported_addons'
target. Addon definitions are loaded from ADDONS_DEFINITION_DIR
(/Users/rachel/kodi/cmake/addons/addons).
So I tried just making the pvr ones using the example actually given, as it's just pvr.hts I actually want, but only building that yesterday didn't get me much joy:
Code:
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons distclean
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.*"
That build appeared to complete, so I went on to step 6...
You still need the APP_WINDOW_SYSTEM=native version of the initial command. I mention because the most recent commit to the branch looks like it makes that default, but... apparently not. So...
Code:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build GEN=Xcode APP_WINDOW_SYSTEM=native
then open the project in Xcode, and wait for it to finish indexing... I'm trying to avoid installing Rosetta on this system, but until and unless I find a way to stop it, Xcode prompts me to do so every time it starts up, so I have to be careful to say "not now". Not sure yet if that's going to be a showstopper for building aarch64 Kodi. 😀 If so, I guess I'm back to the make way...
Xcode build *says* it succeeds, but it does so instantly, showing a couple of warnings. There's nothing to run. Trying xcodebuild... It at least has the decency to look like it's trying, but it fails too.
make, which at least worked yesterday...
Code:
rm -rf $HOME/kodi-build/*
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build APP_WINDOW_SYSTEM=native
make -j$(getconf _NPROCESSORS_ONLN) -C $HOME/kodi-build
It's building something, which is encouraging at least...
It builds... It runs, neatly in its own space (that always bugged me before). Videos play. Minor bugs: I managed to get it confused about what it thought its window was by hitting a couple of keys - accidentally, I just want it to sit in its fullscreen space. Page up/down don't seem to be working. (I have full-size keyboard). Haven't tried on a notched screen yet. (Still using an external one, albeit a real one right now, not luna.)
The PVR addons are still missing. All of them, the whole PVR clients section is just missing. Other addons like skins I appear to be able to download and run, but it looks like the binary addons - those I selected anyway - just didn't make their way into the build. for the most part everything else is working. Some minor bugs but I think I'd want to get those pvr addons showing up first before worrying about the rest.