Skip to content

Compiling on a low spec VM #10

Closed
Closed

Description

@bodleytunes

Hi,
Trying to compile on a low resource VM in the cloud, only one gigabyte of memory allocated, seems to fail, pretty sure its lack of memory.
g++: internal compiler error: Killed (program cc1plus)
Are there any tweaks that will allow this to compile on a low spec machine such as this?
Cheers,
Jon.

Activity

  1. saifhhasan commented on Nov 29, 2017

    @saifhhasan
    Contributor

    We don't have experience in compiling in low spec VMs. It seems that GCC itself needs more memory for compiling source code. My suggestion would be to use more memory. (Or you can google for alternatives).

    You can run Open/R in low spec memory though.

    FYI: Please use template to create issues and if they are not Open/R related then prefer to Google it up :)

  2. bodleytunes commented on Nov 30, 2017

    @bodleytunes
    Author

    OK
    For future ref, this got it to compile:

    Created a swap partition for virtual mem of 2048

    139 sudo mkdir -p /var/cache/swap/
    140 sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=1M count=2048
    141 sudo chmod 0600 /var/cache/swap/swap0
    142 sudo mkswap /var/cache/swap/swap0
    143 sudo swapon /var/cache/swap/swap0

    Also added a cflag for good measure

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized --param ggc-min-expand=1 --param ggc-min-heapsize=32768")

    Saw the CFLAG example on a raspberry pi forum where the had similar errors and thought it may be applicable.

    Cheers,
    Jon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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