OpenWrt Forum Archive

Topic: Experimental doesn't compile

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I get the following error trying to compile the experimental image and I get right away an error:

[gus@comp buildroot]$ make
cp .config .config.test
scripts/configtest.pl
make -j1 -C target prepare
make[1]: Entering directory `/home/gus/development/misc/OpenWRT/snapshot/experimental/buildroot/target'
make[1]: *** virtual memory exhausted.  Stop.
make[1]: Leaving directory `/home/gus/development/misc/OpenWRT/snapshot/experimental/buildroot/target'

Make is up to date:

[gus@comp buildroot]$ make -v
GNU Make 3.80

The linux platform is Mandrake 10.1.

Does anybody have an idea of what's going on?

Guillaume.

I think your clue is here:

make[1]: *** virtual memory exhausted.  Stop. 

Do you have swap space? Enough RAM?

Humm.. The error message doesn't seem believable.

$ free
            total       used       free     shared    buffers     cached
Mem:        514628     501392      13236          0      62880      72812
-/+ buffers/cache:     365700     148928
Swap:      1060208      77496     982712

Aren't 1Gb of cache and 360Mb of available RAM enough to build it?

I have the strange feeling that make is going crazy. A make -d gives a lot of output (1152 lines) and many of them say something like: "Trying pattern rule with stem ...".

I don't know what does it though. I was wondering if anybody had ever got that problem before and how they solved it.

Guillaume.

Did you ever solved this?
I have currently the same problem.
Building latest cvs sources stops with "make[1]: *** virtual memory exhausted.".
But building experimental.tar.bz2 from 23-Apr-2005 works.

Just as a baseline, experimental builds for me no problems

             total       used       free     shared    buffers     cached
Mem:        508756     497284      11472          0     119860     123472
-/+ buffers/cache:     253952     254804
Swap:      2000084       2804    1997280

Add a 1G swapfile and see if this fixes the problem.

I'm assuming you first did

make menuconfig

(Last edited by frogzoo on 17 May 2005, 02:00)

I've got the same problem with the experimental HEAD cvs. Here the debug output of make:

georg@hunapu:~/WRT54G/experimental/openwrt/package/bridge$ TOPDIR=/home/georg/WR
T54G/experimental/openwrt make -d compile
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `/home/georg/WRT54G/experimental/openwrt/rules.mk' (search path) (no ~ expansion)...
Reading makefile `/home/georg/WRT54G/experimental/openwrt/.config' (search path) (no ~ expansion)...
Got a SIGCHLD; 1 unreaped children.
Reading makefile `/home/georg/WRT54G/experimental/openwrt/package/rules.mk' (search path) (no ~ expansion)...
make: *** virtual memory exhausted.  Stop.
georg@hunapu:~/WRT54G/experimental/openwrt/package/bridge$

frogzoo wrote:

Add a 1G swapfile and see if this fixes the problem.

I don't believe that it is a matter of memory. I have 512 MiB of RAM and the same amount of swap.
And the error doesn't appear during compiling, it always appears right after make enters a directory.

(Last edited by sternst on 17 May 2005, 12:22)

I have the same problem (virtual memory exhausted) on
slackware 10.0
GNU Make 3.80
gcc version 3.3.4

Setting 1GB swap doesn't help.

experimental.tar.bz2 from 23-Apr-2005 compiles ok.

I solved it.

It is a known make bug and a patch against 3.80 is available since Oct-2002.
Having this problem implies that the make in your distribution was build without the patch.

I, for example, use Gentoo and updating the make package from 3.80 to 3.80-r1 solved the problem.

Yeah, I ran into this last night trying to build HEAD, too.  Here's a nice page explaining the problem and the fix for it: http://gamecontractor.org/Make

He's using the Cygwin version, but his neat little test works just fine on my broken version of make 3.80 (Slackware 10).

I didn't feel like building a new version of make and/or binutils at that moment, so I just tracked down an RPM from SuSE containing a working binary and used that.

-- Nathan

The discussion might have continued from here.