<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 4, 2015 at 1:36 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel_dunbar@apple.com" target="_blank">daniel_dunbar@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Lane,<div><br></div><div>You shouldn't need to install re2c to build Ninja.</div><div><br></div><div>This looks like something is wrong in the build script. It did successfully build Ninja, but it isn't getting found by CMake for the mark build.</div><div><br></div><div>Can you open an SR for this on <a href="http://bugs.swift.org" target="_blank">bugs.swift.org</a>?</div><div><br></div><div>If you want to debug yourself, it looks like the PATH export at utils/build-script-impl:1287 isn't working, it should have let ninja be found for the rest of the commands.</div><div><br></div><div> - Daniel</div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Dec 4, 2015, at 11:22 AM, Lane Schwartz <<a href="mailto:dowobeha@gmail.com" target="_blank">dowobeha@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">Hi,<br><br>First of all, congratulations on the open source release! I'm very excited!<br><br>Second, I'm running into trouble building from source, particularly in regards to getting ninja bootstrapped. I'm on Scientific Linux. I first used yum to install packages for llvm, llvm-devel, clang, and cmake.<br><br>I then did the following, following the README.md in the swift git repo: <br><br> git clone git@github.com:apple/swift.git swift<br> git clone git@github.com:apple/swift-llvm.git llvm<br> git clone git@github.com:apple/swift-clang.git clang<br> git clone git@github.com:apple/swift-lldb.git lldb<br> git clone git@github.com:apple/swift-cmark.git cmark<br> git clone git@github.com:apple/swift-llbuild.git llbuild<br> git clone git@github.com:apple/swift-package-manager.git swiftpm<br> git clone git@github.com:apple/swift-corelibs-xctest.git<br> git clone git@github.com:apple/swift-corelibs-foundation.git<br><br><div><br></div><div>The README.md also states:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Ninja is the current recommended build system for building Swift and is the default configuration generated by CMake. If you're on OS X or don't install it as part of your Linux distribution, clone it next to the other projects and it will be bootstrapped automatically</blockquote><div><br></div><div> My Linux distro doesn't package ninja, so I also did this:</div><br>git clone git@github.com:martine/ninja.git<div><br></div><div>I then attempted to build swift:</div><div><br></div>$ ./swift/utils/build-script<div><br></div><div>Which resulted in errors, and as far as I can tell did not attempt to build the ninja distro that I downloaded into the ninja directory in my current working directory:</div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">which: no ninja in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/lanes/.local/bin:/home/lanes/bin)<br>Building the standard library for: swift-stdlib-linux-x86_64<br>Running Swift tests for: check-swift-linux-x86_64<br>+ rm -rf /home/lanes/swift/build/Ninja-DebugAssert/ninja-build<br>+ cp -r /home/lanes/swift/ninja /home/lanes/swift/build/Ninja-DebugAssert/ninja-build<br>++ uname -s<br>+ [[ Linux == \D\a\r\w\i\n ]]<br>+ cd /home/lanes/swift/build/Ninja-DebugAssert/ninja-build<br>+ python ./configure.py --bootstrap<br>bootstrapping ninja...<br>warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.<a href="http://in.cc" target="_blank">in.cc</a> will not affect your build.<br>wrote build.ninja.<br>bootstrap complete. rebuilding...<br>[24/24] LINK ninja<br>cmark: using standard linker<br>+ cd /home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64<br>+ /usr/bin/cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ -DCMAKE_BUILD_TYPE:STRING=Debug /home/lanes/swift/cmark<br>CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.<br>CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.<br>Missing variable is:<br>CMAKE_C_COMPILER_ENV_VAR<br>CMake Error: Could not find cmake module file:/home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64/CMakeFiles/2.8.11/CMakeCCompiler.cmake<br>CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.<br>Missing variable is:<br>CMAKE_CXX_COMPILER_ENV_VAR<br>CMake Error: Could not find cmake module file:/home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64/CMakeFiles/2.8.11/CMakeCXXCompiler.cmake<br>-- Configuring incomplete, errors occurred!<br>./swift/utils/build-script: command terminated with a non-zero exit status 1, aborting</blockquote><div><br></div><div><br></div><div>This leads me to a couple of questions:</div><div><br></div><div>* Do I need to first build and install re2c? If so, this should perhaps be mentioned as a prereq.</div><div>* Is there anything differently I should be doing to get the bootstrap process running successfully?</div><div><br></div><div>Thanks,</div><div>Lane</div><div><br></div><div><br></div><div><br></div></div></div>
</div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2O5dLnG7UVIjbE29vVa3BdMe7HHE9Gv2-2BcIkVlnfIm6d2JcIswtx4TuXNSbgc7y5AXyK-2ByKjaUtDoXmv7bFu4XqMy4z-2BKbsrKSDN4iPUsH8tqceNz89k4FB2yRLkO7ERwMNYzscdBv6SMxOin4qH9r-2BkchzH0tHou5q2bS6JQPZwbwTax5qr6F4Z0CEUwkk3PQ-3D" alt="" width="1" height="1" border="0" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;">
_______________________________________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br></div></blockquote></div><br></div></div></blockquote></div><br>Issue created: <a href="https://bugs.swift.org/browse/SR-58">https://bugs.swift.org/browse/SR-58</a></div><div class="gmail_extra"><br></div></div>