xcodebuild error but files are there

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

xcodebuild error but files are there

Postby EP99 » 14 Mar 2020 16:49

I previously did a successful build of vlc 4.0-dev on a mac but now need to build the stable 3.0.8 version so I'm compatible with a project we're building on another platform.

Am 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

I'm issuing the following command

Code: Select all

../extras/package/macosx/build.sh -c -k /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
And it returns this error:

Code: Select all

xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located. xcrun: error: unable to lookup item 'SDKVersion' in SDK '/'
*However* the files *are* there:

Code: Select all

pwd /Library/Developer/CommandLineTools/SDKs ls -la total 0 drwxr-xr-x 4 root wheel 128 Jul 23 2019 . drwxr-xr-x 6 root admin 192 Jan 31 2019 .. drwxr-xr-x 7 root wheel 224 Jul 23 2019 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Jul 23 2019 MacOSX10.14.sdk -> MacOSX.sdk
What am I doing wrong and how can I fix this?

One additional difference -- I brought down the 3.0.8 sources as a tar.gz file and expanded that way -- when I did the 4.0-dev build I fetched those using git -- however -- when we successfully built 3.0.8 on a Linux box, we grabbed the tar files as well and that worked.

Thanks for any help in advance. E

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

Re: xcodebuild error but files are there

Postby dfuhrmann » 15 Mar 2020 23:40

Our recommendation: uninstall command line tools if possible, as VLC can compile fine with Xcode only.

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

Re: xcodebuild error but files are there

Postby EP99 » 16 Mar 2020 22:52

@dfuhrmann Thank you -- is there some reason that the build.sh from the 4.0-dev build can't be used?

build.sh for 3.0.8 has a few differences that sets SDKROOT, etc., and sets XCODE_FLAGS that throw a -sdk switch -- this may be causing the issue.

It's generally not practical to install / uninstall command line tools to compile VLC.

Please advise -- thanks in advance.

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

Re: xcodebuild error but files are there

Postby dfuhrmann » 21 Mar 2020 20:33

This issue is - from my current knowledge - caused by some hickups in the apple tools. They should not report an invalid sdk in CommandLine tools.
Please report and complain to apple if this annoys you too much.

I believe there is no real difference here in build.sh between 3.0 and 4.0. We factored out some things into a separate helper file (env.build.sh), but this file also sets SDKROOT and XCODE_FLAGS as before. But if you spot a potential difference or find any other fix - patch is welcome.

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

FIX & INFO - Re: xcodebuild error but files are there

Postby EP99 » 26 May 2020 22:47

@dfuhrmann Thank you -- I took your suggestion and used the build.sh script from the 4.0-dev distro to build the most recent 3.0.10 for mac.

It ran without incident and VLC.app runs and appears to run our test file correctly.

Please relay if there are any differences between build.sh for 4.0-dev and 3.0.10 that we should be aware of.

Sorry for the delay in responding but thank you for your suggestion. EP


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 67 guests