that last line is most likely ur problem, for some reason you can get errors during install.
try this code to reinstall the whole compile package (also in my howto)
anyway... you get a syntax error, wich means there are some missing/to mutch signs like ()[] etc.ipkg update
ipkg install -force-overwrite -force-reinstall optware-devel autoconf automake bash bison bzip2 coreutils diffutils file findutils flex gawk groff libstdc++ libtool make m4 ncurses openssl patch perl pkgconfig python rsync sed svn tar wget-ssl buildroot
Debugging is done via putting breakpoints down... but since I think you can't do that, nor have the software for it... you can better use the lots of debugging flag turned on:
native compiling is always tricky since not everything is supported on a mipsel device...make -d
now there isn't mutch else to say about this, because compiling is always tricky, and you do need to know basic programming skills at C or C++ to properly fix things.