Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70134 - aspell-0.60 doesn't compile with gcc-2.95
Summary: aspell-0.60 doesn't compile with gcc-2.95
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Spell checking utilities and dictionaries -- related bugs (OBSOLETE)
URL: http://www.mail-archive.com/aspell-us...
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-11-04 23:50 UTC by Matt Taylor
Modified: 2004-11-23 02:51 UTC (History)
1 user (show)

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


Attachments
aspell-0.60.1-20041026.patch (aspell-0.60.1-20041026.patch,2.21 KB, patch)
2004-11-04 23:51 UTC, Matt Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Taylor 2004-11-04 23:50:08 UTC
Emerging aspell-0.60 gives the following error:

source='modules/filter/url.cpp' object='modules/filter/url.lo' libtool=yes \
DEPDIR=.deps depmode=gcc /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile --tag=CXX i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/share/locale\"   -march=i686 -O3 -pipe -fno-exceptions -c -o modules/filter/url.lo modules/filter/url.cpp
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/share/locale\" -march=i686 -O3 -pipe -fno-exceptions -c lib/new_checker.cpp -Wp,-MD,lib/.deps/new_checker.TPlo  -fPIC -DPIC -o lib/.libs/new_checker.o
mkdir modules/filter/.libs
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/share/locale\" -march=i686 -O3 -pipe -fno-exceptions -c modules/filter/url.cpp -Wp,-MD,modules/.deps/url.TPlo  -fPIC -DPIC -o modules/filter/.libs/url.o
cpp0: modules/.deps/url.TPlo: No such file or directory
source='modules/filter/tex.cpp' object='modules/filter/tex.lo' libtool=yes \
DEPDIR=.deps depmode=gcc /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile --tag=CXX i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/share/locale\"   -march=i686 -O3 -pipe -fno-exceptions -c -o modules/filter/tex.lo modules/filter/tex.cpp
make[1]: *** [modules/filter/url.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/share/locale\" -march=i686 -O3 -pipe -fno-exceptions -c modules/filter/tex.cpp -Wp,-MD,modules/.deps/tex.TPlo  -fPIC -DPIC -o modules/filter/.libs/tex.o
cpp0: modules/.deps/tex.TPlo: No such file or directory
make[1]: *** [modules/filter/tex.lo] Error 1
make[1]: Leaving directory `/mnt/portage/tmp/portage/aspell-0.60/work/aspell-0.60'
make: *** [all-recursive] Error 1

From the URL(project's mailing list) the solution is to update to a 0.60.1 snapshot, but the snapshots have this error:

/bin/sh ./libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\"   -g -O2 -fno-exceptions -c -o common/file_util.lo common/file_util.cpp
 g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -fno-exceptions -c common/file_util.cpp -Wp,-MD,common/.deps/file_util.TPlo  -fPIC -DPIC -o common/.libs/file_util.o
common/file_util.cpp: In function `void acommon::truncate_file(acommon::FStream &, acommon::ParmString)':
common/file_util.cpp:136: implicit declaration of function `int acommon::ftruncate(...)'
make[1]: *** [common/file_util.lo] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [all-recursive] Error 1

Looking in file_util.cpp there is a comment saying to uncomment a line to fix that, and the build procedes until:

/bin/sh ./libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\"   -g -O2 -fno-exceptions -c -o modules/speller/default/language.lo modules/speller/default/language.cpp
 g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -fno-exceptions -c modules/speller/default/language.cpp -Wp,-MD,modules/speller/default/.deps/language.TPlo  -fPIC -DPIC -o modules/speller/default/.libs/language.o
modules/speller/default/language.cpp: In function `class acommon::PosibErrBase aspeller::invalid_word_e(const aspeller::Language &, const acommon::ParmString &, const char *, char = 0)':
modules/speller/default/language.cpp:454: implicit declaration of function `int aspeller::snprintf(...)'
make[2]: *** [modules/speller/default/language.lo] Error 1
make[2]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [subsystem] Error 2

I fixed that and the next 2 errors in the same way as the ftruncate error.

First error: 

/bin/sh ./libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\"   -g -O2 -fno-exceptions -c -o lib/new_filter.lo lib/new_filter.cpp
 g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -fno-exceptions -c lib/new_filter.cpp -Wp,-MD,lib/.deps/new_filter.TPlo  -fPIC -DPIC -o lib/.libs/new_filter.o
lib/new_filter.cpp: In function `static class acommon::PosibErr<acommon::ConfigFilterModule *> acommon::ConfigFilterModule::get_new(const acommon::String &, const acommon::Config *)':
lib/new_filter.cpp:345: implicit declaration of function `int acommon::strdup(...)'
lib/new_filter.cpp:345: assignment to `const char *' from `int' lacks a cast
lib/new_filter.cpp:425: assignment to `const char *' from `int' lacks a cast
lib/new_filter.cpp: In method `class acommon::PosibErr<void> acommon::ConfigFilterModule::end_option()':
lib/new_filter.cpp:476: assignment to `const char *' from `int' lacks a cast
make[1]: *** [lib/new_filter.lo] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [all-recursive] Error 1

Second error:

/bin/sh ./libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\"   -g -O2 -fno-exceptions -c -o modules/filter/context.lo modules/filter/context.cpp
 g++ -DHAVE_CONFIG_H -I. -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -fno-exceptions -c modules/filter/context.cpp -Wp,-MD,modules/filter/.deps/context.TPlo  -fPIC -DPIC -o modules/filter/.libs/context.o
modules/filter/context.cpp: In method `class acommon::PosibErr<bool> {anonymous}::ContextFilter::setup(acommon::Config *)':
modules/filter/context.cpp:88: implicit declaration of function `int {anonymous}::strdup(...)'
modules/filter/context.cpp:88: assignment to `char *' from `int' lacks a cast
make[1]: *** [modules/filter/context.lo] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [all-recursive] Error 1

Then a standard gcc-2.95 error:

/bin/sh ./libtool --mode=link --tag=CXX g++  -g -O2 -fno-exceptions   -o libpspell.la -rpath /usr/local/lib -version-info 16:0:1 -no-undefined lib/dummy.lo libaspell.la -ldl -ldl 
g++ -shared -nostdlib /usr/lib/crti.o /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbeginS.o  lib/.libs/dummy.o  -Wl,--rpath -Wl,/home/liverbugg/aspell-0.60.1-20041026/.libs ./.libs/libaspell.so -ldl -L/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3 -L/usr/i686-pc-linux-gnu/lib -lstdc++ -lm -lc -lgcc /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtendS.o /usr/lib/crtn.o  -Wl,-soname -Wl,libpspell.so.15 -o .libs/libpspell.so.15.1.0
(cd .libs && rm -f libpspell.so.15 && ln -s libpspell.so.15.1.0 libpspell.so.15)
(cd .libs && rm -f libpspell.so && ln -s libpspell.so.15.1.0 libpspell.so)
creating libpspell.la
(cd .libs && rm -f libpspell.la && ln -s ../libpspell.la libpspell.la)
source='prog/compress.c' object='prog/compress.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I./gen  -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/local/share/locale\"   -g -O2 -c -o prog/compress.o prog/compress.c
prog/compress.c: In function `main':
prog/compress.c:79: parse error before `int'
prog/compress.c:83: `errFlag' undeclared (first use in this function)
prog/compress.c:83: (Each undeclared identifier is reported only once
prog/compress.c:83: for each function it appears in.)
make[1]: *** [prog/compress.o] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [all-recursive] Error 1

Fixed that by moving the variable decleration up.  But now I get linking errors:

g++ -g -O2 -fno-exceptions -o .libs/aspell prog/aspell.o prog/check_funs.o prog/checker_string.o  ./.libs/libaspell.so -lncurses -ldl
./.libs/libaspell.so: undefined reference to `strdup(char const *)'
./.libs/libaspell.so: undefined reference to `snprintf(char *, unsigned int, char const *,...)'
./.libs/libaspell.so: undefined reference to `ftruncate(int, long)'
collect2: ld returned 1 exit status
make[1]: *** [aspell] Error 1
make[1]: Leaving directory `/home/liverbugg/aspell-0.60.1-20041026'
make: *** [all-recursive] Error 1

The linking errors are obviously from the way the function definitions are put in to fix the compile errors, but that's what the comment from the author said to do.  I checked the projects mailing lists and buzilla for solutions, but found nothing.

emerge info:

Portage 2.0.51-r2 (!/usr/portage/profiles/default-linux/x86/gcc2, gcc-2.95.3, glibc-2.2.5-r9, 2.6.7-gentoo-r14 i686)
=================================================================
System uname: 2.6.7-gentoo-r14 i686 AMD Athlon(tm) 
Gentoo Base System version 1.5.3
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.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=i686 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=i686 -O3 -pipe"
DISTDIR="/mnt/portage/portage/distfiles"
FEATURES="autoaddcvs ccache digest distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/ http://ftp-mirror.internap.com/pub/gentoo/ http://chod.cwru.edu/gentoo http://gentoo.mirrors.pair.com/ http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/portage/tmp"
PORTDIR="/mnt/portage/portage"
PORTDIR_OVERLAY="/mnt/portage/portage-local"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X alsa apm avi berkdb bitmap-fonts bonobo canna cdr crypt cups directfb dvd encode esd f77 fam flac foomaticdb gdbm ggi gif gnome gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib jpeg libg++ libwww mad mikmod mmx mmx2 motif mozilla mpeg ncurses oggvorbis opengl oss pam pdflib perl png python readline samba sdl slang spell sse ssl svga tcltk tcpd tiff truetype x86 xml xml2 xmms xv zlib"
Comment 1 Matt Taylor 2004-11-04 23:51:08 UTC
Created attachment 43324 [details, diff]
aspell-0.60.1-20041026.patch

Patch to get 20041026 snapshot to compile until linking
Comment 2 Daniel Black (RETIRED) gentoo-dev 2004-11-05 00:02:07 UTC
 gcc-2.95 isn't realy supported - why are you using it?
Comment 3 Matt Taylor 2004-11-05 00:54:19 UTC
This system is using the default-1.0 profile.  gcc-2.95 is the only choice for a compiler.
Comment 4 Matt Taylor 2004-11-23 02:51:33 UTC
bump to aspell-0.60.1.1 from bug 71793 fixes compile.  Resolving.