Kodi Community Forum
OS X building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: OS X building Kodi build depends (master) creates m4 that will not run on macOS 10.13 (/showthread.php?tid=321791)



building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Hofi - 2017-09-20

Building the latest master with Xcode 8.3.3 and SDK 10.12 on macOS 10.13 creates an m4 in /Users/Shared/xbmc-depends/x86_64-darwin17.0.0-native/bin/m4 that will stop running with error

Illegal instruction: 4

f.e.during the build of Kodi build depends it will lead to

Code:
/Users/Shared/xbmc-depends/x86_64-darwin17.0.0-native/bin/m4 ./asm.m4 machine.m4 config.m4 aes-decrypt-internal.asm >aes-decrypt-internal.s
/bin/sh: line 1: 72710 Illegal instruction: 4  /Users/Shared/xbmc-depends/x86_64-darwin17.0.0-native/bin/m4 ./asm.m4 machine.m4 config.m4 aes-decrypt-internal.asm > aes-decrypt-internal.s
make[4]: *** [aes-decrypt-internal.o] Error 132
make[3]: *** [all] Error 2
make[2]: *** [macosx10.12_x86_64-target-debug/libnettle.a] Error 2
make[1]: *** [nettle] Error 2
make: *** [target/.installed-macosx10.12_x86_64-target-debug] Error 2

seems removing the built /Users/Shared/xbmc-depends/x86_64-darwin17.0.0-native/bin/m4 file and replacing it with a link to /usr/bin/m4 will solve the problem but it is just a workaround


building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Memphiz - 2017-09-21

This happens all the time on osx switch - can't remember what exactly it was but has to do with buildsystem detecting osx 10.13 while only older sdks are available in xcode ... zhere must be a commit from me somewhere around the time sierra was released which fixes native building with older sdks (it was tar-native which had the same issue at that time iirc).


RE: building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Hofi - 2017-09-21

i've tried to build with the latest (10.13) SDK and using Xcode9 too, but that fails immediately in ./configure unfortunately

./configure --host=x86_64-apple-darwin --with-sdk=10.13
checking build system type... x86_64-apple-darwin17.0.0
checking host system type... x86_64-apple-darwin
checking for x86_64-apple-darwin-g++... no
checking for x86_64-apple-darwin-c++... no
checking for x86_64-apple-darwin-gpp... no
checking for x86_64-apple-darwin-aCC... no
checking for x86_64-apple-darwin-CC... no
checking for x86_64-apple-darwin-cxx... no
checking for x86_64-apple-darwin-cc++... no
checking for x86_64-apple-darwin-cl.exe... no
checking for x86_64-apple-darwin-FCC... no
checking for x86_64-apple-darwin-KCC... no
checking for x86_64-apple-darwin-RCC... no
checking for x86_64-apple-darwin-xlC_r... no
checking for x86_64-apple-darwin-xlC... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for ccache... no
checking for curl... /opt/local/bin/curl
checking for tar... /usr/bin/tar
found xcodebuild at /xcode_9/Xcode.app/Contents/Developer/usr/bin/xcodebuild
checking for "arm"... auto is not "arm"
configure: error: error in configure of --with-sdk=10.13


RE: building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Hofi - 2017-09-21

...


RE: building Kodi build depends (master) creates m4 that will not run on macOS 10.13 - Rechi - 2017-09-21

Add
Code:
10.13);;
in the line after https://github.com/xbmc/xbmc/blob/c1d3bee/tools/depends/configure.ac#L324 to allow 10.13 sdk.
But this will most likely cause build issues as no one has tested sdk 10.13 yet.