Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200072 - Azureus Build failed due to "Argument list too long"
Summary: Azureus Build failed due to "Argument list too long"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High major
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 200036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-23 12:35 UTC by Andreas Sahlbach
Modified: 2007-11-23 22:25 UTC (History)
4 users (show)

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


Attachments
the created command line that is way too long (commandline.txt,153.91 KB, text/plain)
2007-11-23 12:37 UTC, Andreas Sahlbach
Details
patched ebuild that fixes the too long argument bugs (azureus-3.0.3.4.ebuild,4.64 KB, text/plain)
2007-11-23 21:00 UTC, Andreas Sahlbach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sahlbach 2007-11-23 12:35:52 UTC
The ebuild just scans for all java files and puts them together with the installed jars found on the system into one big command line to call javac. This command line has too many arguments on my system (which has only 4(!) jars in the classpath). 

The ebuild should be changed to compile azureus so that the commandline is not 1 mile long. :)

Reproducible: Always

Steps to Reproduce:
1.emerge azureus >2.x
2.
3.

Actual Results:  
see attachment cmdline.txt

Expected Results:  
successful compilation

Portage 2.1.3.19 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22.1 i686)
=================================================================
System uname: 2.6.22.1 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
Timestamp of tree: Fri, 23 Nov 2007 02:46:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/jetty/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/init.d /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo.modulix.net/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.inf.elte.hu/ http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://mirror.gentoo.no/ "
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aim alsa apache2 arts avi bash-completion berkdb bitmap-fonts bluetooth browserplugin cairo cdr clamav cli cracklib crypt cups curl dba dga divx4linux dri dvb dvd dvdr dvdread emacs encode ethereal examples extensions ffmpeg flac flash foomaticdb fortran ftp gd gdbm gif gimp gphoto2 gpm gtk gtk2 iconv icq imagemagick imap innodb ipv6 isdnlog ithreads jabber java javascript jce jpeg jpg kde kdexdeltas ldap libg libwww log4j mad mbox midi mime ming mmx mp3 mpeg mpm-worker mudflap mysql mysqli mythtv ncurses nls nptl nptlonly nvidia offensive ogg oggvorbis opengl openmp oracle oss pam pch pcre pdf pdflib perl php png postfix ppds pppd python qt qt3 qt3support qt4 readline reflection samba sasl scanner server session skey slang sld slp smartcard soap spamassassin speex spell spl sse ssl tcpd theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb utempter vorbis win32codecx x86 xalan xerces xface xine xml xml2 xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="kbd mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" MISDN_CARDS="hfcpci" USERLAND="GNU" VIDEO_CARDS="mga vga vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andreas Sahlbach 2007-11-23 12:37:00 UTC
Created attachment 136761 [details]
the created command line that is way too long
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-11-23 14:21:34 UTC
(In reply to comment #1)
> Created an attachment (id=136761) [edit]
> the created command line that is way too long
> 

You probably have it shorter than the standard setting but I guess it doesn't hurt to change to passing the file list via a parameter file.
Comment 3 Andreas Sahlbach 2007-11-23 14:51:16 UTC
(In reply to comment #2)
> You probably have it shorter than the standard setting but I guess it doesn't
> hurt to change to passing the file list via a parameter file.
> 

I don't know of any setting I could increase. AFAIK there is no limit in the bash shell regarding cmd line limit and so I guess javac is complaining of the command line itself. I don't know of any setting for javac as well that I could improve. Do you?

So the only difference I can imagine are the 4 jars I have additionally in my classpath. But that's a very small part of the command line, which would mean your command line is near the limit, too.

So putting it in a temp file seems to be a good idea, I guess. 
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-11-23 15:20:58 UTC
*** Bug 200036 has been marked as a duplicate of this bug. ***
Comment 5 Seymore 2007-11-23 17:59:27 UTC
I have not changed any settings regarding the number or size of arguments in my shell, I still get this bug. I've been using azureus since forever on gentoo, and haven't run into this kind of problem before. Anyone got a temporary solution?
Comment 6 Constantin Baranov 2007-11-23 18:32:55 UTC
(In reply to comment #5)
> I have not changed any settings regarding the number or size of arguments in my
> shell, I still get this bug. I've been using azureus since forever on gentoo,
> and haven't run into this kind of problem before. Anyone got a temporary
> solution?
> 

Use ant or replace single ejavac command with for loop. I suppose ant is better way.
Comment 7 Bruce Munro 2007-11-23 20:05:36 UTC
(In reply to comment #5)
> I have not changed any settings regarding the number or size of arguments in my
> shell, I still get this bug. I've been using azureus since forever on gentoo,
> and haven't run into this kind of problem before. Anyone got a temporary
> solution?
> 

The max command line length is a constant compiled into the kernel, so the only way to increase the maximum command length for your system is to go and hack the value:

/usr/src/linux/include/linux/binfmts.h:#define MAX_ARG_PAGES 32

to something larger and rebuild your kernel. It's not even an option in the kernel .config file.

Seems a bit extreme to get this ebuild to work. Using ant would probably help, or doing something like:

find . -name \*.java | xargs javac

not exactly elegant, but gets around the command line limitation.
Comment 8 Andreas Sahlbach 2007-11-23 21:00:55 UTC
Created attachment 136807 [details]
patched ebuild that fixes the too long argument bugs

this ebuild writes the files to process into temporary files and calls the java and jar commands with @<tempfile>
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-11-23 22:25:03 UTC
Fixed with a slightly modified way. Thanks. In the future please post patches, not whole ebuilds.