<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cmake build system fails on Leopard due to preference of macosx.internal SDK in compiler-rt"
href="https://llvm.org/bugs/show_bug.cgi?id=25677">25677</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cmake build system fails on Leopard due to preference of macosx.internal SDK in compiler-rt
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jeremyhu@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Leopard's final Xcode version (3.1.4) has a bug whereby executing 'xcodebuild
-version -sdk macosx.internal' will spin. This is done as part of the
cmake-based build system which prevents the build from happening:
$ pstree -w 00479
-+- 00479 macports sh -c cd
"/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/build"
&& /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/local
-DCMAKE_OSX_ARCHITECTURES="x86_64;i386" -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib
-DCMAKE_INSTALL_NAME_DIR=/opt/local/lib
-DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr"
-DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST
-Wno-dev -DLLVM_BUILD_LLVM_DYLIB=ON
-DCMAKE_INSTALL_PREFIX="/opt/local/libexec/llvm-3.8" -DLLVM_ENABLE_RTTI=ON
-DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON
-DFFI_INCLUDE_DIR=/opt/local/include -DFFI_LIBRARY_DIR=/opt/local/lib
-DCLANG_INCLUDE_TESTS=OFF -DLLVM_BUILD_RUNTIME=ON -DLIBCXX_INSTALL_LIBRARY=OFF
-DLIBCXX_ENABLE_SHARED=OFF -DLLVM_ENABLE_BACKTRACES=OFF
-DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_ENABLE_STATIC_ANALYZER=ON
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG"
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.5" -DCMAKE_OSX_SYSROOT="/" ../trunk
\-+- 00485 macports /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/local
-DCMAKE_OSX_ARCHITECTURES=x86_64;i386 -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib
-DCMAKE_INSTALL_NAME_DIR=/opt/local/lib
-DCMAKE_SYSTEM_PREFIX_PATH=/opt/local;/usr
-DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST
-Wno-dev -DLLVM_BUILD_LLVM_DYLIB=ON
-DCMAKE_INSTALL_PREFIX=/opt/local/libexec/llvm-3.8 -DLLVM_ENABLE_RTTI=ON
-DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON
-DFFI_INCLUDE_DIR=/opt/local/include -DFFI_LIBRARY_DIR=/opt/local/lib
-DCLANG_INCLUDE_TESTS=OFF -DLLVM_BUILD_RUNTIME=ON -DLIBCXX_INSTALL_LIBRARY=OFF
-DLIBCXX_ENABLE_SHARED=OFF -DLLVM_ENABLE_BACKTRACES=OFF
-DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_ENABLE_STATIC_ANALYZER=ON
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 -DCMAKE_OSX_SYSROOT=/ ../trunk
\--- 00524 macports /Developer/usr/bin/xcodebuild -version -sdk
macosx.internal Path
This seems to be coming from
projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake:
function(find_darwin_sdk_dir var sdk_name)
# Let's first try the internal SDK, otherwise use the public SDK.
execute_process(
COMMAND xcodebuild -version -sdk ${sdk_name}.internal Path
OUTPUT_VARIABLE var_internal
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_FILE /dev/null
)
if("" STREQUAL "${var_internal}")
execute_process(
COMMAND xcodebuild -version -sdk ${sdk_name} Path
OUTPUT_VARIABLE var_internal
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_FILE /dev/null
)
endif()
set(${var} ${var_internal} PARENT_SCOPE)
endfunction()
It would be good to conditionalize that to only execute on Snow Leopard and
later.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>