[swift-build-dev] SwiftPM Boostrap Crash

Ryan Lovelett swift-dev at ryan.lovelett.me
Wed Jan 6 15:03:18 CST 2016


$
/Users/lovelett/Source/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swift
test.swift
(Function)

Is that what you meant or should I compile it?

On Wed, Jan 6, 2016, at 03:04 PM, Max Howell wrote:
> Can your compiled-swift link a basic swift file which imports and uses
> Darwin, like:
> 
>     import Darwin
> 
>     print(fopen)
> 
> 
> > On Jan 6, 2016, at 12:00 PM, Ryan Lovelett <swift-dev at ryan.lovelett.me> wrote:
> > 
> > Indeed.
> > 
> > From my top-level source directory I did this:
> > 
> > $ rm -rf build clang cmark llbuild lldb llvm swift
> > swift-corelibs-foundation swift-corelibs-xctest swift-integration-tests
> > swift-llvm swiftpm
> > $ git clone https://github.com/apple/swift.git
> > $ cd swift
> > $ utils/update-checkout --clone
> > $ utils/build-script --llbuild --swiftpm
> > 
> > I'm close to just reformatting my hard-drive. Though it is a work
> > computer and I think IT might get mad at me. What they don't know won't
> > hurt them right? 😏
> > 
> > On Wed, Jan 6, 2016, at 12:03 PM, Daniel Dunbar wrote:
> >> Hi Ryan,
> >> 
> >> Am I correct in assuming that when you say you "recloned" all the repos
> >> that you also completely blew away your built products?
> >> 
> >> - Daniel
> >> 
> >>> On Jan 6, 2016, at 5:43 AM, Ryan Lovelett via swift-build-dev <swift-build-dev at swift.org> wrote:
> >>> 
> >>> I'm now convinced there is some sort of setting/folder being cached
> >>> somewhere that is causing this. I have 2 Macs (a work one, and a
> >>> personal one). Doing the same steps with the same code revisions checked
> >>> out on my work one triggers this crash; my personal one works as
> >>> expected.
> >>> 
> >>> On Tue, Jan 5, 2016, at 05:32 PM, Max Howell wrote:
> >>>> These are Swift standard library symbols not being found.
> >>>> 
> >>>> In order to work against the PR you don’t need to build from source, you
> >>>> can just use the latest snapshots.
> >>>> 
> >>>> Though obviously we should try to fix this anyway.
> >>>> 
> >>>> Does it build if you don’t use the swift/utils/build-script, but instead
> >>>> just step into the swiftpm source directory and do: Utilities/bootstrap ?
> >>> 
> >>> Same result regardless of whether I run it like this:
> >>> 
> >>> $ cd ~/Source/swiftpm
> >>> $ Utilities/bootstrap
> >>> --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
> >>> --swiftc=/Users/lovelett/Source/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swiftc
> >>> --sbt=/Users/lovelett/Source/build/Ninja-DebugAssert/llbuild-macosx-x86_64/bin/swift-build-tool
> >>> --build=/Users/lovelett/Source/build/Ninja-DebugAssert/swiftpm-macosx-x86_64
> >>> 
> >>> 💥
> >>> 
> >>> $ export
> >>> PATH="/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH"
> >>> $ cd ~/Source/swiftpm
> >>> $ Utilities/bootstrap
> >>> 
> >>> 💥
> >>> 
> >>>> 
> >>>>> On Jan 5, 2016, at 1:08 PM, Ryan Lovelett via swift-build-dev <swift-build-dev at swift.org> wrote:
> >>>>> 
> >>>>> While trying to work on my pull request #108 [1] I've run into a
> >>>>> stumbling block that is beginning to drive me nuts. I feel like I've
> >>>>> done something wrong, since I don't see anyone else talking about it,
> >>>>> but am at a loss as to what to do.
> >>>>> 
> >>>>> When the bootstrap runs it is crashing with `ld: symbol(s) not found for
> >>>>> architecture x86_64`. I've posted [2] the full build log. It was
> >>>>> generated with utils/build-script --llbuild --swiftpm > allout.txt 2>&1.
> >>>>> 
> >>>>> SwiftPM is on commit df7736e3962bfe183451d52b9b865b92f4f9ab26 (just want
> >>>>> to point out it does not include my WIP branch) and everything else
> >>>>> should be on its latest.
> >>>>> 
> >>>>> The crash is repeatable. I delete all the swift repos and clone them all
> >>>>> down and run the compile again and it crashes same place every time.
> >>>>> Someone please help me so I can feel a little less incompetent (or more
> >>>>> as the case may be).
> >>>>> 
> >>>>> [1] https://github.com/apple/swift-package-manager/pull/108
> >>>>> [2] https://gist.github.com/b91c66f8ace399292ac9
> >>>>> _______________________________________________
> >>>>> swift-build-dev mailing list
> >>>>> swift-build-dev at swift.org
> >>>>> https://lists.swift.org/mailman/listinfo/swift-build-dev
> >>>> 
> >>> _______________________________________________
> >>> swift-build-dev mailing list
> >>> swift-build-dev at swift.org
> >>> https://lists.swift.org/mailman/listinfo/swift-build-dev
> >> 
> 


More information about the swift-build-dev mailing list