SOLVED - VLC compile on mac can't find MacOSX.sdk

macOS specific usage questions
EP99
Blank Cone
Blank Cone
Posts: 38
Joined: 05 Feb 2020 23:19

SOLVED - VLC compile on mac can't find MacOSX.sdk

Postby EP99 » 05 Feb 2020 23:45

Update to subject and description for more clarity.

Following the VLC macOSCompile wiki page. Using the single command build instructions. I'm running 10.14.6 with Xcode 11.3.1 commandline tools, developer signed, etc.

Important note -- my MacOSX.sdk file is located here: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

All is good through build to create makefile, completes bootstrap and runs make. Then I get the errors shown below -- how do I point VLC to the location where my MacOSX.sdk file is located?

IOW how do I set vlc's "contrib environment" to point to the correct MacOSX.sdk location?

Do I need to edit something in the vlc source? Thanks.

Note -- Developer files are in fact here:

Code: Select all

xcode-select --print-path /Applications/Xcode.app/Contents/Developer
When starting the build all goes well -- HOWEVER note where contrib points for my MacOSX.sdk - it's incorrect:

Code: Select all

XYZ:build $ ../extras/package/macosx/build.sh -c [build] Building VLC for the Mac OS X Setting base environment Using VLC root dir /Users/EP99/temp/VLC/vlc and triplet x86_64-apple-darwin18 [build] Checking for python3 ... Python 3.8.1 [build] Building in "/Users/EP99/temp/VLC/vlc/build" [build] Building building tools You are ready to build VLC and its contribs Setting symbol environment Setting contrib environment with minimum macOS version 10.11 and SDK /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
All works well until here -- errors:

Code: Select all

make: Nothing to be done for `fetch'. make: `.gettext' is up to date. # Framework cd breakpad/src/client/mac/ && xcodebuild MACOSX_DEPLOYMENT_TARGET=10.11 -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk WARNING_CFLAGS=-Werror=partial-availability OTHER_CFLAGS=-fno-stack-check -arch x86_64 CLANG_CXX_LIBRARY=libc++ # Build Sparkle and change the @rpath cd sparkle && xcodebuild MACOSX_DEPLOYMENT_TARGET=10.11 -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk WARNING_CFLAGS=-Werror=partial-availability OTHER_CFLAGS=-fno-stack-check -arch x86_64 xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located. xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located. make: *** [.sparkle] Error 64 make: *** [.breakpad] Error 64 make: Target `all' not remade because of errors. # Framework cd breakpad/src/client/mac/ && xcodebuild MACOSX_DEPLOYMENT_TARGET=10.11 -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk WARNING_CFLAGS=-Werror=partial-availability OTHER_CFLAGS=-fno-stack-check -arch x86_64 CLANG_CXX_LIBRARY=libc++ xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located. make: *** [.breakpad] Error 64
Last edited by EP99 on 06 Feb 2020 21:37, edited 2 times in total.

EP99
Blank Cone
Blank Cone
Posts: 38
Joined: 05 Feb 2020 23:19

Re: xcode build error - "MacOSX.sdk cannot be located" -- but is there

Postby EP99 » 06 Feb 2020 19:23

Bump -- any thoughts as I'm inches from having this compiled but can't figure out how to point to the correct MacOSX.sdk.

EP99
Blank Cone
Blank Cone
Posts: 38
Joined: 05 Feb 2020 23:19

Re: SOLVED - VLC compile on mac can't find MacOSX.sdk

Postby EP99 » 06 Feb 2020 21:42

I was able to solve this thanks to my colleague who posted to stackoverflow and the generous expert who replied.

I needed to issue a -k switch on the build command that will tell it where to find my MacOSX.sdk -- and I gave it my most current version. The command I issued was this:

../extras/package/macosx/build.sh -c -k /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk

You can find information on all the switches for build.h in the comments for that file.

The post to the solution is here:

https://stackoverflow.com/questions/60101588/vlc-compile-on-mac-cant-find-macosx-sdk

Thank you to my colleague for posting there and thank you to the community for the help -- I now have a self-compiled VLC running on my mac. Most thanks.

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: SOLVED - VLC compile on mac can't find MacOSX.sdk

Postby dfuhrmann » 10 Feb 2020 21:06

The macOS tooling sometime weirdly mixes command line tools packages and Xcode packages.

Our proposal is to uninstall CommandLine tools, and only use Xcode included tools - in case you do not desperately need the command line tools for something different.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 56 guests