<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 25, 2017 at 11:39 AM, 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;line-break:after-white-space"><span class=""><br><div><br><blockquote type="cite"><div>On Sep 25, 2017, at 11:28, Jordan Rose <<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>> wrote:</div><br class="m_-3064431963655273611Apple-interchange-newline"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-3064431963655273611Apple-interchange-newline"><br><blockquote type="cite"><div>On Sep 24, 2017, at 19:32, Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>> wrote:</div><br class="m_-3064431963655273611Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Sat, Sep 23, 2017 at 5:02 AM, David P Grove<span class="m_-3064431963655273611Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:groved@us.ibm.com" target="_blank">groved@us.ibm.com</a>></span><span class="m_-3064431963655273611Apple-converted-space"> </span>wrot<wbr>e:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><p><font size="2">With autotools, the first time libdispatch was built (for SourceKit), it just did the C build of libdispatch. That had to be blown away and rebuilt a second time later (once swiftc, etc was available) so that we could build libdispatch.so with the Swift overlay built into it.</font><br><br><font size="2">Did you manage to change this so that the first time libdispatch is built it has a swiftc and Swift standard library it can use for its build?</font></p></div></blockquote><div><br></div><div>Yeah, that double configuration should not be needed. I'll make that dependency more explicit and clean up some of the usage in the SourceKit case. But, there is no reason to do two different builds here. The only bits needed to build dispatch AFAICT, is the swift core library and the swift compiler. Even if the swift overlay is required, we can add that build ordering. The dispatch overlay is constructed in libdispatch itself. So, we can just order the compiler build to occur prior to the libdispatch build, which needs to be built before SourceKit.</div><div><br></div><div>Thanks for making me take a second look and notice that the explicit dependency is missing.</div><div> </div></div></div></div></div></blockquote><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thanks for looking into this, but I feel like the problem has to be something simpler. A completely clean build does this:</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(77,47,45);background-color:rgb(223,219,195)"><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">libdispatch: using gold linker</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">+ /usr/bin/cmake --build /home/jrose/public/build/<wbr>Ninja-RelWithDebInfoAssert/<wbr>libdispatch-linux-x86_64 -- -j24 all</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">[1/1] cd /home/jrose/public/build/Ninj.<wbr>..s-libdispatch/private/<wbr>module.modulemap</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">foundation: using gold linker</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">+ pushd /home/jrose/public/swift-<wbr>corelibs-foundation</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">~/public/swift-corelibs-<wbr>foundation ~/public/swift</span></div><div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">+ env SWIFTC=/home/jrose/public/<wbr>build/Ninja-<wbr>RelWithDebInfoAssert/swift-<wbr>linux-x86_64/bin/swiftc CLANG=/home/jrose/public/<wbr>build/Ninja-<wbr>RelWithDebInfoAssert/llvm-<wbr>linux-x86_64/bin/clang SWIFT=/home/jrose/public/<wbr>build/Ninja-<wbr>RelWithDebInfoAssert/swift-<wbr>linux-x86_64/bin/swift SDKROOT=/home/jrose/public/<wbr>build/Ninja-<wbr>RelWithDebInfoAssert/swift-<wbr>linux-x86_64 BUILD_DIR=/home/jrose/public/<wbr>build/Ninja-<wbr>RelWithDebInfoAssert/<wbr>foundation-linux-x86_64 DSTROOT=/ PREFIX=/usr/ ./configure RelWithDebInfo -DXCTEST_BUILD_DIR=/home/<wbr>jrose/public/build/Ninja-<wbr>RelWithDebInfoAssert/xctest-<wbr>linux-x86_64 -DLIBDISPATCH_SOURCE_DIR=/<wbr>home/jrose/public/swift-<wbr>corelibs-libdispatch -DLIBDISPATCH_BUILD_DIR=/home/<wbr>jrose/public/build/Ninja-<wbr>RelWithDebInfoAssert/<wbr>libdispatch-linux-x86_64</span></div></div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">i.e. Dispatch isn't being built at all. This is on an Ubuntu 16.04 system with CMake 3.5.1. My build-script invocation isn't particularly complicated either, and doesn't seem different in any interesting way from what the buildbot is doing:</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span style="font-variant-ligatures:no-common-ligatures">utils/build-script -r -t --build-swift-static-stdlib --build-swift-dynamic-stdlib --libdispatch --foundation --xctest --skip-test-swift</span></div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Any ideas?</div></div></blockquote><br></div></span><div>Aha, passing --reconfigure seems to have made a difference. That implies to me that something is incorrectly detecting when CMake generation needs to happen.</div></div></blockquote><div><br></div><div>Interesting. Could it be something silly in `build-script-impl` perhaps? That is a pretty scary script. A quick `set -x` `set +x` around the configure logic should help see whats going on for the libdispatch build. I wonder if there is something with ordering?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><span class="HOEnZb"><font color="#888888"><div>Jordan</div><br></font></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>