[swift-dev] Call for help: Linux (and others) build configurations, including static libraries, with ICU.

Davide Italiano dccitaliano at gmail.com
Mon May 29 19:16:50 CDT 2017

On Thu, May 25, 2017 at 5:33 PM, Michael Ilseman <milseman at apple.com> wrote:
> With https://github.com/apple/swift/pull/9684 the Swift standard library depends on ICU on Darwin in addition to Linux, where it has always had that dependency. While our Linux bots have been happy with the changes, Iā€™m not familiar with the build configurations involving the build-your-own-ICU path, nor with FreeBSD, Cygwin, Android, etc. I would like to make sure that all supported configurations still work, can someone help me with this?
> Additionally, the standard library can be built as a static library. In this configuration, user programs that link against the static library should also be told explicitly to link against ICU (e.g. ā€œ-licu*ā€). On Darwin, the least evil approach was autolinking by emitting a linker option via inline asm in the shims library. Is there an approach that would work for Linux? An alternative solution could be adding the flags in the Swift driver itself, but that would mean that any build systems that bypass the Swift driver would also need to be updated to pass those same flags.

I tried this one but I'm afraid the support for FreeBSD bitrot enough
that I didn't even get to the point where this failed.
I have a crash in the compiler/verifier instead.
Please let me know if you need other infos.

[27/6/50] Compiling
FAILED: stdlib/private/SwiftPrivate/freebsd/x86_64/SwiftPrivate.o
cd /usr/home/davide/mount/dcci/work/build/Ninja-RelWithDebInfoAssert/swift-freebsd-x86_64/stdlib/private/SwiftPrivate
&& /usr/local/bin/python /usr/home/davide/mount/dcci/work/swif$
-- /usr/home/davide/mount/dcci/w$
-c -sdk / -targetx86_64-unknown-freebsd11.0-RELEASE-p2 -resource-dir
ja-RelWithDebInfoAssert/swift-freebsd-x86_64/./lib/swift -O -g -D
/lib/swift/freebsd/x86_64 -module-cache-path
-no-link-objc-runtime -Xfrontend $
enable-cow-existentials -swift-version 3 -Xfrontend -sil-serialize-all
-module-link-name swiftSwiftPrivate -force-single-frontend-invocation
-parse-as-library -o /usr/home/davide/m$
warning: simultaneous accesses to var 'result', but modification
requires exclusive acc$
ss; consider copying to a local variable
      swap(&result[i], &result[j])
      result.swapAt(i, j)
note: conflicting access is here
      swap(&result[i], &result[j])
swifterror value when used in a callsite should be marked with
swifterror attribute
  %6 = alloca swifterror %swift.error*, align 8
  %61 = call i1
* noalias nocapture dereferenceable(16) %5, i8* bitcast (i1 (i16)*
@_T0s11_StringCoreV22isRepresentableAsASCIISbyFSbs6UInt16VcfU_ to
i8*), %swift.refcounted* null, %swift.refcounted
* undef, %swift.error** nocapture %6), !dbg !1877
<unknown>:0: error: fatal error encountered during compilation; please
file a bug report with your project and the crash log
<unknown>:0: note: Broken function found, compilation aborted!

More information about the swift-dev mailing list