<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 17 Jul 2017, at 14:00, Sam Ding via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><p class=""><font size="2" class="">Hi,</font><br class=""><br class=""><font size="2" class="">I am trying to build swift-4.0-branch on s390x. </font><br class=""><br class=""><font size="2" class=""> 1)  The 1st error is in stdlib/public/core/UTF8.swift, line 51, </font><br class=""><font size="2" class=""> failed at " _sanityCheck(source.count  ==4 ) ". </font><br class=""><font size="2" class="">In fact, the test shows "source.count" = "0" on s390x,  Note "stdlib/public/core/UTF8.swift"</font><br class=""><font size="2" class="">is a new code in swift-4.0-branch, what change should be?</font><br class=""></p></div></div></blockquote><div>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.</div><div><br class=""></div><div>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.</div><blockquote type="cite" class=""><div class=""><div class=""><p class=""><font size="2" class="">2)  The 2nd error is in "../swiftpm/Sources/Basic/Path.swift" line 506 like:</font><br class=""><br class=""><font size="2" class="">   </font><font size="2" color="#001FE2" class="">private func normalize(absolute string: String) -&gt; String {</font><br class=""><font size="2" color="#001FE2" class="">       precondition(string.characters.first == "/", "Failure normalizing \(string), absolute paths should start with '/'")</font><br class=""><br class=""><font size="2" class="">But in fact the "string" is empty and causes the build stop.</font><br class=""><font size="2" class="">Seems this is related to the configuration.</font><br class=""></p></div></div></blockquote></div>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.<div class=""><br class=""></div><div class="">Alex</div></body></html>