[swift-dev] Glibc.swift: error: no such module 'SwiftGlibc'
Eric Wing
ewmailing at gmail.com
Mon Nov 7 21:51:26 CST 2016
I am trying to build Swift for Android and I'm getting the error:
Glibc.swift:13:19: error: no such module 'SwiftGlibc'
I found several other posts asking about this problem for Linux, but
no solid resolution.
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160418/001741.html
https://www.mail-archive.com/swift-users@swift.org/msg02098.html
https://aur.archlinux.org/packages/swift-language-git/?comments=all
My problem is a little different. Besides the Android part, I should
mention a few other things:
- I am building Swift as ReleaseAssert under Steam-Runtime (which uses
clang 3.6.0), where I get the error.
- If I build as DebugAssert (Steam-Runtime), I do not see this problem
(and the build finished). I'm a little surprised debug worked but not
release.
- If I build under Ubuntu 16.10, I do not hit this problem (both debug
and release)
- I do not see any other error messages as stated in the other thread
like (ioctl.h not found). My error message is pretty unhelpful about
why it failed. (Pasted below)
- I looked for a glibc.modulemap for my broken build. I do not see any
in the build directory, nor does it exist on my system. (I do see it
created in the successful build.)
Anyway, I really could use some guidance on how to get around/fix this
problem. I want to use Steam-Runtime because I can build a Swift/Linux
compiler binary that I can run on most Linux distros, not just Ubuntu
16.10.
I appreciate any help.
Thanks,
Eric
cd /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform
&& /home/pinky/steam-runtime/usr/bin/cmake -E make_directory
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/android/armv7
&& /home/pinky/steam-runtime/usr/bin/cmake -E make_directory
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7
&& /home/pinky/Source/SWIFT/swift/utils/line-directive
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Glibc.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Platform.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/TiocConstants.swift
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/4/tgmath.swift
-- /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk /home/pinky/Android/android-ndk/platforms/android-21/arch-arm
-target armv7-none-linux-androideabi -resource-dir
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift
-O -D INTERNAL_CHECKS_ENABLED -I
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7
-module-cache-path
/home/pinky/Source/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
-emit-module -emit-module-path
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7/Glibc.swiftmodule
-o /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/android/armv7/Glibc.o
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Glibc.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Platform.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/TiocConstants.swift
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/4/tgmath.swift
FAILED: stdlib/public/Platform/android/armv7/Glibc.o
lib/swift/android/armv7/Glibc.swiftmodule
lib/swift/android/armv7/Glibc.swiftdoc
cd /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform
&& /home/pinky/steam-runtime/usr/bin/cmake -E make_directory
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/android/armv7
&& /home/pinky/steam-runtime/usr/bin/cmake -E make_directory
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7
&& /home/pinky/Source/SWIFT/swift/utils/line-directive
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Glibc.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Platform.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/TiocConstants.swift
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/4/tgmath.swift
-- /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk /home/pinky/Android/android-ndk/platforms/android-21/arch-arm
-target armv7-none-linux-androideabi -resource-dir
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift
-O -D INTERNAL_CHECKS_ENABLED -I
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7
-module-cache-path
/home/pinky/Source/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
-emit-module -emit-module-path
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/android/armv7/Glibc.swiftmodule
-o /home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/android/armv7/Glibc.o
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Glibc.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Platform.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/TiocConstants.swift
/home/pinky/Source/SWIFT/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/4/tgmath.swift
/home/pinky/Source/SWIFT/swift/stdlib/public/Platform/Glibc.swift:13:19:
error: no such module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
More information about the swift-dev
mailing list