I am not able to succesfully emerge the new eclipse package. I think that the cause lies in out of memory errors in the heap space of the vm (I tried different ones), but this looks strange as I have 2GB ram and more than 2GB swap active. I'm trying the emerge on a amd64 laptop. I'm attaching the full build log. Hope someone can help! Reproducible: Always Steps to Reproduce: 1.Try to emerge =eclipse-sdk-3.5.1
Created attachment 213113 [details] Complete emerge log
(In reply to comment #0) > I think that the cause lies in out of memory errors in the heap space of the vm > (I tried different ones), but this looks strange as I have 2GB ram and more > than 2GB swap active. Yes, but how much of that do you have free?
Why on Earth did you roll that log up into a tarball?
Created attachment 213388 [details] gzipped build log
I have similar problem!! using amd64 and have 2 GB of RAM. I tried emerging it many times but I keep getting outofmemory heap exceptions... Have attached my build log and environment file. pasted below is my emerge --info localhost fornix # emerge --info Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-1.12.13 Timestamp of tree: Fri, 18 Dec 2009 05:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.9-r1 dev-lang/python: 2.6.4 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.c3sl.ufpr.br/ http://gentoo.mirror.pw.edu.pl/ http://gentoo.wetzlmayr.com/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam ffmpeg firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv jpeg kde ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcl tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 213412 [details] build.log and environment file My build.log and environment file.
Looks like the ebuild's check_reqs should be requiring more than 1.5 GB of RAM. I have 8 GB (and no swap), and I've never gotten an OutOfMemoryError, even without the explicit ANT_OPTS='-Xmx512M'. All the people reporting OOMEs seem to have small amounts of RAM+swap.
(In reply to comment #3) > Why on Earth did you roll that log up into a tarball? > because it was too big to post it in plain text! Anyway I tried again checking the amount of free memory during compilation using free -t. Before emerging (with no X running) I get this output: total used free Mem: 2058048 1095168 962880 Swap: 2915788 36132 2879656 Total: 4973836 1131300 3842536 With "emerge -1 eclipse-sdk" running, I noticed that the free ram went down to about 16M, but the free swap never sank below about 1,6G, even when the outofmem error happened.
(In reply to comment #8) > Anyway I tried again checking the amount of free memory during compilation > using free -t. > Before emerging (with no X running) I get this output: > > total used free > Mem: 2058048 1095168 962880 > Swap: 2915788 36132 2879656 > Total: 4973836 1131300 3842536 > > With "emerge -1 eclipse-sdk" running, I noticed that the free ram went down to > about 16M, but the free swap never sank below about 1,6G, even when the > outofmem error happened. > Same observation by me. the free Memory was constantly around 14 - 16 MB during emerging but swap remained close to 1.7 GB free throughout! But initially lot of code got compiled when the memory available was 14 - 16MB.
This looks strange to me.. Why doesn't the jvm use some more system memory (as long as there's a lot of still available, even if it is swap) instead of going out of memory? > > Same observation by me. the free Memory was constantly around 14 - 16 MB during > emerging but swap remained close to 1.7 GB free throughout! > But initially lot of code got compiled when the memory available was 14 - 16MB. >
Can you change this line ANT_OPTS='-Xmx512M' eant -DbuildArch=${arch} in the src_compile function to ANT_OPTS='-Xmx1024M' eant -DbuildArch=${arch} run ebuild eclipse-sdk-3.5.1.ebuild manifest and then attempt to install again.
(In reply to comment #11) > Can you change this line > > ANT_OPTS='-Xmx512M' eant -DbuildArch=${arch} > > in the src_compile function to > > ANT_OPTS='-Xmx1024M' eant -DbuildArch=${arch} > > run ebuild eclipse-sdk-3.5.1.ebuild manifest > > and then attempt to install again. > I tried changing ANT_OPTS in src_compile function in the ebuild to 1024M and can confirm that I still get OutOfMemoryError :(
(In reply to comment #12) > (In reply to comment #11) > > Can you change this line > > > > ANT_OPTS='-Xmx512M' eant -DbuildArch=${arch} > > > > in the src_compile function to > > > > ANT_OPTS='-Xmx1024M' eant -DbuildArch=${arch} > > > > run ebuild eclipse-sdk-3.5.1.ebuild manifest > > > > and then attempt to install again. > > > > I tried changing ANT_OPTS in src_compile function in the ebuild to 1024M and > can confirm that I still get OutOfMemoryError :( > I tried the same even with ANT_OPTS='-Xmx2048M' eant -DbuildArch=${arch} but still get OutOfMemoryError
Same results here, increasing the -Xmx parameter doesn't bring any improvement.. The emerge still fails.. > I tried the same even with ANT_OPTS='-Xmx2048M' eant -DbuildArch=${arch} > but still get OutOfMemoryError >
Created attachment 215608 [details] Ebuild file amended to apply jvmarg patch from files directory
Created attachment 215610 [details, diff] Patch to add jvmarg to build.xml so that forked jvm has larger heap size. Place in files directory
I have a working solution to this problem. It appears that the ant build.xml forks a new jvm to perform various parts of the build. The forked jvm don't inherit the heap size or use the ANT_OPTS heap size. The solution adds a jvmarg to the ant java task that runs out of memory to increase the heap size to 512M. To apply make a copy of the ebuild into an portage overlay (I am assuming that everyone knows how this is done from the thread above). Download the new eclipse-sdk-3.5.1.ebuild and replace the existing one (the only changes I have made are to apply the patch). Download the jvmarg.patch into the files folder. Run ebuild eclipse-sdk-3.5.1.ebuild manifest Then emerge eclipse-sdk Hopefully this will complete successfully
(In reply to comment #17) > I have a working solution to this problem. > > It appears that the ant build.xml forks a new jvm to perform various parts of > the build. > > The forked jvm don't inherit the heap size or use the ANT_OPTS heap size. > > The solution adds a jvmarg to the ant java task that runs out of memory to > increase the heap size to 512M. > > To apply make a copy of the ebuild into an portage overlay (I am assuming that > everyone knows how this is done from the thread above). > > Download the new eclipse-sdk-3.5.1.ebuild and replace the existing one (the > only changes I have made are to apply the patch). > > Download the jvmarg.patch into the files folder. > > Run > > ebuild eclipse-sdk-3.5.1.ebuild manifest > > Then > > emerge eclipse-sdk > > Hopefully this will complete successfully > Voila!! It did emerge successfully after using your ebuild and patch!! I can confirm that it works for me. All my previous attempts at emerging eclipse-3.5.1 had failed.
It still fails here.. Now the build seems to succeed, but during the install phase I get: !!! dobin: /usr/portage/local/mine/dev-util/eclipse-sdk/files/3.5/eclipse-3.5 does not exist Could it be due to some mistake in the ebuild code? > Voila!! > It did emerge successfully after using your ebuild and patch!! > I can confirm that it works for me. All my previous attempts at emerging > eclipse-3.5.1 had failed. >
(In reply to comment #19) > It still fails here.. > Now the build seems to succeed, but during the install phase I get: > > !!! dobin: /usr/portage/local/mine/dev-util/eclipse-sdk/files/3.5/eclipse-3.5 > does not exist > > Could it be due to some mistake in the ebuild code? User error. You need to extract ALL the files, not just the ebuild.
You're right, this was a stupid mistake.. I'm trying again after adding the missing dir to my overlay from the portage tree.. Thanks.. (In reply to comment #20) > (In reply to comment #19) > > It still fails here.. > > Now the build seems to succeed, but during the install phase I get: > > > > !!! dobin: /usr/portage/local/mine/dev-util/eclipse-sdk/files/3.5/eclipse-3.5 > > does not exist > > > > Could it be due to some mistake in the ebuild code? > > User error. You need to extract ALL the files, not just the ebuild. >
Build successful here too now! I think the ebuild with the patch should be pushed to the portage tree and stabilized asap.. Thanks to everybody who helped oh this bug.. (In reply to comment #21) > You're right, this was a stupid mistake.. > I'm trying again after adding the missing dir to my overlay from the portage > tree.. > Thanks.. > > (In reply to comment #20) > > (In reply to comment #19) > > > It still fails here.. > > > Now the build seems to succeed, but during the install phase I get: > > > > > > !!! dobin: /usr/portage/local/mine/dev-util/eclipse-sdk/files/3.5/eclipse-3.5 > > > does not exist > > > > > > Could it be due to some mistake in the ebuild code? > > > > User error. You need to extract ALL the files, not just the ebuild. > > >
(In reply to comment #22) > Build successful here too now! > I think the ebuild with the patch should be pushed to the portage tree and > stabilized asap.. > Thanks to everybody who helped oh this bug.. Stand by. I'll implement the patch using a sed_xml_element call in the ebuild. It'll be more future-proof that way.
Created attachment 216024 [details, diff] ebuild patch to add jvmarg elements to build.xml The attached patch is based on the ebuild currently in the Portage tree. The patch adds a new call to sed_xml_element that inserts <jvmarg value="-Xmx512m" /> elements in all <java> elements that do not already contain an -Xmx jvmarg.
*** Bug 299693 has been marked as a duplicate of this bug. ***
(In reply to comment #22) > Build successful here too now! > I think the ebuild with the patch should be pushed to the portage tree and > stabilized asap.. > Thanks to everybody who helped oh this bug.. (First: Sorry, I posted this to the wrong bug (the old one), this should be the better place. My fault!) I tried to emerge eclipse-sdk-1.5.1 from portage (no patches from this bug) and did not succeed. But I have succeeded at last by unmerging all java stuff first. Something was wrong with some java package, but I have absolutely no idea what. The following did the trick and eclipse-sdk-1.5.1 emerged at last from portage tree without tweaking: (I did not sync in the meantime) # emerge --unmerge eclipse-sdk `eix -I --only-names -C *java*` ; autounmask dev-util/eclipse-sdk-1.5.1 ; emerge eclipse-sdk Only thing I am wondering is, that it emerged sun-sdk-1.5, but icedtea6-bin instead of sun-jdk-1.6 although I have the appropriate license entries. But that's in order as long as eclipse is working properly now.
(In reply to comment #26) > Only thing I am wondering is, that it emerged sun-sdk-1.5, but icedtea6-bin > instead of sun-jdk-1.6 although I have the appropriate license entries. But > that's in order as long as eclipse is working properly now. You should be able to emerge sun-jdk-1.6 if you have the following in your /etc/portage/package.license: dev-java/sun-jdk dlj-1.1 If you have USE=jce, you would also need: dev-java/sun-jce-bin sun-bcla-java-vm
(In reply to comment #27) > (In reply to comment #26) > > Only thing I am wondering is, that it emerged sun-sdk-1.5, but icedtea6-bin > > instead of sun-jdk-1.6 although I have the appropriate license entries. But > > that's in order as long as eclipse is working properly now. > > You should be able to emerge sun-jdk-1.6 if you have the following in your > /etc/portage/package.license: > > dev-java/sun-jdk dlj-1.1 > > If you have USE=jce, you would also need: > > dev-java/sun-jce-bin sun-bcla-java-vm > Yes, you are right and thats my entry in package.license. I simply unmerged icedtea6-bin and virtual/jdk:1.6 and then re-emerged virtual/jdk:1.6 which pulled in the sun-jdk. Odd that it did not do that in the first place. But I was, unfortunately, so determined to see whether eclipse builds successfully now, that I didn't care to use --tree to find out why it pulled in icedtea6-bin. However, eclipse is working like a charm now!
Added jvmarg.patch to tree. Using this patch instead of the sed one as this can be pushed upstream to eclipse. Matt or Cybercide would you please do this. Im not sure what component this should be added to and am far too tired to try.
Sorry, closing.
(In reply to comment #29) > Added jvmarg.patch to tree. Using this patch instead of the sed one as this > can be pushed upstream to eclipse. The jvmarg.patch file attached to this bug is not as complete as the changes the sed script makes. The sed script adds jvmarg in multiple places, whereas the patch only covers one. Also, the patch will have to be changed with every incremental release of Eclipse due to the file path containing a version number. > Matt or Cybercide would you please do this. Im not sure what component this > should be added to and am far too tired to try. It should go to Eclipse-build of the Eclipse Linux-Tools project. I'll submit a bug report for it and post the bug URL here momentarily.
(In reply to comment #31) > It should go to Eclipse-build of the Eclipse Linux-Tools project. I'll submit > a bug report for it and post the bug URL here momentarily. https://bugs.eclipse.org/bugs/show_bug.cgi?id=302256