# virtualbox-ose 4.3.8 build fails



## jyhpsycho (Mar 27, 2014)

Does anyone see this error? There's no any other error message but "Out of memory".
Is that requires more than 16GB memory for build?

I tried other versions of gcc not by default(4.7 currently). but, 4.6, 4.8, even 4.9 fails.
Prior ports - virtualbox-ose 4.3.6, 4.2.20 failed, too!


```
# make build
===>  Building for virtualbox-ose-4.3.8
cd /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8 && /bin/sh env.sh &&  VBOX_LIBPATH_X11=/usr/local VBOX_FREEBSD_SRC=/usr/src/sys /usr/local/bin/kmk -j4
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/bin/src/vboxdrv/include/iprt/crc.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/bin/src/vboxdrv/include/iprt/crc.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/dist/bin/src/vboxdrv/include/iprt/crc.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/dist/bin/src/vboxdrv/include/iprt/crc.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/bin/src/vboxdrv/include/iprt/net.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/bin/src/vboxdrv/include/iprt/net.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/dist/bin/src/vboxdrv/include/iprt/net.h'
/usr/local/share/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/dist/bin/src/vboxdrv/include/iprt/net.h'
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Pass - Programs
kBuild: Generating tstVMStructSize - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/obj/VMM/tstVMStructRC.h
kBuild: Generating tstVMStructSize - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/obj/VMM/tstAsmStructsRC.h
Out of memory
kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/obj/VMM/tstVMStructRC.h] Error 1
kmk: *** Deleting file `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.8/out/freebsd.amd64/release/obj/VMM/tstVMStructRC.h'
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/emulators/virtualbox-ose
*** Error code 1

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose
```


```
# uname -a
FreeBSD localhost 10.0-STABLE FreeBSD 10.0-STABLE #0: Sat Mar 22 22:02:55 KST 2014     root@localhost:/usr/obj/usr/src/sys/STABLE-CUSTOM  amd64
# sysctl -a | grep COMPAT
options	COMPAT_FREEBSD32
options	GEOM_PART_EBR_COMPAT
# gcc47 --version
gcc47 (FreeBSD Ports Collection) 4.7.3
Copyright (C) 2012 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.
# kmk --version
kmk - kBuild version 0.1.9998 (r0)

Based on GNU Make 3.82:
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

kBuild modifications:
 Copyright (c) 2005-2009 knut st. osmundsen.

kmkbuiltin commands derived from *BSD sources:
 Copyright (c) 1983 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
 Copyright (c) 1998  Todd C. Miller <Todd.Miller@courtesan.com>

KBUILD_PATH:     '/usr/local/share/kBuild' (default '/usr/local/share/kBuild')
KBUILD_BIN_PATH: '/usr/local/bin' (default '/usr/local/bin')

This program is a release build, built for freebsd/amd64/blend [Mar 27 2014 14:11:28]
```

Any ideas?


----------



## trh411 (Mar 28, 2014)

jyhpsycho said:
			
		

> There's no any other error message but "Out of memory". Is that requires more than 16GB memory for build?


I routinely build emulators/virtualbox-ose on an amd64 system with 6 GB of memory, so 16 GB is more than sufficient. Do you have swap defined? Are you running ZFS? What does top(1) or vmstat(8) show for free memory when this error occurs?


----------



## jyhpsycho (Mar 30, 2014)

> Do you have swap defined?


 - I don't use any swap space for general use. But, That occurs with 60GB(!) swap space, too.



> Are you running ZFS?


 - Yes. that's feature is good enough to compile test. That consumes much more memory than UFS, though...



> What does top(1) or vmstat(8) show for free memory when this error occurs?


 - That commands shows no any difference between before and after compile except ARC memory occupies nearly half of system RAM.


----------

