Hello, I'm trying to use SlackBuilds to compile AbiWord, and it's being a bit of a pain. I have Slackware 13.37, 64-bit multilib setup using the official multilib tutorial. Here's the error:

Code:
../../doltlibtool --tag=CXX   --mode=link g++  -O2 -fPIC -lpng14   -pthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   -avoid-version -module -no-undefined  -o bmp.la -rpath /usr/lib64/abiword-2.8/plugins  xp/libxp.la -ljpeg 
libtool: link: g++ -shared -nostdlib /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/crtbeginS.o  -Wl,--whole-archive xp/.libs/libxp.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/usr/lib64/../lib64 -Wl,-rpath -Wl,/usr/lib64/../lib64 /usr/lib64/libpng14.so /usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/qt/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/qt/bin:.:/usr/bin/java/bin -lz /usr/lib64/libgobject-2.0.so -L/usr/lib64 /usr/lib64/libgthread-2.0.so -lpthread /usr/lib64/libglib-2.0.so -lrt /usr/lib64/libjpeg.so -L/usr/lib64/gcc/x86_64-slackware-linux/4.5.2 -L/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/lib -L/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../.. /usr/lib64/../lib64/libstdc++.so -lm -lc -lgcc_s /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/crtendS.o /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/crtn.o  -pthread   -pthread -Wl,-soname -Wl,bmp.so -o .libs/bmp.so
g++: /usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/qt/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib64/java/bin:/usr/lib64/qt/bin:.:/usr/bin/java/bin: No such file or directory
make[4]: *** [bmp.la] Error 1
make[4]: Leaving directory `/tmp/SBo/abiword-2.8.6/plugins/bmp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/SBo/abiword-2.8.6/plugins/bmp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/SBo/abiword-2.8.6/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/abiword-2.8.6'
make: *** [all] Error 2
The weird part is that during the very same script, it's perfectly happy with using g++. I can invoke g++ manually myself as both root and normal user. The PATH shown there is really long because I thought java was the problem, and it was not. Regardless, long PATH or not, it will not compile.