<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 22 Apr 2016, at 06:46, Timothy Wood <<a href="mailto:tjw@omnigroup.com" class="">tjw@omnigroup.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 19, 2016, at 1:57 AM, Karl Wagner via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">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.<br class=""><br class="">I’ve been whittling down at the compile command, trying to figure out why it isn’t finding/building the module.<br class=""></div></div></blockquote><div class=""><br class=""></div>In this message <<a href="http://article.gmane.org/gmane.comp.lang.swift.devel/1710" class="">http://article.gmane.org/gmane.comp.lang.swift.devel/1710</a>> there was a suggestion to make a symlink to work around this issue (but when building on Ubuntu x86_64, I think). Perhaps something similar would work?</div><div class=""><br class=""></div><div class="">What steps are you using to get as far as you have? I’m not having a lot of luck so far…</div><div class=""><br class=""></div><div class="">-tim</div><div class=""><br class=""></div></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class=""><div class="">Well that seems to be trying to resolve the runtime issue; I’m still trying to compile the standard library.</div><div class=""><br class=""></div><div class="">My changes are here: <a href="https://github.com/karwa/swift" class="">https://github.com/karwa/swift</a></div></div><div class=""><br class=""></div><div class="">Then I’m building with:</div><div class=""><br class=""></div><div class=""><div class="">../swift/utils/build-script -d \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--install-prefix="/usr" \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--install-symroot="${cc_files}/out/symroot" \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>-- \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--cross-compile-tools-deployment-targets=linux-armv7 \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--cross-compile-sysroot="${sysroot}" \</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--cross-compile-toolchain-bin="${toolchain}"</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>--stdlib-deployment-targets="macosx-x86_64;linux-armv7=linux-armv7”</div></div><div class=""><br class=""></div><div class="">(I’m not sure about the install arguments; I’ve only been building for OSX, so I’ve never ‘installed’ a built swift besides Xcode toolchains.)</div><div class=""><br class=""></div><div class="">This builds for the host first, then uses the freshly baked clang and swift compilers to cross-compile to the target. I can compile the tools and what I believe is most of the standard library; it just flops at SwiftGlibc and I can’t understand it because glibc.modulemap exists where it should and looks good (headers pointing inside the cross-compiled sysroot). It’s not even complaining about the modulemap itself (like missing headers or whatever); it just appears unable to find it even though it’s in the swift compiler’s include path.</div><div class=""><br class=""></div><div class="">Is there some kind of extra flag to tell it to look inside that particular modulemap file, that perhaps isn’t being generated for me? I don’t know how that magic works, how Swift knows what to look for when it sees:</div><div class=""><br class=""></div><div class="">@_exported import SwiftGlibc</div><div class=""><br class=""></div><div class="">inside public/Platform/Glibc.swift</div></body></html>