-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-58] Problem building using bootstrapped ninja #42680
Comments
Comment by Sam Mikes (JIRA) Similar issue with bootstrapped ninja on OEL6.5 |
Comment by Sam Mikes (JIRA) Candidate fix: #937 |
Comment by Lane Schwartz (JIRA) Adding this note (from my emails to the Swift list in December):
|
Comment by Sam Mikes (JIRA) I think there are two separate failures here. The project "cmark" has cmake_minimum_required(VERSION 2.8.9) so will try to build even with an older cmake. This should probably be changed, as it is the first project that is built, and subsequent projects require 2.8.12.2 (I will open a separate PR to deal with this). Separately, the bootstrapped ninja was is not available to CMake (even 2.8.12.2) because the CMakeCache.txt caches the failure to find the ninja program. I suspect that when you updated CMake and the cache was re-generated, cmake was then able to find the ninja program, working around the problem and making it appear that CMake 2.8.12.2 is able to handle the bootstrapping. On my test system (OEL 6.5 with CMake 2.8.12.2 installed via rpm), with no `ninja` installed at system level, and without the patch, I cannot do a clean build from an empty "build" directory. |
Is this resolved, or no longer valid? If either, this should be closed. |
Comment by Sam Mikes (JIRA) I haven't been working with Swift in the last few years. OK by me to close, looks like the original reporter dowobeha (JIRA User) also has a fix/workaround. |
Comment by Lane Schwartz (JIRA) I haven't tried reproducing this lately, but I assume it is still a problem. |
Environment
Scientific Linux 7.1
Additional Detail from JIRA
md5: d176f61f71c26cf8b306c2e254f2e055
Issue Description:
Failure to build when using a bootstrapped ninja.
Steps to reproduce:
On Scientific Linux 7.1, install llvm, llvm-devel, clang, and cmake (version 2.8.11)
Create new directory for swift repos, and in that directory, clone all swift-related repos from github, as per README.md in the swift repo
In that same new directory, also clone ninja
Run ./swift/utils/build-script
See also swift-users mailing list thread titled "Bootstrapping ninja and building from source" started on Fri, 4 Dec 2015.
Results of running ./swift/utils/build-script:
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)
Building the standard library for: swift-stdlib-linux-x86_64
Running Swift tests for: check-swift-linux-x86_64
++ uname -s
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
bootstrap complete. rebuilding...
[24/24] LINK ninja
cmark: using standard linker
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.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:/home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64/CMakeFiles/2.8.11/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:/home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64/CMakeFiles/2.8.11/CMakeCXXCompiler.cmake
./swift/utils/build-script: command terminated with a non-zero exit status 1, aborting
The text was updated successfully, but these errors were encountered: