emerging aspell fails with error : /bin/sh ./libtool --mode=link --tag=CXX i686-pc-linux-gnu-g++ -O3 -march=i686 -funroll-loops -pipe -fno-exceptions -lgpm -o aspell prog/aspell.o prog/check_funs.o prog/checker_string.o libaspell.la -lncurses -ldl -ldl (cd .libs && rm -f libpspell.la && ln -s ../libpspell.la libpspell.la) i686-pc-linux-gnu-g++ -O3 -march=i686 -funroll-loops -pipe -fno-exceptions -o .libs/aspell prog/aspell.o prog/check_funs.o prog/checker_string.o -lgpm ./.libs/libaspell.so -lncurses -ldl ./.libs/libaspell.so: undefined reference to `acommon::HashTable<acommon::StringMap::Parms>::init(unsigned)' ./.libs/libaspell.so: undefined reference to `acommon::BlockSList<acommon::StringPair>::clear()' collect2: ld returned 1 exit status make[1]: *** [aspell] Error 1 make[1]: Leaving directory `/var/tmp/portage/aspell-0.60/work/aspell-0.60' make: *** [all-recursive] Error 1 !!! ERROR: app-text/aspell-0.60 failed. !!! Function src_compile, Line 35, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. emerge aspell 2. 3. Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.2.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r3 i686) ================================================================= System uname: 2.6.9-gentoo-r3 i686 Intel(R) Celeron(R) CPU 2.00GHz Gentoo Base System version 1.6.5 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux-headers-2.4.22,sys-kernel/linux-headers-2.4.19-r1 Libtools: sys-devel/libtool-1.5.2-r6 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=i686 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=i686 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://sync.comair.co.za/gentoo-portage" USE="apm arts avi berkdb bitmap-fonts crypt cups encode f77 foomaticdb fortran gdbm gif gpm gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib" [ebuild N ] app-text/aspell-0.60 -debug +gpm 0 kB
I got rid of : ./.libs/libaspell.so: undefined reference to `acommon::HashTable<acommon::StringMap::Parms>::init(unsigned)' according to : http://www.komaba.utmc.or.jp/~aoi/diary/diary.cgi?year=2004&month=10 by adding template void HashTable<StringMap::Parms>::init(unsigned); to common/string_map.cpp now I only get : /bin/sh ./libtool --mode=link --tag=CXX i686-pc-linux-gnu-g++ -O3 -march=i686 -funroll-loops -pipe -fno-exceptions -lgpm -o aspell prog/aspell.o prog/check_funs.o prog/checker_string.o libaspell.la -lncurses -ldl -ldl i686-pc-linux-gnu-g++ -O3 -march=i686 -funroll-loops -pipe -fno-exceptions -o .libs/aspell prog/aspell.o prog/check_funs.o prog/checker_string.o -lgpm ./.libs/libaspell.so -lncurses -ldl ./.libs/libaspell.so: undefined reference to `acommon::BlockSList<acommon::StringPair>::clear()' collect2: ld returned 1 exit status make[1]: *** [aspell] Error 1 make[1]: Leaving directory `/var/tmp/portage/aspell-0.60/work/aspell-0.60' make: *** [all-recursive] Error 1
possibly a compiler version thing?
This is a little strange : watchdog ~ # gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: /var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice) watchdog ~ # emerge gcc -p These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-devel/gcc-3.4.3 watchdog ~ # As you can see .. gcc reports itself as 3.2.3, but I have 3.4.3 installed .. will look into that and report back. Henti
You are correct, it is a compiler version issue. switching to 3.4.3 profile fixed the problem
i guess somewhere along the line, you switched gcc with gcc-config and didn't realise. that has happened to me before. odd that it doesn't comopile under gcc-3.2, however i don't have any machine to test that version of gcc with.
Actually this is a brand new installed machine .. I'm using a old stage3 with gcc 3.2.3 and after emerge -u system I did'nt know you had to switch, only once I find out .. and switched .. it worked : H
A similar problem seems to be present with 4.0.1 x86_64-pc-linux-gnu-g++ -march=athlon64 -O3 -pipe -fomit-frame-pointer -fno-exceptions -o .libs/aspell prog/aspell.o prog/check_funs.o prog/checker_string.o ./.libs/libaspell.so -lncursesw -ldl ./.libs/libaspell.so: undefined reference to `acommon::HashTable<acommon::StringMap::Parms>::init(unsigned int)' ./.libs/libaspell.so: undefined reference to `acommon::HashTable<acommon::StringMap::Parms>::del()' ./.libs/libaspell.so: undefined reference to `acommon::BlockSList<acommon::StringPair>::clear()' maybe there's something in aspell's code which depends on an erroneous behaviour of gcc 3.3/3.4.
Created attachment 63774 [details, diff] aspell-0.60.3-templateinstantiations.patch Add missing template instantiations.
Havard's patch works for me.
*** Bug 100141 has been marked as a duplicate of this bug. ***
added to cvs, thanks,