[swift-dev] Build failure for Linux: "No such module: SwiftGlibc"
Karl Wagner
springsupport at me.com
Tue Apr 19 03:57:47 CDT 2016
I’m trying to cross-compile Swift for the Raspberry Pi. I’ve got the tools and most of the standard library compiling, but I’m getting stuck trying to build the platform components for Glibc. Swift is just complaining that the “SwiftGlibc” module doesn’t exist. I’d appreciate it if anybody could help trying to find out why.
I’ve been whittling down at the compile command, trying to figure out why it isn’t finding/building the module.
==============
<sourceroot>/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc -c
-target armv7-unknown-linux-gnueabihf
-O -D INTERNAL_CHECKS_ENABLED
-no-link-objc-runtime -autolink-force-load -emit-module -module-link-name swiftGlibc -force-single-frontend-invocation -parse-as-library
-I <sourceroot>/build/Ninja-ReleaseAssert/swift-linux-armv7/./lib/swift/linux/armv7
-module-cache-path <sourceroot>/build/Ninja-ReleaseAssert/swift-linux-armv7/./module-cache
-emit-module-path <sourceroot>/build/Ninja-ReleaseAssert/swift-linux-armv7/./lib/swift/linux/armv7/Glibc.swiftmodule
-o <sourceroot>/build/Ninja-ReleaseAssert/swift-linux-armv7/stdlib/public/Platform/linux/armv7/Glibc.o
<sourceroot>/swift/stdlib/public/Platform/Glibc.swift
<sourceroot>/swift/stdlib/public/Platform/Glibc.swift:13:19: error: no such module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
===============
glibc.modulemap gets generated and copied in to the /lib/swift/linux/armv7 build dir, and Glibc.swift looks like it just exports that out, so I’m guessing that Swift can’t find my modulemap - or what else does it need to build the SwiftGlibc module?
Many thanks
More information about the swift-dev
mailing list