Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

High memory usage during compilation #75

@nicktimko

Description

@nicktimko

I've been having some trouble (pip) installing libsass in a container, seemingly because the compiler runs out of memory (my Docker host VM has about 300 MB free) and gets killed.

$ docker run -i -t python:3.4 pip install libsass
Collecting libsass
  Downloading libsass-0.8.2.tar.gz (229kB)
    100% |████████████████████████████████| 229kB 2.0MB/s
...
    gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./libsass -I/usr/local/include/python3.4m -c libsass/extend.cpp -o build/temp.linux-x86_64-3.4/libsass/extend.o -c -O3 -fPIC -std=c++0x -Wall -Wno-parentheses
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    gcc: internal compiler error: Killed (program cc1plus)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
    error: command 'gcc' failed with exit status 4

    ----------------------------------------
Command "/usr/local/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4ymrmerb/libsass/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record
/tmp/pip-bdkglgjs-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-4ymrmerb/libsass

By way of comparison (not sure if it's a valid comparison or not), Numpy compiles just fine, using less than half the memory when trying to compile libsass. Can any compilation arguments be added to allow building on more meager VMs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions