<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1404.46">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #000000}
</style>
</head>
<body>
<p class="p1">For SwiftPM, I'm looking to replace some POSIX calls with Foundation. NSTask</p>
<p class="p1">and NSFileManager amongst others. I've created a few PRs already for this, see</p>
<p class="p1">[1]. However before these can be merged, the build scripts need to be adjusted</p>
<p class="p1">to allow SwiftPM to build against Foundation.</p>
<p class="p2"><br></p>
<p class="p1">There has already been some pointers posted in the comments on one of these PRs,</p>
<p class="p1">see [2]. I tried to implement those, see my changes to the swift build-script in</p>
<p class="p1">[3] and the "fake toolchain" in SwiftPM in [4]. However SwiftPM builds stage1;</p>
<p class="p1">stage2 is still failing. I don't know how to proceed; I've only scratched the<span class="Apple-converted-space"> </span></p>
<p class="p1">surface regarding build systems and the many tools used to build the various<span class="Apple-converted-space"> </span></p>
<p class="p1">swift parts. I would really love some help going forward.</p>
<p class="p2"><br></p>
<p class="p3"><span class="Apple-converted-space"> </span>$ swift/utils/build-script -R --swiftpm</p>
<p class="p3"><span class="Apple-converted-space"> </span>(...)</p>
<p class="p3"><span class="Apple-converted-space"> </span>--- bootstrap: note: building self-hosted 'swift-build': env SWIFT_EXEC=/media/sf_Developer/apple/build/Ninja-ReleaseAssert/swiftpm-linux-x86_64/debug/swiftc SWIFT_BUILD_PATH=/media/sf_Developer/apple/build/Ninja-ReleaseAssert/swiftpm-linux-x86_64 /media/sf_Developer/apple/build/Ninja-ReleaseAssert/swiftpm-linux-x86_64/debug/swift-build-stage1 -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/linux -Xlinker -L -Xlinker /media/sf_Developer/apple/build/Ninja-ReleaseAssert/foundation-linux-x86_64/Foundation -Xlinker -rpath -Xlinker /media/sf_Developer/apple/build/Ninja-ReleaseAssert/foundation-linux-x86_64/Foundation -Xswiftc -I/media/sf_Developer/apple/build/Ninja-ReleaseAssert/foundation-linux-x86_64/Foundation -Xswiftc -I/media/sf_Developer/apple/build/Ninja-ReleaseAssert/foundation-linux-x86_64/Foundation/usr/lib/swift</p>
<p class="p3"><span class="Apple-converted-space"> </span>/media/sf_Developer/apple/build/Ninja-ReleaseAssert/swiftpm-linux-x86_64/debug/swift-build-stage1: error while loading shared libraries: libFoundation.so: cannot open shared object file: No such file or directory</p>
<p class="p3"><span class="Apple-converted-space"> </span>--- bootstrap: error: build failed with exit status 127</p>
<p class="p2"><br></p>
<p class="p1">- Bouke</p>
<p class="p2"><br></p>
<p class="p1">[1]: https://github.com/apple/swift-package-manager/pulls/Bouke</p>
<p class="p1">[2]: https://github.com/apple/swift-package-manager/pull/292#issuecomment-216508823</p>
<p class="p1">[3]: https://github.com/apple/swift/compare/master...Bouke:swiftpm-foundation</p>
<p class="p1">[4]: https://github.com/apple/swift-package-manager/compare/ef491db...Bouke:swiftpm-foundation</p>
</body>
</html>