Repository navigation
Description
| Previous ID | SR-58 |
| Radar | None |
| Original Reporter | dowobeha (JIRA User) |
| Type | Bug |
Environment
Scientific Linux 7.1
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, BuildScript, Linux |
| Assignee | smikes (JIRA) |
| Priority | Medium |
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
- rm -rf /home/lanes/swift/build/Ninja-DebugAssert/ninja-build
- cp -r /home/lanes/swift/ninja /home/lanes/swift/build/Ninja-DebugAssert/ninja-build
++ uname -s - [[ Linux == \D\a\r\w\i\n ]]
- cd /home/lanes/swift/build/Ninja-DebugAssert/ninja-build
- python ./configure.py --bootstrap
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 - cd /home/lanes/swift/build/Ninja-DebugAssert/cmark-linux-x86_64
- /usr/bin/cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ -DCMAKE_BUILD_TYPE:STRING=Debug /home/lanes/swift/cmark
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
-
- Configuring incomplete, errors occurred!
./swift/utils/build-script: command terminated with a non-zero exit status 1, aborting
- Configuring incomplete, errors occurred!
Activity
swift-ci commentedon Jan 8, 2016
Comment by Sam Mikes (JIRA)
Similar issue with bootstrapped ninja on OEL6.5
swift-ci commentedon Jan 11, 2016
Comment by Sam Mikes (JIRA)
Candidate fix: #937
swift-ci commentedon Jan 11, 2016
Comment by Lane Schwartz (JIRA)
Adding this note (from my emails to the Swift list in December):
swift-ci commentedon Jan 11, 2016
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.
Dante-Broggi commentedon Sep 20, 2018
Is this resolved, or no longer valid? If either, this should be closed.
swift-ci commentedon Sep 21, 2018
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.
swift-ci commentedon Sep 21, 2018
Comment by Lane Schwartz (JIRA)
I haven't tried reproducing this lately, but I assume it is still a problem.