SwiftAndroid / swift

Port of Apple's reference Swift toolchain to Android; doesn't quite work yet
Apache License 2.0
720 stars 32 forks source link

Problem building on Ubuntu 15.10 #2

Closed ephemer closed 8 years ago

ephemer commented 8 years ago

I am trying to build the swift stdlib for Android from your fork and am getting stuck right at the start of the build process. I'm using Ubuntu 15.10 and have updated the paths to /home/zhuowei with equivalent paths of my own (that contain the expected files of course : )

The process hangs in two different locations, depending whether I'm starting with a clean build folder or not. With a clean folder it looks like this:

~# swift/swift/utils/build-script -R
Building the standard library for: swift-stdlib-linux-x86_64 swift-stdlib-android-armv7
Running Swift tests for: check-swift-linux-x86_64 check-swift-android-armv7

cmark: using gold linker
+ cd /root/swift/build/Ninja-ReleaseAssert/cmark-linux-x86_64
+ /usr/bin/cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ -DCMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=gold -DCMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=gold -DCMAKE_BUILD_TYPE:STRING=Release /root/swift/cmark
-- The C compiler identification is Clang 3.6.2
-- The CXX compiler identification is Clang 3.6.2
-- Check for working C compiler using: Ninja

The process hangs here and appears not to pass the C compiling test (it doesn't crash though, I have to Ctrl-C to exit). I went into the build/Ninja-Release/cmark.../CMake-Temp folder and manually ran clang c-compiler-test.c, which compiles immediately without issue (the resulting a.out file didn't exist beforehand though).

With or without the manual C compiling step, if I break the original build-script process and try again, it looks like this:

# build-script -R
Building the standard library for: swift-stdlib-linux-x86_64 swift-stdlib-android-armv7
Running Swift tests for: check-swift-linux-x86_64 check-swift-android-armv7

cmark: using gold linker
+ cd /root/swift/build/Ninja-ReleaseAssert/cmark-linux-x86_64
+ /usr/bin/cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ -DCMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=gold -DCMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=gold -DCMAKE_BUILD_TYPE:STRING=Release /root/swift/cmark
-- Performing Test HAVE_FLAG_ADDRESS_SANITIZER

Again, this is the end of the line. I get no error, the process doesn't crash or continue from here. Did you see this in your development process yourself? Any ideas what could be causing it?

I'm excited by your work on this. I fear I may be too inexperienced with Cxx to really help out here but if I see an opportunity to help out I will jump on it. Thanks

ephemer commented 8 years ago

Never mind, Apple's repo won't build for me either right now. I'll try to fix that first..

ephemer commented 8 years ago

If anyone else has this issue, I had to run sudo apt-get update and then update my version of ninja-build. I have a feeling it wasn't even the normal ninja that was installed the first time.