Raspberry Pi 2 (32-bit armv7) running Raspbian Jessie
Built Swift 3 from source. (A bunch of components failed to build, but the Swift compiler got built.)
I've tested this code on Mac, iOS, Linux x86_64, and Android. The code compiles and works for all these other platforms. So this bug seems to be arm specific. (iOS and Android use x86_64 platforms to cross-compile, whereas I am directly compiling on the arm device to generate arm binaries which is the big difference there.)
I'm trying to use Swift 3 on a Raspberry Pi 2 (armv7). On code that used to compile in Swift 2.3, and code that currently compiles correctly on Swift 3 for Mac/Xcode 8, Linux x86_64, and for Android, I'm getting a compiler assertion failure and stack dump.
The simple pattern that seems to trigger this seems to come down to:
letpos_vec = cpv(0.0, 0.0);
cpBodySetPosition(body, pos_vec); // also tried explicit nil for body to try to suggest that it is the cpVect causing the problem
I'm attaching my slightly modified file trying to isolate the problem. It is line 1178 that trips up the compiler. (But if I comment this out, there are other instances of the code that trigger this.)
The full source code is in BlurrrMain.swift which can be found here. bitbucket.org/blurrr/flappyblurrrswift/src The project has a bunch of dependencies. I'm developing a cross-platform SDK that makes this easy to build. I'm happy to give you access to the SDK if it helps you debug this.
In this case, LastArgWritten is 2 and adustedArg.size() is 3
I am attaching a reproducible project called SwiftArmCompileBug.tar.gz.
There is a build.sh script to help build it, but if you want to jump directly to the failing part, the command is the 3rd one which is:
swift -frontend -c -targetarmv7-unknown-linux-gnueabihf -primary-fileBlurrrMain.swiftmain.swiftBlurrrMain.swift -import-objc-headerMySwiftBridgingHeader.h -emit-module -module-nameMyBlurrrProject -oBlurrrMain.swift.o
The text was updated successfully, but these errors were encountered: