Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80657 - "syntax error near unexpected token `else'" when doing emerge -uDv world -p
Summary: "syntax error near unexpected token `else'" when doing emerge -uDv world -p
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-03 17:09 UTC by Roel Brook
Modified: 2005-02-03 17:52 UTC (History)
1 user (show)

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


Attachments
Error log (error,5.18 KB, text/plain)
2005-02-03 17:10 UTC, Roel Brook
Details
Error log with --debug (error,508.41 KB, text/plain)
2005-02-03 17:11 UTC, Roel Brook
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roel Brook 2005-02-03 17:09:41 UTC
I'm getting a very ugly error when tring to do something with portage. I got this on 2 computers, an ~x86 and a x86 system, who have their tree shared via NFS (tree is on the x86 computer). After an emerge sync, I keep getting these errors:

/usr/portage/eclass/eutils.eclass: line 39: syntax error near unexpected token `else'
/usr/portage/eclass/eutils.eclass: line 39: `   else'

See attached file for all errors

Reproducible: Always
Steps to Reproduce:
1. emerge sync
2. emerge -uDv world (-p)




~x86:

Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0
, 2.6.10-nitro2 i686)
=================================================================
System uname: 2.6.10-nitro2 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 24 2004, 18:21:57)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable
d]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.9.4, 1.5
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -mfp
math=sse,387 -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share
/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/
fax /usr/share/config /var/qmail/alias /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -m
fpmath=sse,387 -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch sandbox sfperms"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://gd.tu
wien.ac.at/opsys/linux/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_NL@euro"
LC_ALL="nl_NL@euro"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib alsa apache2 apm arts audiofile avi bash-completion bitma
p-fonts bzlib calender cdparanoia cdr chroot crypt cups dba divx4linux dvd dvdr 
dvdread encode esd f77 fam filepro flac font-server foomaticdb fortran gd gdbm g
if gnome gphoto2 gpm gstreamer gtk gtk2 guile hal imagemagick imlib insecure-dri
vers java jpeg jpeg2k junit kde ldap libg++ libwww live mad mikmod mime mmx moti
f mpeg msn mysql ncurses network nls nptl nvidia odbc offensive oggvorbis ooo-kd
e opengl pam pdflib perl php pic png postgres python qmail qt quicktime readline
 real rplay samba scanner sdk sdl session sftplogging slang softmmu speex spell 
sse ssl stroke svga tcltk tcpd threads tiff truetype truetype-fonts type1-fonts 
usb userlocales v4l wmf xine xinerama xml xml2 xmms xprint xscreensaver xv xvid 
zlib video_cards_nvidia linguas_nl"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS

x86:
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3,
glibc-2.3.4.20040808-r1, 2.4.28-gentoo-r5 i586)
=================================================================
System uname: 2.4.28-gentoo-r5 i586 Pentium MMX
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jan 17 2005, 15:22:08)]
distcc 2.16 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.9.4, 1.8.5-r3, 1.5, 1.6.3, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium-mmx -O3 -pipe -fomit-frame-pointer -mmmx  -mfpmath=387
-ffast-math"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium-mmx -O3 -pipe -fomit-frame-pointer -mmmx  -mfpmath=387
-ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddconfig autoaddcvs autoconfig ccache distcc distlocks sandbox
sfperms"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 apache2 apm arts avi bitmap-fonts crypt cups curl dba encode extensions
f77 font-server foomaticdb fortran ftp gd gdbm gif gpm gtk2 imap imlib
javascript jpeg kde ldap libg++ libwww mad mikmod mime motif mpeg mysql ncurses
oggvorbis opengl oss pam pdflib perl php png postgres python quicktime quotas
readline samba sdl session softquota spell ssl svga tcpd tiff truetype
truetype-fonts type1-fonts winbind xml xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Roel Brook 2005-02-03 17:10:09 UTC
Created attachment 50290 [details]
Error log
Comment 2 Roel Brook 2005-02-03 17:11:33 UTC
Created attachment 50291 [details]
Error log with --debug
Comment 3 Roel Brook 2005-02-03 17:31:14 UTC
here's line the function that causes this:

ecpu_check() {
    if [ $CROSSCOMPILE -eq 1 ] || [ ! -e /proc/cpuinfo ]
    then
    else
        CPU_FLAGS=$1
        USER_CPU=`grep "flags" /proc/cpuinfo`

        for flags in `seq 1 ${#CPU_FLAGS[@]}`
        do
            if has ${CPU_FLAGS[$flags - 1]} $USER_CPU && ! has ${CPU_FLAGS[$flags - 1]} $USE
            then
                ewarn "Your system is ${CPU_FLAGS[$flags - 1]} capable but you don't have it enabled!"
                ewarn "You might be cross compiling (in this case set CROSSCOMPILE to 1 to disable this warning."
            fi
....

changing this to:

    if [ $CROSSCOMPILE -eq 1 ] || [ ! -e /proc/cpuinfo ]
    then
       ewarn "Nothing to see here"
    else
        CPU_FLAGS=$1

seems to fix it.
Comment 4 Roel Brook 2005-02-03 17:52:20 UTC
already solved according to ciaranm in http://forums.gentoo.org/viewtopic.php?p=2053627