<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 Apr 29, 2016, at 23:46, Karl Wagner via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On 22 Apr 2016, at 06:46, Timothy Wood &lt;<a href="mailto:tjw@omnigroup.com" class="">tjw@omnigroup.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 19, 2016, at 1:57 AM, Karl Wagner via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; 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 &lt;<a href="http://article.gmane.org/gmane.comp.lang.swift.devel/1710" class="">http://article.gmane.org/gmane.comp.lang.swift.devel/1710</a>&gt; 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="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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:&nbsp;<a href="https://github.com/karwa/swift" class="">https://github.com/karwa/swift</a></div></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Then I’m building with:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">(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="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">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="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">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="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">@_exported import SwiftGlibc</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">inside public/Platform/Glibc.swift</div></div></blockquote><br class=""></div><div>The logic to go look for that file is hardcoded in the compiler; it’s not picked up via include paths. It has to specifically be inside the lib/swift/ directory. (I think it’s at lib/swift/linux/, but I’m not 100% sure.)</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>