`crystal spec` fails with "cannot allocate memory"

I got crystal to compile on Ubuntu with the HEAD from GitHub.

Then I tried crystal spec, and I get zillions of these:

Unhandled exception in spawn: fork: Cannot allocate memory (Errno)
  from src/process.cr:0:7 in 'fork_internal:will_exec'
  from src/compiler/crystal/compiler.cr:88:14 in '->'
  from src/fiber.cr:255:3 in 'run'
  from src/fiber.cr:48:34 in '->'
  from ???

I have 12 gigabytes of memory (because I shelled out for a notebook capable of running Android Studio, to write Android apps), so I doooon’t think it’s really the memory that I’m out of.


I ran bin/crystal spec, and got the first lockup I ever had so far on my new ThinkPad T450…

1 Like

For the compiler itself you need to use $ make std_spec or $ make compiler_spec.

(After a pause to install libgc-dev…) I now get:

$ make std_spec
Using /usr/bin/llvm-config-7 [version=7.0.0]
./bin/crystal build  -o .build/std_spec spec/std_spec.cr
Using compiled compiler at `.build/crystal'
Unhandled exception in spawn: fork: Cannot allocate memory (Errno)
  from src/process.cr:0:7 in 'fork_internal:will_exec'
  from src/compiler/crystal/compiler.cr:88:14 in '->'
  from src/fiber.cr:255:3 in 'run'
  from src/fiber.cr:48:34 in '->'
  from ???