Mac OS X - building Kodi build depends (master) creates m4 that will not run on macOS 10.13

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hofi Offline
Junior Member
Posts: 21
Joined: May 2015
Reputation: 0
Location: Budapest
Post: #1
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

/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
(This post was last modified: 2017-09-20 21:28 by Klojum.)
find quote
Memphiz Offline
Kodi MVP
Posts: 16,188
Joined: Feb 2011
Reputation: 230
Location: germany
Post: #2
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).

AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
find quote
Hofi Offline
Junior Member
Posts: 21
Joined: May 2015
Reputation: 0
Location: Budapest
Post: #3
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/
checking for "arm"... auto is not "arm"
configure: error: error in configure of --with-sdk=10.13
find quote
Hofi Offline
Junior Member
Posts: 21
Joined: May 2015
Reputation: 0
Location: Budapest
Post: #4
(This post was last modified: Yesterday 09:34 by Hofi.)
find quote
Rechi Offline
Team-Kodi Member
Posts: 345
Joined: Feb 2015
Reputation: 4
Location: Austria
Post: #5
in the line after to allow 10.13 sdk.
But this will most likely cause build issues as no one has tested sdk 10.13 yet.
find quote