<div dir="ltr">Somehow a garbage value ended up in my .git/config, but only for clang. It somehow added<div><br></div><div><div><span class="" style="white-space:pre"> </span>fetch = :refs/remotes/git-svn</div></div><div><br></div><div>to my svn remote config. Deleting that seems to have resolved the problem.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 20, 2014 at 5:03 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>This sounds like what happens when you run git svn but don't actually have any svn remotes. Do you have a git folder without svn remotes? Do you still have a .git/svn?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jordan</div></font></span><div><div class="h5"><div><br></div><br><div><blockquote type="cite"><div>On Nov 20, 2014, at 16:41, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:</div><br><div><div dir="ltr">When I bulid on Ubuntu right now, ninja deadlocks while building clang.<div><br></div><div>I'm on Ubuntu 14.04 and I'm generating CMake as follows:</div><div><br></div><div>cmake -G Ninja -DCMAKE_CXX_COMPILER=clang -DCMAKE_C_COMPILER=clang -DCMAKE_SHARED_LINKER_FLAGS="-lstdc++ -lm" -DCMAKE_EXE_LINKER_FLAGS="-lstdc++ -lm" -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/../../install -DCMAKE_BUILD_TYPE=Debug -Wno-dev ../..<br></div><div><br></div><div>When I run ninja with -v, it gets to Linking libClangStaticAnalyzerFrontend.a, and then it just hangs.</div><div><br></div><div>If I Ctrl+C and then re-run ninja with -v, I see the following:</div><div><br></div><div>[1/51] cd ~/ssd/src/llvm/build/ninja/tools/clang/lib/Basic && /usr/bin/cmake -DFIRST_SOURCE_DIR=~/ssd/src/llvm -DFIRST_NAME=LLVM -DSECOND_SOURCE_DIR=~/ssd/src/llvm/tools/clang -DSECOND_NAME=SVN -DHEADER_FILE=~/src/llvm/build/ninja/tools/clang/lib/Basic/SVNVersion.inc -P ~/ssd/src/llvm/cmake/modules/GetSVN.cmake<br></div><div><br></div><div>ps aux | grep cmake shows the following:</div><div><br></div><div><div>zturner 28671 0.0 0.0 24448 1212 pts/2 S 16:38 0:00 /bin/sh -c cd ~/src/llvm/build/ninja/tools/clang/lib/Basic && /usr/bin/cmake -DFIRST_SOURCE_DIR=~/ssd/src/llvm -DFIRST_NAME=LLVM -DSECOND_SOURCE_DIR=~/ssd/src/llvm/tools/clang -DSECOND_NAME=SVN -DHEADER_FILE=~/ssd/src/llvm/build/ninja/tools/clang/lib/Basic/SVNVersion.inc -P ~/ssd/src/llvm/cmake/modules/GetSVN.cmake</div><div><br></div><div>zturner 28673 0.5 0.0 115752 5828 pts/2 S 16:38 0:00 /usr/bin/cmake -DFIRST_SOURCE_DIR=~/ssd/src/llvm -DFIRST_NAME=LLVM -DSECOND_SOURCE_DIR=~/ssd/src/llvm/tools/clang -DSECOND_NAME=SVN -DHEADER_FILE=~/ssd/src/llvm/build/ninja/tools/clang/lib/Basic/SVNVersion.inc -P ~/ssd/src/llvm/cmake/modules/GetSVN.cmake</div></div><div><br></div><div>Let me know if you need more information or if you have any suggestions.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 5:28 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Yup, just found that described online. .svn/entries seems to be the 1.6 version, .svn/wc.db the 1.7 one. As long as wc.db shows up first in the search, we should be good.</div><span><font color="#888888"><div><br></div><div>Jordan</div></font></span><div><div><div><br></div><br><div><blockquote type="cite"><div>On Nov 19, 2014, at 17:27, Nico Weber <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:</div><br><div><div dir="ltr">.svn/wc.db seems to get updated on each `svn up` though. This is with "svn, version 1.7.17 (r1591372)" (which I think is the svn bundled with Xcode 6.1).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 5:25 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Shoot! And you actually got new revisions? Okay, will poke at this some more tonight.</div><span><font color="#888888"><div><br></div><div>Jordan</div></font></span><div><div><div><br></div><br><div><blockquote type="cite"><div>On Nov 19, 2014, at 17:24, Nico Weber <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:</div><br><div><div dir="ltr">Nice!<div><br></div><div>But .svn/entries doesn't seem to be touched when I `svn up` my llvm checkout.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 2:03 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jrose<br>
Date: Wed Nov 19 16:03:48 2014<br>
New Revision: 222393<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222393&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=222393&view=rev</a><br>
Log:<br>
[CMake] Always include the Clang repo version, just like the autoconf build.<br>
<br>
Now that LLVM's helper script GetSVN.cmake actually works consistently,<br>
there's no reason not to use it. We avoid having to regenerate SVNVersion.inc<br>
every time by marking it as dependent on Git's reflog or SVN's entries file.<br>
<br>
This should end most of the issues of the AST format changing and breaking<br>
old module files: CMake-Clang should now detect that the version changed just<br>
like Autoconf-Clang has.<br>
<br>
Based on r190557. Depends on LLVM r222391.<br>
<br>
Modified:<br>
cfe/trunk/lib/Basic/CMakeLists.txt<br>
<br>
Modified: cfe/trunk/lib/Basic/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=222393&r1=222392&r2=222393&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=222393&r1=222392&r2=222393&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Basic/CMakeLists.txt (original)<br>
+++ cfe/trunk/lib/Basic/CMakeLists.txt Wed Nov 19 16:03:48 2014<br>
@@ -4,6 +4,48 @@ set(LLVM_LINK_COMPONENTS<br>
Support<br>
)<br>
<br>
+# Figure out if we can track VC revisions.<br>
+function(find_first_existing_file out_var)<br>
+ foreach(file ${ARGN})<br>
+ if(EXISTS "${file}")<br>
+ set(${out_var} "${file}" PARENT_SCOPE)<br>
+ return()<br>
+ endif()<br>
+ endforeach()<br>
+endfunction()<br>
+<br>
+find_first_existing_file(llvm_vc<br>
+ "${LLVM_MAIN_SRC_DIR}/.git/logs/HEAD"<br>
+ "${LLVM_MAIN_SRC_DIR}/.svn/entries")<br>
+find_first_existing_file(clang_vc<br>
+ "${CLANG_SOURCE_DIR}/.git/logs/HEAD"<br>
+ "${CLANG_SOURCE_DIR}/.svn/entries")<br>
+<br>
+if(DEFINED llvm_vc AND DEFINED clang_vc)<br>
+ # Create custom target to generate the VC revision include.<br>
+ add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc"<br>
+ DEPENDS "${llvm_vc}" "${clang_vc}"<br>
+ COMMAND<br>
+ ${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR}"<br>
+ "-DFIRST_NAME=LLVM"<br>
+ "-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR}"<br>
+ "-DSECOND_NAME=SVN"<br>
+ "-DHEADER_FILE=${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc"<br>
+ -P "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")<br>
+<br>
+ # Mark the generated header as being generated.<br>
+ set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc"<br>
+ PROPERTIES GENERATED TRUE<br>
+ HEADER_FILE_ONLY TRUE)<br>
+<br>
+ # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.<br>
+ set_source_files_properties(Version.cpp<br>
+ PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")<br>
+ set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc")<br>
+else()<br>
+ set(version_inc)<br>
+endif()<br>
+<br>
add_clang_library(clangBasic<br>
Attributes.cpp<br>
Builtins.cpp<br>
@@ -29,30 +71,6 @@ add_clang_library(clangBasic<br>
VersionTuple.cpp<br>
VirtualFileSystem.cpp<br>
Warnings.cpp<br>
+ ${version_inc}<br>
)<br>
<br>
-# Determine Subversion revision.<br>
-# FIXME: This only gets updated when CMake is run, so this revision number<br>
-# may be out-of-date!<br>
-if( NOT IS_SYMLINK "${CLANG_SOURCE_DIR}" ) # See PR 8437<br>
- find_package(Subversion)<br>
-endif()<br>
-if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn")<br>
- set(FIRST_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})<br>
- set(FIRST_REPOSITORY LLVM_REPOSITORY)<br>
- set(SECOND_SOURCE_DIR ${CLANG_SOURCE_DIR})<br>
- set(SECOND_REPOSITORY SVN_REPOSITORY)<br>
- set(HEADER_FILE ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)<br>
- include(GetSVN)<br>
-<br>
- # Mark the generated header as being generated.<br>
- message(STATUS "Expecting header to go in ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc")<br>
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc<br>
- PROPERTIES GENERATED TRUE<br>
- HEADER_FILE_ONLY TRUE)<br>
-<br>
- # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.<br>
- set_source_files_properties(Version.cpp<br>
- PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")<br>
-<br>
-endif()<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div>