vapor / toolbox

Simplifies common command line tasks when using Vapor
MIT License
283 stars 85 forks source link

Building from source hangs indefinitely #449

Closed brandonmaul closed 3 months ago

brandonmaul commented 4 months ago

Describe the bug

Attempting to build from source (via make install) hanged indefinitely. After compiling the build file swiftc ./scripts/build.swift it would run ./build and never exit.

To Reproduce

I was using a dev container, so this is pretty easy to reproduce. Created a new dev container with Swift 5.9 selected from: https://github.com/swift-server/swift-devcontainer-template

I believe I had to install make using apt, since the dev container didn't have it by default.

Attempted to install vapor toolbox as listed out by the docs:

git clone https://github.com/vapor/toolbox.git
cd toolbox
git checkout 18.7.4
make install

Expected behavior

The toolbox would build and install appropriately

Environment

Swift 5.9.2-RELEASE

Additional context

Add any other context about the problem here.

gwynne commented 4 months ago

There is a known issue caused by the linker running out of memory which is the most common cause of this kind of problem; does your dev container have at least 2GiB of RAM allocated?

brandonmaul commented 4 months ago

@gwynne The dev container had 4GB of RAM allocated at the time.

I fabricated a fix by modifying the /scripts/build.swift file. and opened it in PR #450