swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.45k stars 10.35k forks source link

[SR-1247] 'make install' fails when building swift-2.2-RELEASE from source on Linux #43855

Open swift-ci opened 8 years ago

swift-ci commented 8 years ago
Previous ID SR-1247
Radar None
Original Reporter srcshelton (JIRA User)
Type Bug
Environment Linux x86_64
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug, Linux | |Assignee | None | |Priority | Medium | md5: 848c1809d27c209d605b434404086e65

Issue Description:

When not using ninja, swift-2.2-RELEASE appears to successfully compile before producing the output:

...
[ 97%] Built target swiftSwiftPrivatePthreadExtras-linux
[ 98%] /var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64/stdlib/private/StdlibUnittest/linux/x86_64/StdlibUnittest.o;/var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64/./lib/swift/linux/x86_64/StdlibUnittest.swiftmodule;/var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64/./lib/swift/linux/x86_64/StdlibUnittest.swiftdoc
[ 98%] Built target add_custom_command_target-2d9559b0c1ae4b8afd5cba63f0ced81e-StdlibUnittest.o
[100%] Built target swiftStdlibUnittest-linux-x86_64
[100%] /var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64/./lib/swift/linux/libswiftStdlibUnittest.so
[100%] Built target swiftStdlibUnittest-linux
[100%] Built target swift-stdlib-linux-x86_64
--- Installing swift ---
+ DESTDIR=/var/tmp/swift-2.2/image/
+ /usr/bin/cmake --build /var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64 -- install
gmake: *** No rule to make target 'install'.  Stop.
utils/build-script: command terminated with a non-zero exit status 2, aborting

... having been invoked as:

/var/tmp/swift-2.2/work/swift-swift-2.2-RELEASE/utils/build-script -m -- --install_destdir="/var/tmp/swift-2.2/image/" --install-swift --swift-install-components="compiler;clang-builtin-headers;stdlib;sdk-overlay;dev;license"

... and indeed, /var/tmp/swift-2.2/work/build/Unix_Makefiles-Release/swift-linux-x86_64/Makefile contains 'preinstall' rules, but makes no mention of 'install'.

I've tried to derive the build process from the available documentation and the scripts in the utils directory, but there seems to be very little information around concerning building the release version of swift from source. If the above is intended operation, could someone suggest how to install swift after compilation has apparently succeeded?

belkadan commented 8 years ago

@gribozavr, @shahmishal, any ideas?

gribozavr commented 8 years ago

I don't think we have any Makefile buildbots. So it is not a surprise for me that this configuration is broken.

srcshelton (JIRA User), is there a reason why you can't use ninja?

swift-ci commented 8 years ago

Comment by Stuart Shelton (JIRA)

Building with Ninja failed during compilation, whereas with '-m' compilation succeeded, but installation failed... I guessed that this would be the easier problem to address 😉

If the way I'm invoking the build-script looks reasonable, though, I can file a bug for the issue with ninja - I'll just have to rebuild in order to capture the failure.

Is the '-m' option something that is intended to be supported, or is it going away?

swift-ci commented 8 years ago

Comment by Stuart Shelton (JIRA)

SR-1259 for error building with Ninja.