<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Joseph,<div class=""><br class=""></div><div class="">The driver mode option tells swiftc to "behave" like "swift" (in this case, to act as an interpreter). The reason we use that option there is so that the bootstrap script can be passed just the path to `swiftc` and not need to be passed (or derive) the path to `swift`.<br class=""><div class=""><br class=""></div><div class="">The failure you are seeing is most likely because `swift` is unable to load the dynamic library associated with the PackageDescription module (which is used to load the manifest files). The way that this is *supposed* to work is:</div><div class=""> - The manifest files have `import PackageDescription`.</div><div class=""> - swift finds that library via the -L arguments.</div><div class=""> - swift will try and load the dynamic library associated with the module (but currently I don't believe it is an error if the `import` succeeds but the loading of the .so fails).</div><div class=""> - swift JITs the code for the module, which then can dynamically link with the loaded library. This is what is failing in your case.</div><div class=""><br class=""></div><div class="">Unfortunately the way the LLVM JIT works the exact nature of the failure isn't obvious. What you can try to do is write a simple C program which dlopen()s the PackageDescription .so and see why it is failing (or if that is in fact the issue). It is also possible that some part of this pipeline isn't working properly for Swift on Linux/ARM.</div><div class=""><br class=""></div><div class="">HTH,</div><div class=""> - Daniel</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 28, 2015, at 7:00 AM, Joseph Bell via swift-build-dev <<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Howdy,</div><div class=""><br class=""></div><div class="">I'm looking to getting the Swift Package Manager building on ARM systems such as the BeagleBoard, and its now in the bootstrap stage, and bombs out which what appears to be a linking error. I know that <span style="font-family:monospace,monospace" class="">_TMaC18PackageDescription7Package is defined in libPackageDescription.so but its not being picked up when Package.swift is compiled.</span></div><div class=""><span style="font-family:monospace,monospace" class=""><br class=""></span></div><div class=""><span style="font-family:monospace,monospace" class="">That issue aside, what is the meaning of the "driver-mode" option to swiftc, and why would one invoke swiftc with --driver-mode=swift? </span></div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">swiftpm: using standard linker</font></div><div class=""><font face="monospace, monospace" class="">+ /mnt/usbms/package-swift/swiftpm/Utilities/bootstrap --swiftc=/mnt/usbms/package-swift/build/buildbot_linux/swift-linux-armv7/bin/swiftc --sbt=/mnt/usbms/package-swift/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool --build=/mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7 --xctest=/mnt/usbms/package-swift/build/buildbot_linux/xctest-linux-armv7</font></div><div class=""><font face="monospace, monospace" class="">bootstrap: note: building stage1: /mnt/usbms/package-swift/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool -f /mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/build.swift-build</font></div><div class=""><font face="monospace, monospace" class="">bootstrap: note: building self-hosted 'swift-build': env SWIFTC=/mnt/usbms/package-swift/build/buildbot_linux/swift-linux-armv7/bin/swiftc SWIFT_BUILD_TOOL=/mnt/usbms/package-swift/build/buildbot_linux/llbuild-linux-armv7/bin/swift-build-tool SWIFT_BUILD_PATH=/mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7 SWIFTPM_EMBED_RPATH=$ORIGIN/../lib/swift/linux /mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/bin/swift-build</font></div><div class=""><font face="monospace, monospace" class="">bootstrap: note: cwd will be set to /mnt/usbms/package-swift/swiftpm</font></div><div class=""><font face="monospace, monospace" class="">LLVM ERROR: Program used external function '_TMaC18PackageDescription7Package' which could not be resolved!</font></div><div class=""><font face="monospace, monospace" class="">error: ExitStatus(1, ["/mnt/usbms/package-swift/build/buildbot_linux/swift-linux-armv7/bin/swiftc", "--driver-mode=swift", "-I", "/mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/lib/swift/pm", "-L", "/mnt/usbms/package-swift/build/buildbot_linux/swiftpm-linux-armv7/.bootstrap/lib/swift/pm", "-lPackageDescription", "/mnt/usbms/package-swift/swiftpm/Package.swift"])</font></div><div class=""><font face="monospace, monospace" class="">bootstrap: error: build failed with exit status 1</font></div><div class=""><font face="monospace, monospace" class="">./swift/utils/build-script: command terminated with a non-zero exit status 1, aborting</font></div><div class=""><font face="monospace, monospace" class="">./swift/utils/build-script: command terminated with a non-zero exit status 1, aborting</font></div></div><div class=""><br class=""></div><div class=""><br class=""></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2Of-2BYa-2BWgSvzJ2OD1F4dxyx-2BXigLCbOfmTAqq5eEWZc57Rb86m1IMPWr-2B-2B1Lh9EdLaILyFmGScblfXy0aa1Z-2BjjIBMq85ODE2R-2F9e-2FRMn91RNWm4n-2Fx-2FXVinrWzVPlCoZh0pDvxNlFM-2FR-2FG2YJMegdITO1TAQXF8gAyRNtmA-2Fniq04pECyCb8ivEsA2Hz-2FH2po-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-build-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>