Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64670 - Visualboyadvance-1.7.2 emerge error: Out of memory
Summary: Visualboyadvance-1.7.2 emerge error: Out of memory
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
Depends on:
Reported: 2004-09-19 12:18 UTC by Chris Nicola
Modified: 2006-09-29 08:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Nicola 2004-09-19 12:18:09 UTC
Emerge visualboyadvance 1.7.2 and 1.7.2-r1 both use an obscene amount of memory (>1Gig) and crash with an out of memory failure.

This is the last command run during the build:

  -c -o TestEmu.o `test -f 'TestEmu.cpp' || echo './'`TestEmu.cpp; \
then mv -f ".deps/TestEmu.Tpo" ".deps/TestEmu.Po"; \
else rm -f ".deps/TestEmu.Tpo"; exit 1; \
virtual memory exhausted: Cannot allocate memory
make[2]: *** [GBA.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/visualboyadvance-1.7.2-r1/work/VisualBoyAdvance-1.7.2/src/sdl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/visualboyadvance-1.7.2-r1/work/VisualBoyAdvance-1.7.2/src'
make: *** [all-recursive] Error 1

Reproducible: Always
Steps to Reproduce:
1.emerge visualboyadvance
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-09-19 12:19:35 UTC
reopen with the output from emerge --info
Comment 2 Chris Nicola 2004-09-19 12:35:30 UTC
Here is the output requested

Portage 2.0.51_rc1 (default-x86-2004.2, gcc-3.4.1, glibc-, 2.4.27-gentoo-r1 i686)
System uname: 2.4.27-gentoo-r1 i686 AMD Athlon(tm) XP 3200+
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r5
CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe"
FEATURES="autoaddcvs ccache sandbox"
USE="3dnow 3dnowex X aac acpi acpi4linux aim alsa apache2 apm audiofile avi berkdb bitmap-fonts bzlib cdr crypt cups dga directfb distcache dvd dvdr dvdread encode esd etwin exif faac faad fbcon ffmpeg flac foomaticdb gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 icq imap imlib immqt jack joystick jpeg latex libg++ libwww live mad mikmod mmx mmx2 motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mpeg4 msn nas ncurses net network nls nvidia offensive ofx oggvorbis openal opengl oscar oss pam pda pdflib perl png python quicktime readline rtc sdl slang smime spell sse ssl svg svga tcpd tetex theora truetype usb x86 xml2 xmms xprint xv xvid xvmc yahoo zlib"
Comment 3 Chris Nicola 2004-09-19 12:36:33 UTC
Forgot to reopen. Sorry
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-09-20 00:24:46 UTC
Does visualboyadvance-1.7.2 work?
Comment 5 Chris Nicola 2004-09-20 05:18:37 UTC
Nope as I have mentioned in the original post neither work.  Also the use flags gtk and mmx don't make any differnence either on or off.

I did however unpack the source tarbal and compile it with ./configure and make and it worked fine without using so much memory so it must be an ebuild problem.
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2004-09-20 12:24:10 UTC
i'm pretty suprised.  You're saying if you run configure with the same arguments as the ebuild that it works?
Comment 7 Chris Nicola 2004-09-20 14:19:12 UTC
No I am simply running it to see if it compiles at all.  The commands were simply:

Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2004-09-20 14:23:41 UTC
well, try it with the same options to configure.  If that fails, try to determine which option causes the large memory usage.
Comment 9 Chris Nicola 2004-09-20 19:52:59 UTC
Well I used the same configure string from the emerge without patching (there are two patches) and it crashed compiling the gtk frontend but didn't hog the memory.  Made it further this time too.

-Then I tried without gtk (i.e I left --enable-gtk=2.4 from the configure line) and success.
-Then I tried with the homedir patch without gtk (there is a patch for gtk in the other patch so I didn't bother) and again success.
-Then I tried with both patches without gtk and success.
-Then finally I tried both with gtk and again success (i.e. exact same configure string used by the emerge and both patches used by the emerge).

Since I had (I thought) tried both with and without gtk without success using emerge I tried the emerge again.  Same problem.  Must be something with the ebuild as I am using the same source package that it downloaded and the patches in /usr/portage/games-emulation/visualboyadvance/files.

I don't understand much about the ebuild file structure so I can't say much more.
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2004-09-21 01:32:01 UTC
Try it with MAKEOPTS="-j1" and see if that works via emerge.
Comment 11 Chris Nicola 2004-09-21 06:36:29 UTC
No luck.  Doesn't seem to have any affect.
Comment 12 SpanKY gentoo-dev 2004-09-21 20:01:45 UTC
could be an issue with all the CXXFLAGS you're [ab]using

a `./configure ; make` with no env CXXFLAGS would default to '-g -O2'
Comment 13 Chris Nicola 2004-09-22 07:00:02 UTC
LOL, Damn, you caught me!  It was -O3 as far as I can tell.  I went with the -O2 and march flags only and it is fine.  I feel pretty stupid.  However, I am definitely not the only Gentoo user with a flag abuse problem so it might be a good idea to override the flags in the ebuild if possible.

Thanks for all your help,
Comment 14 Chris Nicola 2004-09-22 10:54:19 UTC
Forgot to close. Sorry.
Comment 15 Maxim Grechkin 2006-02-13 07:48:48 UTC
Same probelm on AMD64 and gcc 3.4.4 ./configure && make (with -g-O2) doesn't work.
Comment 16 Maxim Grechkin 2006-02-13 07:55:48 UTC
First was -Os -march=k8 -fomit-frame-pointer -pipe than tried -O2 -pipe. Problem stays.
Comment 17 Maxim Grechkin 2006-02-14 06:23:29 UTC
Should I create new bug or you will reopen this? It doesn't compile on AMD64 but marked stable. gcc hungs memory compiling TestEmu.cpp
Comment 18 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-14 13:14:12 UTC
I guess we can investigate some more here since it seems people are still havign it (you all did emerge --sync, right?)
Comment 19 Maxim Grechkin 2006-02-15 05:08:51 UTC
Yes I did emerge --sync. To test more I added  line "rm -f src/sdl/TestEmu.cpp" to ebuild and tested again. Gcc eats memory compiling another file (unzip.cpp). And I of course patched Makefile to remove TestEmu.cpp
Comment 20 Asfand Yar Qazi 2006-03-04 17:07:57 UTC
This is NO LONGER THE CASE.  I used -march=pentium3 -O3 -mmmx -msse with gcc-3.4.5 by compiling the sources myself, and it works just fine.

Perhaps a check for gcc >= 3.4.5 in the ebuild will be good.

Also, what's with the use of --enable-c-core by default?  Us x86 users should get the benefit of the assembly core - a USE flag or other check for architecture version would be adequate, as it stands I find it unacceptable, and will be using my rolled-myself version that I compiled to test the -O3 theory.
Comment 21 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-29 08:10:50 UTC
I'm calling this "FIXED" since we no longer support 3.3 and 3.4/4.1 are stable now.