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

Will Stanton willstanton1 at yahoo.com
Tue Nov 15 23:05:30 CST 2016


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.



More information about the swift-dev mailing list