Error when building LiveCode from source: SDK not found?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Tue Jan 24, 2017 2:52 am

I'm trying to build LiveCode from source, and all the dependencies are checked, etc. until I get this error:

Code: Select all

PhaseScriptExecution Rule\ \"flex\" /Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/lc-bootstrap-compile\ Support.build/Script-C38A0E66FFB8AE0CEAA59024.sh
    cd /Users/ghostpotato/Documents/Coding/LiveCode/livecode/toolchain/lc-compile/src
    /bin/sh -c \"/Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/lc-bootstrap-compile\ Support.build/Script-C38A0E66FFB8AE0CEAA59024.sh\"
xcodebuild: error: SDK "/Users/ghostpotato/Documents/Coding/LiveCode/livecode/macosx10.9" cannot be located.
xcrun: error: unable to find utility "make", not a developer tool or in PATH
Command /bin/sh failed with exit code 72

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution Rule\ \"flex\" /Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/lc-bootstrap-compile\ Support.build/Script-C38A0E66FFB8AE0CEAA59024.sh
(1 failure)
make[1]: *** [compile-mac] Error 65
make: *** [all-mac] Error 2
I have the SDK folder, named "macosx10.9", in the same folder as the source. Is this a known bug, and is there a way to fix this?

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 12:51 pm

I think you have to copy (or symlink) the MacOSX10.9.sdk folder into the Xcode app bundle:

The location where LC expects to find this folder is:

Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Tue Jan 24, 2017 3:40 pm

That throws this when running "make" again:

Code: Select all

2017-01-24 06:39:01.058 xcodebuild[1910:24447] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk; its version (10.9) is below required minimum (10.11) for the macosx platform.
gyp: Call to 'git rev-parse HEAD' returned exit status 0 while in livecode.gyp.
make[1]: *** [config-mac] Error 1
make: *** [all-mac] Error 2

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 5:00 pm

Hmm that's strange. This is what has worked for me:

1. Checkout "develop" branch and pull the most recent changes (and do a "git submodule update")
2. in the terminal type "make config-mac"
3. This will create a folder livecode/build-mac
4. Open livecode/build-mac/livecode/livecode.xcodeproj with Xcode
5. Choose "Automatically create schemes"
6. In the "Set the active Scheme" dropdown, select "LiveCode-all" and "My Mac (32 bit)"
7. Click on the "Build and run" button. This will build all the dependencies.
8. Now select "Development" in the "Set the active Scheme" dropdown.
9.Click the "Build and run" button. This should finally launch the IDE.

I hope this helps :)

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Tue Jan 24, 2017 5:09 pm

This pretty much gives me my original error, but in Xcode instead of the command line:

Code: Select all

PhaseScriptExecution Rule\ \"flex\" /Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/lc-bootstrap-compile\ Support.build/Script-C38A0E66FFB8AE0CEAA59024.sh
    cd /Users/ghostpotato/Documents/Coding/LiveCode/livecode/toolchain/lc-compile/src
    /bin/sh -c \"/Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/lc-bootstrap-compile\ Support.build/Script-C38A0E66FFB8AE0CEAA59024.sh\"

2017-01-24 08:07:28.156 xcodebuild[5299:58464] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk; its version (10.9) is below required minimum (10.11) for the macosx platform.
xcodebuild: error: SDK "/Users/ghostpotato/Documents/Coding/LiveCode/livecode/macosx10.9" cannot be located.
xcrun: error: unable to find utility "make", not a developer tool or in PATH
Command /bin/sh failed with exit code 72

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 5:42 pm

Which version of Xcode are you using?

Maybe it is worth trying a clean build:

1. Delete the folder livecode/build-mac
2. Delete the folder livecode/_build/mac
3. Delete the folder livecode/_cache/mac
4. Make sure there is a folder Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/

Now repeat the steps 1-9 described in previous comment.

I am using Xcode 8.1, and have tried to remove Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ folder. Then, if I do steps 1-9 I get the following error in Xcode:

Code: Select all

error: There is no SDK with the name or path '/Users/panos/Desktop/github/livecode/macosx10.9'
The error disappears if I do steps 1-4 of this comment and then 1-9 of the previous one.

I hope this helps :)

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 5:44 pm

I forgot to add:

step 0: quit Xcode

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 5:53 pm

One more thing:

Between steps 6 and 7, do this one:

- In Xcode top menubar, choose "Product -> Clean"

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Tue Jan 24, 2017 7:05 pm

Then I get:

Code: Select all

'QuickTime/QuickTime.h' file not found

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Tue Jan 24, 2017 7:41 pm

Where and when do you get that error? Up to which step did you have success? Are you building from "develop" branch? Which version of Xcode are you using?

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Tue Jan 24, 2017 9:37 pm

I get that error when trying to build with Xcode.
I had success from the command line up until it complained about a missing SDK after checking dependencies and downloading OpenSSL and such.
I'm building from https : / / github . com / livecode / livecode
(I have to add the spaces or it says I can't post links :P)
I'm using Xcode Version 8.2.1 (8C1002).

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Wed Jan 25, 2017 12:35 pm

I tried on a different machine with Xcode 8.2. I got the error "

Code: Select all

error: There is no SDK with the name or path '/Users/panos/Desktop/github/livecode/macosx10.9
'"

I tried the steps 1-4 and then 1-9 but still got the same error.

The error disappeared once I run the script

Code: Select all

livecode/tools/setup_xcode_sdks.sh
, as described here:

https://github.com/livecode/livecode/bl ... ild-mac.md

Note that in my case I had Xcode_8_2_0 instead of Xcode_8_0_0, as described in the instructions. So once I run this script, I did again steps 1-4 and 1-9 and I was able to build successfully from Xcode 8.2.

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Thu Jan 26, 2017 1:12 am

OK, this seems to have made it better. Now it's a problem with the LiveCode source, not me. :P

Code: Select all

The following build commands failed:
	CompileC /Users/ghostpotato/Documents/Coding/LiveCode/livecode/_cache/mac/Debug/kernel.build/Objects-normal/i386/quicktime.o src/quicktime.cpp normal i386 c++ com . apple . compilers . llvm . clang . 1_0 . compiler
(1 failure)
make[1]: *** [compile-mac] Error 65
make: *** [all-mac] Error 2
That file, "quicktime.o", doesn't exist and there is no "src" folder in the GitHub source...
NOTE: For this chunk: "com . apple . compilers . llvm . clang . 1_0 . compiler" remove spaces; the forums think it's a URL.

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Error when building LiveCode from source: SDK not found?

Post by LiveCode_Panos » Fri Jan 27, 2017 1:12 pm

What do you get if you type in the Terminal:

Code: Select all

cd /Users/ghostpotato/Documents/Coding/LiveCode/livecode
and then

Code: Select all

git status
?

ghostpotato
Posts: 7
Joined: Tue Jan 24, 2017 2:48 am

Re: Error when building LiveCode from source: SDK not found?

Post by ghostpotato » Fri Jan 27, 2017 5:09 pm

Here's my result:

Code: Select all

On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   config.sh
	modified:   gyp/AUTHORS
	modified:   gyp/DEPS
	modified:   gyp/PRESUBMIT.py
	modified:   gyp/gyp.bat
	modified:   gyp/gyp_main.py
	modified:   gyp/gyptest.py
	modified:   gyp/pylib/gyp/MSVSSettings.py
	modified:   gyp/pylib/gyp/MSVSSettings_test.py
	modified:   gyp/pylib/gyp/MSVSUtil.py
	modified:   gyp/pylib/gyp/MSVSVersion.py
	modified:   gyp/pylib/gyp/__init__.py
	modified:   gyp/pylib/gyp/common.py
	modified:   gyp/pylib/gyp/generator/analyzer.py
	deleted:    gyp/pylib/gyp/generator/android.py
	modified:   gyp/pylib/gyp/generator/cmake.py
	modified:   gyp/pylib/gyp/generator/dump_dependency_json.py
	modified:   gyp/pylib/gyp/generator/make.py
	modified:   gyp/pylib/gyp/generator/msvs.py
	modified:   gyp/pylib/gyp/generator/ninja.py
	modified:   gyp/pylib/gyp/generator/xcode.py
	modified:   gyp/pylib/gyp/input.py
	modified:   gyp/pylib/gyp/mac_tool.py
	modified:   gyp/pylib/gyp/msvs_emulation.py
	modified:   gyp/pylib/gyp/win_tool.py
	modified:   gyp/pylib/gyp/xcode_emulation.py
	modified:   gyp/pylib/gyp/xcode_ninja.py
	modified:   gyp/pylib/gyp/xcodeproj_file.py
	modified:   gyp/tools/pretty_gyp.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	MacOSX10.9.sdk/
	gyp/.gitignore
	gyp/README.md
	gyp/buildbot/
	gyp/samples/
	gyp/test/
	macosx10.12/
	macosx10.9/

no changes added to commit (use "git add" and/or "git commit -a")

Post Reply

Return to “Mac OS”