gpt4 book ai didi

macos - VLC 在 mac 上编译找不到 MacOSX.sdk

转载 作者:行者123 更新时间:2023-12-04 10:37:21 30 4
gpt4 key购买 nike

遵循 VLC macOS 编译维基页面。使用单个命令构建指令。我正在使用 Xcode 11.3.1 命令行工具运行 10.14.6,开发人员签名等。

重要说明——我的 MacOSX.sdk 文件位于此处:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

通过构建创建makefile,完成 bootstrap 并运行make,一切都很好。然后我收到以下错误——如何将 VLC 指向我的 MacOSX.sdk 文件所在的位置?

IOW 如何设置 vlc 的“contrib 环境”?

请注意在下面的代码片段中,contrib 将 MacOSX.sdk 文件指针设置为错误的位置 - 我该如何修复?

我需要在 vlc 源代码中编辑一些东西吗?谢谢。错误:

Setting base environment
Using VLC root dir /Users/GR99/temp/VLC/vlc and triplet x86_64-apple-darwin18
[build] Checking for python3 ...
Python 3.8.1
[build] Building in "/Users/GR99/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
[build] Building contribs
Packages licensing... GPL version 3
Creating makefile...
Bootstrap completed.
Run "make" to start compilation.

....

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

最佳答案

cf: ../extras/package/macosx/build.sh -h它说:

usage: extras/package/macosx/build.sh [options]

Build vlc in the current directory

OPTIONS:
-h Show some help
-q Be quiet
-j Force number of cores to be used
-r Rebuild everything (tools, contribs, vlc)
-c Recompile contribs from sources
-p Build packages for all artifacts
-i <n|u> Create an installable package (n: nightly, u: unsigned stripped release archive)
-k <sdk> Use the specified sdk (default: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk)
-a <arch> Use the specified arch (default: x86_64)
-C Use the specified VLC build dir
-b <url> Enable breakpad support and send crash reports to this URL
-d Disable debug mode (on by default)

您的构建命令还应使用 -k 选项包含您的 SDK 的位置:
../extras/package/macosx/build.sh -c -k /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
script 使用 xcrun --show-sdk-path 来设置 SDK。 xcrun 使用环境变量 $SDKROOT。

注意:您可能想要安装和使用版本化的 SDK,例如在您的问题中,输出显示它的目标是最小的 El Capitan, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk版本化 SDK 在旧 Xcode 和 github 中可用。

设置“contrib 环境”全部由“单个命令”处理。

关于macos - VLC 在 mac 上编译找不到 MacOSX.sdk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60101588/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com