I cannot compile hello world with g++ in minix 3 - Minix

This is a discussion on I cannot compile hello world with g++ in minix 3 - Minix ; If i do: g++ -o hello hello.cpp, I get g++: error trying to exec 'usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/cc1':execv: Not enough core collect2: gcc returned 1 exit status ----------------------- I have looked at google groups for information about this, but when people fix there ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: I cannot compile hello world with g++ in minix 3

  1. I cannot compile hello world with g++ in minix 3

    If i do: g++ -o hello hello.cpp,
    I get
    g++: error trying to exec
    'usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/cc1':execv:
    Not enough core
    collect2: gcc returned 1 exit status
    -----------------------

    I have looked at google groups for information about this, but when
    people fix there problem they dont bother posting the solution for
    anyone else to read. I cannot find any solution to this problem.

    All i know is that cc1 may need a adjustment with 'chmem'. Is this right?

    If it is right can anyone please clearly post the exact instructions
    needed to get g++ to work. What exact value needs to go with chmem? and
    please show me how this should look on the command line.

    why does this not work automatically?

  2. Re: I cannot compile hello world with g++ in minix 3

    > All i know is that cc1 may need a adjustment with 'chmem'. Is this right?
    >
    > If it is right can anyone please clearly post the exact instructions
    > needed to get g++ to work. What exact value needs to go with chmem? and
    > please show me how this should look on the command line.


    Yes, this looks like a situation where chmem will be needed. I cannot
    give you any exact numbers, not can anyone else, because it depends on
    the amount of memory in your system as well as the size of the largest
    program you will want to compile. Getting the value right is a matter
    of experimentation.

    The error message claims that exec failed. This means that Minix
    failed to allocate phyical memory for the process, so your system has
    too little memory to run cc1 with its current memory allocation. You
    will need to decrease the chmem value until it does run. Note that
    decreasing this will probably also decrease the size of the largest
    program gcc will be able to compile, so you need to find the highest
    value that works.

    You will recognize that the amount of memory is too low if malloc
    fails (not sure whether this will be stated explicitly in the error
    message though).

    If you are running some large program at the same time (like X) could
    alernatively kill it/not start it/reduce its chmem value and restart
    it.

    With kind regards,
    Erik

  3. Re: I cannot compile hello world with g++ in minix 3

    Erik van der Kouwe wrote:

    > The error message claims that exec failed. This means that Minix
    > failed to allocate phyical memory for the process, so your system has
    > too little memory to run cc1 with its current memory allocation. You
    > will need to decrease the chmem value until it does run.


    I dont understand this error:

    g++: error trying to exec
    '/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/cc1': execv:
    Not enough core
    Collect 2:gcc returned 1 exit status.

    My computer has 128mb of ram plugged in.
    this cc1 is set to 131072000 bytes - ie 125 mb
    g++ has set 524880 bytes - ie 5mb

    (i dont understand what cc1 has to do with g++ anyway) but is this
    message mean that the ram is not available cause its taken up with
    running the computer?

    Are you sure i need to reduce this with chmem, because the message says
    'not enough' core - should it be increased?

    thanks

  4. Re: I cannot compile hello world with g++ in minix 3

    > My computer has 128mb of ram plugged in.
    > this cc1 is set to 131072000 bytes - ie 125 mb
    > g++ has set 524880 bytes - ie 5mb
    >
    > (i dont understand what cc1 has to do with g++ anyway) but is this
    > message mean that the ram is not available cause its taken up with
    > running the computer?
    >
    > Are you sure i need to reduce this with chmem, because the message says
    > 'not enough' core - should it be increased?


    There are two possibilities:
    - the OS has run out of memory to allocate a new process: chmem is too
    high
    - the program has run out of memory to malloc buffers: chmem is too
    low

    exec failing means that it is the former here, so indeed your 128 MB
    is not enough with current chmem settings. You can use chmem +0
    to check current memory allocated for a binary BTW.

    With kind regards,
    Erik

  5. Re: I cannot compile hello world with g++ in minix 3

    Erik van der Kouwe wrote:
    >> My computer has 128mb of ram plugged in.
    >> this cc1 is set to 131072000 bytes - ie 125 mb
    >> g++ has set 524880 bytes - ie 5mb
    >>
    >> (i dont understand what cc1 has to do with g++ anyway) but is this
    >> message mean that the ram is not available cause its taken up with
    >> running the computer?
    >>
    >> Are you sure i need to reduce this with chmem, because the message says
    >> 'not enough' core - should it be increased?

    >
    > There are two possibilities:
    > - the OS has run out of memory to allocate a new process: chmem is too
    > high
    > - the program has run out of memory to malloc buffers: chmem is too
    > low
    >
    > exec failing means that it is the former here, so indeed your 128 MB
    > is not enough with current chmem settings. You can use chmem +0
    > to check current memory allocated for a binary BTW.
    >
    > With kind regards,
    > Erik

    Thanks - i understand now. cc1 is a alias for g++? i Reduce the size by
    half this process ask for and it works now

  6. Re: I cannot compile hello world with g++ in minix 3

    please help me wrote:
    > Thanks - i understand now. cc1 is a alias for g++? i Reduce the size by
    > half this process ask for and it works now


    Transforming source code into binary using gcc usually involves several
    processes: a preprocessor, a compiler, an assembler and a linker. cc1 is
    the compiler. The preprocessor is called cpp, the assembler as and the
    linker ld.

    Regards,

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
    "[In the end, people] get furious at IT that the goddamn magic isn't working"
    -- Stewart Dean

  7. Re: I cannot compile hello world with g++ in minix 3

    > Transforming source code into binary using gcc usually involves several
    > processes: a preprocessor, a compiler, an assembler and a linker. cc1 is
    > the compiler. The preprocessor is called cpp, the assembler as and the
    > linker ld.


    There is also collect2, which serves as some kind of driver for ld.

    Roman.


+ Reply to Thread