> On 17 Jul 2017, at 14:00, Sam Ding via swift-dev <swift-dev@swift.org> wrote:
> 
> Hi,
> 
> I am trying to build swift-4.0-branch on s390x. 
> 
> 1) The 1st error is in stdlib/public/core/UTF8.swift, line 51, 
> failed at " _sanityCheck(source.count ==4 ) ". 
> In fact, the test shows "source.count" = "0" on s390x, Note 
> "stdlib/public/core/UTF8.swift"
> is a new code in swift-4.0-branch, what change should be?
> 
Given that a UTF8 value can't have a zero length, it seems to suggest that the 
call path that you arrived at hasn't managed to decode a value. You might have 
to follow the callpath back to find out what is calling it with an 
EncodedScalar that has a zero length, and fix it there.

There have been some changes to do with the Unicode parsing and Unicode in 
general, which of course may conflict with the s390x's code pages; but you'd 
have to look at the callpath to find out.
> 2) The 2nd error is in "../swiftpm/Sources/Basic/Path.swift" line 506 like:
> 
> private func normalize(absolute string: String) -> String {
> precondition(string.characters.first == "/", "Failure normalizing \(string), 
> absolute paths should start with '/'")
> 
> But in fact the "string" is empty and causes the build stop.
> Seems this is related to the configuration.
> 
You'd have to look into where that's being called, and why it's an empty 
string, for this to make sense. You can only say that a precondtion for this 
function failed, not why the string doesn't start with a / with this level of 
information.

Alex
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to