When emerging perl-5.8.0-r12 on a clean x86 arch system, I get these errors, lots of errors on compilation, and it finally fails, after about 10 minutes or so (it's an older computer): ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for perl.o.: command not found ./makedepend: line 105: #line 1 "perl.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for perly.o.: command not found ./makedepend: line 105: #line 1 "perly.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp.o.: command not found ./makedepend: line 105: #line 1 "pp.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp_hot.o.: command not found ./makedepend: line 105: #line 1 "pp_hot.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp_ctl.o.: command not found ./makedepend: line 105: #line 1 "pp_ctl.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp_sys.o.: command not found ./makedepend: line 105: #line 1 "pp_sys.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for regcomp.o.: command not found ./makedepend: line 105: #line 1 "regcomp.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for regexec.o.: command not found ./makedepend: line 105: #line 1 "regexec.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for utf8.o.: command not found ./makedepend: line 105: #line 1 "utf8.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for gv.o.: command not found ./makedepend: line 105: #line 1 "gv.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for sv.o.: command not found ./makedepend: line 105: #line 1 "sv.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for taint.o.: command not found ./makedepend: line 105: #line 1 "taint.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for toke.o.: command not found ./makedepend: line 105: #line 1 "toke.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for util.o.: command not found ./makedepend: line 105: #line 1 "util.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for deb.o.: command not found ./makedepend: line 105: #line 1 "deb.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for run.o.: command not found ./makedepend: line 105: #line 1 "run.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for universal.o.: command not found ./makedepend: line 105: #line 1 "universal.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for xsutils.o.: command not found ./makedepend: line 105: #line 1 "xsutils.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for globals.o.: command not found ./makedepend: line 105: #line 1 "globals.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for perlio.o.: command not found ./makedepend: line 105: #line 1 "perlio.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for perlapi.o.: command not found ./makedepend: line 105: #line 1 "perlapi.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for numeric.o.: command not found ./makedepend: line 105: #line 1 "numeric.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for locale.o.: command not found ./makedepend: line 105: #line 1 "locale.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp_pack.o.: command not found ./makedepend: line 105: #line 1 "pp_pack.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for pp_sort.o.: command not found ./makedepend: line 105: #line 1 "pp_sort.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for miniperlmain.o.: command not found ./makedepend: line 105: #line 1 "miniperlmain.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 104: Finding dependencies for perlmain.o.: command not found ./makedepend: line 105: #line 1 "perlmain.c": command not found ./makedepend: line 106: -n: command not found ./makedepend: line 130: -e: command not found ./makedepend: line 148: $mf: ambiguous redirect make[2]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0' echo Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH makedir.SH myconfig.SH writemain.SH pod/Makefile.SH | tr ' ' '\n' >.shlist make[2]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0' ./makedepend: line 157: -v: command not found ./makedepend: line 160: -v: command not found ./makedepend: line 163: -v: command not found ./makedepend: line 166: -v: command not found ./makedepend: line 169: -s: command not found make[2]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0' echo EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h utf8.h warnings.h | tr ' ' '\n' >.hlist make[2]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0' ./makedepend: line 182: You don't seem to have a proper C preprocessor. Using grep instead.: command not found ./makedepend: line 183: ^#include : command not found ./makedepend: line 184: Updating ...: command not found ./makedepend: line 185: -n: command not found ./makedepend: line 191: -n: command not found ./makedepend: line 192: -n: command not found ./makedepend: line 193: s|^[^;]*/||: No such file or directory ./makedepend: line 194: -f: command not found ./makedepend: line 195: -n: command not found ./makedepend: line 196: -f: command not found ./makedepend: line 202: -f: command not found ./makedepend: line 203: .old: command not found ./makedepend: line 204: -f: command not found ./makedepend: line 205: .new: command not found ./makedepend: line 206: .new: command not found ./makedepend: line 207: $mf: ambiguous redirect ./makedepend: line 208: -rf: command not found test -s perlmain.c && touch perlmain.c cd x2p; make depend make[2]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' sh ../makedepend MAKE=make ../makedepend: ../config.sh: line 91: syntax error near unexpected token `(' ../makedepend: ../config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' ../makedepend: line 48: -f: command not found cp: missing destination file Try `cp --help' for more information. ../makedepend: line 1: $mf: ambiguous redirect ../makedepend: line 82: -d: command not found mkdir: cannot create directory `UU': File exists make[3]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' echo hash.c str.c util.c walk.c | tr ' ' '\n' >.clist make[3]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' ../makedepend: line 104: Finding dependencies for hash.o.: command not found ../makedepend: line 105: #line 1 "hash.c": command not found ../makedepend: line 106: -n: command not found ../makedepend: line 130: -e: command not found ../makedepend: line 104: Finding dependencies for str.o.: command not found ../makedepend: line 105: #line 1 "str.c": command not found ../makedepend: line 106: -n: command not found ../makedepend: line 130: -e: command not found ../makedepend: line 104: Finding dependencies for util.o.: command not found ../makedepend: line 105: #line 1 "util.c": command not found ../makedepend: line 106: -n: command not found ../makedepend: line 130: -e: command not found ../makedepend: line 104: Finding dependencies for walk.o.: command not found ../makedepend: line 105: #line 1 "walk.c": command not found ../makedepend: line 106: -n: command not found ../makedepend: line 130: -e: command not found ../makedepend: line 148: $mf: ambiguous redirect make[3]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' echo Makefile.SH cflags.SH | tr ' ' '\n' >.shlist make[3]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' ../makedepend: line 157: -v: command not found ../makedepend: line 160: -v: command not found ../makedepend: line 163: -v: command not found ../makedepend: line 166: -v: command not found ../makedepend: line 169: -s: command not found make[3]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' echo EXTERN.h INTERN.h ../config.h ../handy.h hash.h a2p.h str.h util.h | tr ' ' '\n' >.hlist make[3]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' ../makedepend: line 182: You don't seem to have a proper C preprocessor. Using grep instead.: command not found ../makedepend: line 183: ^#include : command not found ../makedepend: line 184: Updating ...: command not found ../makedepend: line 185: -n: command not found ../makedepend: line 191: -n: command not found ../makedepend: line 192: -n: command not found ../makedepend: line 193: s|^[^;]*/||: No such file or directory ../makedepend: line 194: -f: command not found ../makedepend: line 195: -n: command not found ../makedepend: line 196: -f: command not found ../makedepend: line 202: -f: command not found ../makedepend: line 203: .old: command not found ../makedepend: line 204: -f: command not found ../makedepend: line 205: .new: command not found ../makedepend: line 206: .new: command not found ../makedepend: line 207: $mf: ambiguous redirect ../makedepend: line 208: -rf: command not found make[2]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' make[1]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0' `sh cflags "optimize='-O3 -march=pentium2 -funroll-loops -pipe'" miniperlmain.o` miniperlmain.c cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -march=pentium2 -funroll-loops -pipe cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' `sh cflags "optimize='-O3 -march=pentium2 -funroll-loops -pipe'" perl.o` perl.c cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -march=pentium2 -funroll-loops -pipe cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' `sh cflags "optimize='-O3 -march=pentium2 -funroll-loops -pipe'" gv.o` gv.c cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -march=pentium2 -funroll-loops -pipe cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' `sh cflags "optimize='-O3 -march=pentium2 -funroll-loops -pipe'" toke.o` toke.c cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -march=pentium2 -funroll-loops -pipe cflags: ./config.sh: line 91: syntax error near unexpected token `(' cflags: ./config.sh: line 91: `d_Gconvert='gcvt((x),(n),(b))'' make[1]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' ../miniperl -I../lib s2p.PL Extracting s2p (with variable substitutions) Linking s2p to psed. make[1]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' ./miniperl -Ilib pod/pod2html.PL Extracting pod2html (with variable substitutions) ./miniperl -Ilib pod/pod2latex.PL Extracting pod2latex (with variable substitutions) ./miniperl -Ilib pod/pod2man.PL Extracting pod2man (with variable substitutions) ./miniperl -Ilib pod/pod2text.PL Extracting pod2text (with variable substitutions) ./miniperl -Ilib pod/pod2usage.PL Extracting pod2usage (with variable substitutions) ./miniperl -Ilib pod/podchecker.PL Extracting podchecker (with variable substitutions) ./miniperl -Ilib pod/podselect.PL Extracting podselect (with variable substitutions) ./miniperl -Ilib pod/buildtoc.PL Extracting buildtoc (with variable substitutions) Making utilities make[1]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/utils' ../miniperl -I../lib c2ph.PL Extracting c2ph (with variable substitutions) Linking c2ph to pstruct. ../miniperl -I../lib h2ph.PL Extracting h2ph (with variable substitutions) ../miniperl -I../lib h2xs.PL Extracting h2xs (with variable substitutions) ../miniperl -I../lib perlbug.PL Extracting perlbug (with variable substitutions) ../miniperl -I../lib perldoc.PL Extracting perldoc (with variable substitutions) ../miniperl -I../lib perlivp.PL Extracting perlivp (with variable substitutions) ../miniperl -I../lib pl2pm.PL Extracting pl2pm (with variable substitutions) ../miniperl -I../lib splain.PL Extracting splain (with variable substitutions) ../miniperl -I../lib perlcc.PL Extracting perlcc (with variable substitutions) ../miniperl -I../lib dprofpp.PL Extracting dprofpp (with variable substitutions) ../miniperl -I../lib libnetcfg.PL Extracting libnetcfg (with variable substitutions) ../miniperl -I../lib piconv.PL Extracting piconv (with variable substitutions) ../miniperl -I../lib enc2xs.PL Extracting enc2xs (with variable substitutions) make[1]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/utils' Making x2p stuff make[1]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' You haven't done a "make depend" yet! make[1]: *** [hash.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/x2p' make: *** [translators] Error 2 !!! ERROR: dev-lang/perl-5.8.0-r12 failed. !!! Function src_compile, Line 192, Exitcode 2 !!! Unable to make That's very weird since two days earlier I was able to install another system from scratch without problems...
Seems like the makedepend script, or some of the scripts/executables it runs, have mistakes in them... manually running ./makedepend shows some of the errors, some of the commands to execute are prepended with a $ sign... Some programs runs by makedepend are also called with wrong command arguments, resulting in loads of errors. I hope this can help!
Turns out the problem was the user's DHCP domain name sent by the DHCP server... it had a ' in it, screwing the whole name='value' format of the config.sh script... the user will be appropriately whacked for using invalid characters =) Maybe a check for this kind of crap could somehow be put in gentoo/portage ?