Skip to contentSkip to conversation

make creates a memory overflow

Buildroot Michael Fischer 2 participants 2 messages Oct 9, 2020 – Oct 13, 2020

lore
Share & tools
lore
#0 lore raw

Hello all,
I use VirtualBox with SuSE linux to compile Buildroot.

For my other projects I use the default make settings -j

/etc/environment
export MAKEOPTS='-j'
export MAKEFLAGS='-j'

When I use this, than buildroot crashes the Virtualbox with a memory overflow. > 8GB

I found this in the /package/Makefile

MAKE1 := $(HOSTMAKE) -j1

override MAKE = $(HOSTMAKE) \
        $(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))

I'm not sure but I think this should be

        $(if $(findstring j,$(filter-out -j%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))

Best regards
Michael.

#1 lore raw
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Michael" == Michael Fischer <[email protected]> writes:

Hello all,
I use VirtualBox with SuSE linux to compile Buildroot.

For my other projects I use the default make settings -j

/etc/environment
export MAKEOPTS='-j'
export MAKEFLAGS='-j'

That is not a safe setting. -j without a number tells make to use as many processes as it wants to use, which for a big thing like Buildroot can be a LOT. A more sensible setting is nr-of-CPUs (+1), which matches the default logic we have for BR2_JLEVEL.

Quoted 4 lines

When I use this, than buildroot crashes the Virtualbox with a memory overflow. > 8GB

I found this in the /package/Makefile

Quoted 8 lines

MAKE1 := $(HOSTMAKE) -j1

override MAKE = $(HOSTMAKE) \
        $(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))

I'm not sure but I think this should be

        $(if $(findstring j,$(filter-out -j%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))

No, the intention is for the logic to not get confused about variables passed on the make command line, as they are added to MAKEFLAGS after a -- seperator, E.G.:

make -k foo=j
MAKEFLAGS='k -- foo=j'

Signature · 1 line
Bye, Peter Korsgaard