[swift-dev] build order? Glibc.swift: error: no such module 'SwiftGlibc'

rintaro ishizaki fs.output at gmail.com
Sun Nov 20 23:37:25 CST 2016


Hi Eric,

https://bugs.swift.org/browse/SR-3219 has been resolved.
The current master branch still reproduce the problem? If so, could you
open a new SR and share the generated build.ninja file in the build
directory?


2016-11-19 13:57 GMT+09:00 Eric Wing via swift-dev <swift-dev at swift.org>:

> On 11/15/16, Will Stanton <willstanton1 at yahoo.com> wrote:
> > Hello Eric,
> >
> > Wanted to share I ran into a similar/the same error message this week
> > rebuilding from scratch (clean build/ on AWS Linux like CentOS): the
> build
> > stops (almost certainly) because the native SwiftGlibc module isn’t
> > generated. It happens near the end of the Swift build, around step
> > 600/640ish.
> > I’m not sure if there is one cause, since others posting online have run
> > into this message over the last year seemingly for different reasons
> > (missing libraries?).
> >
> >
> > Anyway I was able to get past it by executing:
> > ninja make lib-swift-linux-x86_64-glibc.modulemap
> >
> > Re-invoking the build script gave me this:
> > [1/1] Generating glibc.modulemap from glibc.modulemap.gyb
> >
> > And the rest of the build went on its way. Maybe it’ll work for you if
> > you're still seeing the problem?
> >
> > I’ve filed SR-3219 https://bugs.swift.org/browse/SR-3219 with my
> build.ninja
> > in case it’s related to build order (alas I’m not too familiar with
> > everything so I don’t know when SwiftGlibc is expected).
> >
> > The error I came across:
> > [1/51] Compiling
> > /home/ec2-user/swift/...b/public/Platform/linux/x86_64/Glibc.o
> > FAILED: stdlib/public/Platform/linux/x86_64/Glibc.o
> > cd
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/stdlib/public/Platform
> > && /home/ec2-user/swift/swift/utils/line-directive
> > /home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift
> > /home/ec2-user/swift/swift/stdlib/public/Platform/Platform.swift
> > /home/ec2-user/swift/swift/stdlib/public/Platform/TiocConstants.swift
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/stdlib/public/Platform/8/tgmath.swift
> > --
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/./bin/swiftc
> > -c -sdk / -target x86_64-unknown-linux-gnu -resource-dir
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/./lib/swift
> > -O -D INTERNAL_CHECKS_ENABLED -I
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/./lib/swift/linux/x86_64
> > -module-cache-path
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/./module-cache
> > -no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc
> > -force-single-frontend-invocation -parse-as-library -o
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/stdlib/public/Platform/linux/x86_64/Glibc.o
> > /home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift
> > /home/ec2-user/swift/swift/stdlib/public/Platform/Platform.swift
> > /home/ec2-user/swift/swift/stdlib/public/Platform/TiocConstants.swift
> > /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-
> linux-x86_64/stdlib/public/Platform/8/tgmath.swift
> > /home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift:13:19:
> error:
> > no such module 'SwiftGlibc'
> > @_exported import SwiftGlibc // Clang module
> >                   ^
> >
> >
> >
> > Regards,
> > Will Stanton
> >
> >> On Nov 10, 2016, at 4:34 PM, Eric Wing via swift-dev <
> swift-dev at swift.org>
> >> wrote:
> >>
> >> Ubuntu 16.10 supplies CMake 3.5.2.
> >> Steam-Runtime ships a version that is way too old, so I built and used
> >> the latest stable CMake version, 3.6.3.
> >>
> >> Using 3.6.3 seems to always trigger this problem with the Swift build.
> >>
> >> I tested it both ways:
> >>
> >> 1. I changed Ubuntu 16.10 to use CMake 3.6.3 and the build broke in
> >> exactly the same way I described.
> >>
> >> 2. In Steam-Runtime, I built/used CMake 3.5.2 instead, and the build
> >> completed.
> >
> >
>
> Interesting...following your suggestion, also doing:
>
> ninja make lib-swift-android-armv7-glibc.modulemap
>
> and then resuming the normal build got me through the rest of the
> build with CMake 3.6.3.
>
>
> (To your other email,
> Android is technically Bionic instead of Glibc, but the Swift build
> system is pretending they are the same. This may need to be addressed
> in the future...)
>
> Thanks,
> Eric
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20161121/0ac77467/attachment.html>


More information about the swift-dev mailing list