GNU bug report logs -
#20632
Huge targets lead to E2BIG errors
Previous Next
To reply to this bug, email your comments to 20632 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#20632
; Package
libtool
.
(Fri, 22 May 2015 20:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Daniel Richard G." <skunk <at> iSKUNK.ORG>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Fri, 22 May 2015 20:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello Libtool peoples,
I am using the current version of Libtool (2.4.6) for a large, Automake-
based project. At one point, it builds a gigantic static archive library
from well over a thousand object files. On an older AIX system, the link
command fails with
$ gmake
/opt/freeware/bin/bash ../../libtool --tag=CC --mode=link gcc
-pipe -fno-common -W -Wall -mcpu=powerpc -O3 -ansi -avoid-version
-Wl,-bbigtoc -o libfoo.la -rpath /path/to/lib foo.lo bar.lo ...
/tmp/gmake-e2big.2kpTia: /opt/freeware/bin/bash: The parameter or
environment lists are too long.
Makefile:16591: recipe for target 'libfoo.la' failed
make: *** [libfoo.la] Error 126
This is using a patched version of GNU Make that works around its own
limitations with very long commands, detailed here:
https://savannah.gnu.org/bugs/index.php?44853
So the Make program is not at issue here; the "libtool --mode=link"
invocation itself is so long that the shell interpreter can't handle it.
Libtool does have an -objectlist argument that seems useful for cases
like this, and indeed with an appropriate edit to the Automake/Libtool-
generated rule, the link works:
libfoo.la: $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES) $(EXTRA_libfoo_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libfoo_la_LINK) -rpath $(libdir) $(libfoo_la_OBJECTS) $(libfoo_la_LIBADD) $(LIBS)
+ for obj in $(libfoo_la_OBJECTS); do echo $$obj; done >$@.list
+ $(AM_V_CCLD)$(libfoo_la_LINK) -rpath $(libdir) -objectlist $@.list $(libfoo_la_LIBADD) $(LIBS)
Automake/Libtool itself should generate a rule of this form
automatically if a target's list of dependent objects is large, or else
the rule is completely unusable on a system with command-length
limitations.
--Daniel
--
Daniel Richard G. || skunk <at> iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
This bug report was last modified 9 years and 354 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.