<div dir="ltr">I think MSBuild isn't capable of re-running cmake and then reloading the project files when CMakeLists.txt changes. It re-runs cmake, but then continues the build with the stale projects. That probably explains the "PipSqueek.cxx doesn't exist" errors. As for the link error, it could also be caused by things like a file rename not getting picked up by MSBuild.<div><br></div><div>The fix is probably to always run cmake before MSBuild in the nightly job. This isn't necessary if you are using ninja or make, if those are options.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 16, 2018 at 12:59 PM via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_90267709430499065WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Here are a couple of representative errors.  C:\Dev\upstream\gitmono is where I keep my clone.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal">       "C:\Dev\upstream\gitmono\wbuild\ALL_BUILD.vcxproj" (Rebuild target) (1) -><u></u><u></u></p>
<p class="MsoNormal">       "C:\Dev\upstream\gitmono\wbuild\unittests\Support\DynamicLibrary\SecondLib.vcxproj" (default target) (170:2) -><u></u><u></u></p>
<p class="MsoNormal">         c1xx : fatal error C1083: Cannot open source file: 'C:\Dev\upstream\gitmono\llvm-project\llvm\unittests\Suppor<u></u><u></u></p>
<p class="MsoNormal">       t\DynamicLibrary\PipSqueak.cxx': No such file or directory [C:\Dev\upstream\gitmono\wbuild\unittests\Support\Dyn<u></u><u></u></p>
<p class="MsoNormal">       amicLibrary\SecondLib.vcxproj]<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">       "C:\Dev\upstream\gitmono\wbuild\ALL_BUILD.vcxproj" (Rebuild target) (1) -><u></u><u></u></p>
<p class="MsoNormal">       "C:\Dev\upstream\gitmono\wbuild\tools\llvm-mca\llvm-mca.vcxproj" (default target) (339:2) -><u></u><u></u></p>
<p class="MsoNormal">       (Link target) -><u></u><u></u></p>
<p class="MsoNormal">         Backend.obj : error LNK2019: unresolved external symbol "public: virtual bool __cdecl mca::FetchStage::isReady<u></u><u></u></p>
<p class="MsoNormal">       (void)const " (?isReady@FetchStage@mca@@UEBA_NXZ) referenced in function "public: void __cdecl mca::Backend::run<u></u><u></u></p>
<p class="MsoNormal">       (void)" (?run@Backend@mca@@QEAAXXZ) [C:\Dev\upstream\gitmono\wbuild\tools\llvm-mca\llvm-mca.vcxproj]<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="m_90267709430499065__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Valentin Churavy [mailto:<a href="mailto:v.churavy@gmail.com" target="_blank">v.churavy@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, May 16, 2018 1:54 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm-dev] Windows build strangeness<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What kind of missing symbols are you getting? <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I had to work around dependencies for a Mingw32 build. See
<a href="https://reviews.llvm.org/D44650" target="_blank">https://reviews.llvm.org/D44650</a><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, May 16, 2018, 13:13 via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">I have the git monorepo, and Visual Studio 2015.  I am finding that<br>
running a build from the command line with msbuild (as a nightly job)<br>
invariably fails on the first try, and succeeds on a retry.<br>
<br>
The first msbuild command looks like this:<br>
<br>
msbuild ALL_BUILD.vcxproj /p:Configuration="RelWithDebInfo" /m:6 /t:Rebuild<br>
<br>
This appears to compile everything okay, but invariably fails with<br>
some set of link-time errors, reporting missing symbols.  Then I run <br>
msbuild again, but without the /t:Rebuild (thus it's a dirty build the <br>
second time) and this succeeds.<br>
<br>
Is there some inadequacy in the CMake dependencies somewhere, so that<br>
some links are trying to happen before the libraries are completely<br>
finished?  Or just an msbuild issue?<br>
<br>
I made my nightly script check for errors and run the second round,<br>
because it has been happening so consistently, but a proper build<br>
system shouldn't require such a workaround.<br>
<br>
For reference, I generated the sln/project files like this:<br>
<br>
cmake -G "Visual Studio 14 Win64" -Thost=x64 ^<br>
  -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_OPTIMIZED_TABLEGEN=ON ^<br>
  -DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" ^<br>
  ..\llvm-project\llvm<br>
<br>
(Yes I know the optimized tablegen comes from a separate tree,<br>
that's built separately and always works.  It's just the main<br>
build that fails.)<br>
<br>
Thanks,<br>
--paulr<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>