Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105325 - [4.0/wrong-code] aspell-en fails if aspell compiled with -maltivec
Summary: [4.0/wrong-code] aspell-en fails if aspell compiled with -maltivec
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
: 118684 127083 (view as bug list)
Depends on:
Reported: 2005-09-08 20:12 UTC by Kathryn Kulick (RETIRED)
Modified: 2006-04-30 19:17 UTC (History)
6 users (show)

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

emerge --info, emerge --pretend, emege failed outputs are "cat"ed (aspell_ppc_bug.log,278.81 KB, text/plain)
2006-03-10 06:01 UTC, hiyuh

Note You need to log in before you can comment on or make changes to this bug.
Description Kathryn Kulick (RETIRED) gentoo-dev 2005-09-08 20:12:45 UTC
emerge aspell-en segfaults when compiling with gcc-4.0

>>> Source unpacked.
Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60
/usr/bin/prezip-bin -d < en-common.cwl | /usr/bin/aspell  --lang=en create
master ./en-common.rws
/bin/sh: line 1: 11495 Done                    /usr/bin/prezip-bin -d <en-common.cwl
     11496 Segmentation fault      | /usr/bin/aspell --lang=en create master
make: *** [en-common.rws] Error 139

Portage (default-linux/ppc/2005.1/ppc, gcc-4.0.1,
glibc-, 2.6.12-gentoo-r9 ppc)
System uname: 2.6.12-gentoo-r9 ppc 7450, altivec supported
Gentoo Base System version 1.12.0_pre6
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
CFLAGS="-O2 -mtune=7450 -maltivec -mabi=altivec -pipe"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mtune=7450 -maltivec -mabi=altivec -pipe"
FEATURES="autoaddcvs autoconfig candy ccache cvs distlocks sandbox sfperms strict"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
USE="ppc X alsa altivec berkdb bitmap-fonts cdrw crypt cups dvd dvdread emboss
fam fortran gif gnome gpm gtk gtk2 imagemagick ipv6 jpeg libwww motif mp3 mpeg
ncurses nls nptl nptlonly nsplugins ogg oggvorbis opengl pam pdflib perl png
python readline spell ssl tcpd tiff truetype truetype-fonts type1-fonts unicode
userlocales vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc"
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2005-09-17 19:04:05 UTC
Could you please try the gcc-4.0.2_pre ebuild in the tree and see if this is
still a problem?
Comment 2 Mark Loeser (RETIRED) gentoo-dev 2005-11-17 17:50:53 UTC
Can someone using gcc-4.0.2-r1 on ppc please confirm if this is still a problem
or not?  I can not reproduce it on the ppc dev box, but I'd like to be sure.
Comment 3 Joe Jezak (RETIRED) gentoo-dev 2005-11-19 05:41:16 UTC
I can reproduce this with aspell 0.60.4, but it doesn't seem to segfault with
Comment 4 Mark Loeser (RETIRED) gentoo-dev 2005-11-21 17:33:08 UTC
Alright "-maltivec -mabi=altivec" seem to be the culprit.  As far as I can tell
its generating wrong code:

#0  0x375343c4 in free_norm_table<acommon::FromUniNormEntry> (d=0x1)
    at convert.cpp:243  
#1  0x375343b4 in free_norm_table<acommon::FromUniNormEntry> (d=0x1007b5f8)
    at convert.cpp:245  
#2  0x37537594 in ~NormTables (this=0x1007aac8) at convert.cpp:485
#3  0x374fba48 in acommon::GlobalCacheBase::release (this=0x37638940,
    d=0x1007aac8) at cache.cpp:45
#4  0x374fbab8 in acommon::release_cache_data (cache=0x37638940, d=0x1007aac8)
    at cache.cpp:67
#5  0x10023e78 in acommon::Cacheable::release (this=0x1007aac8) at cache.hpp:37
#6  0x3753ddcc in acommon::CachePtr<acommon::NormTables>::reset (
    this=0x1007a6e8, p=0x0) at cache.hpp:49
#7  0x3753de14 in ~CachePtr (this=0x1007a6e8) at cache.hpp:63
#8  0x37537be8 in ~Convert (this=0x1007a6d0) at convert.cpp:983
#9  0x10023f8c in ~ConvObj (this=0x10078178) at convert.hpp:229
#10 0x375b6004 in ~Language (this=0x10078110) at language.hpp:63
#11 0x374fba48 in acommon::GlobalCacheBase::release (this=0x37638a68,
    d=0x10078110) at cache.cpp:45

The 0x1 does not look right to me at all.  No idea how to reduce this to a
testcase to send upstream though.
Comment 5 gad.kadosh 2006-01-13 15:11:27 UTC
I have that problem too. In fact applications that use aspell crash when they need to check spelling. it's a combination of this bug and bug #96794 - not sure if they are related though.
I tried to compile aspell without -maltivec -mabi=altivec and it still results in the same problems when emerging some dictionary.
Comment 6 nixnut (RETIRED) gentoo-dev 2006-01-14 01:55:55 UTC
*** Bug 118684 has been marked as a duplicate of this bug. ***
Comment 7 gad.kadosh 2006-01-14 09:00:55 UTC
Now that I compiled it with gcc-3.4.4 it works, but with gcc-4.0.2 it doesn't work for me even without -maltivec -mabi=altivec.
Comment 8 Luca Barbato gentoo-dev 2006-01-19 05:54:44 UTC
gcc-4.1 seems to fix the issue if you filter the altivec flags.
Comment 9 Chris White (RETIRED) gentoo-dev 2006-01-31 14:13:55 UTC
I compiled it with sys-devel/gcc-4.1.0_beta20060120 and it compiled just fine, alitvec, -mabi=altivec, and -maltivec included.

I made a simple document with lots of typos and ran `aspell -c test.txt` on it and it ran ok.
Comment 10 hiyuh 2006-03-10 05:55:50 UTC
(In reply to comment #9)
> I compiled it with sys-devel/gcc-4.1.0_beta20060120 and it compiled just fine,
> alitvec, -mabi=altivec, and -maltivec included.

In my case, using sys-devel/gcc-4.1.0,
CFLAGS="-Os -mcpu=G4 -mtune=G4 -maltivec -mtune=altivec -fno-strict-aliasing
-Wall -pipe" in /etc/make.conf. (It's just for compilation error detecting.)

Then, like running "emerge -e world".
When emerging app-text/aspell-0.60.4 in official tree,
the ebuild filered -maltivec and -mabi=altivec at the moment.
So, app-text/aspell-0.60.4 was compiled with CFLAGS="-Os -mcpu=G4 -mtune=G4
-fno-strict-aliasing -Wall -pipe".
It seems no compilation errors.
But libtool wornings are, though.

And then,
like "emerge -e world" will emerge app-dicts/aspell-en-6.0.0 as next step.
Its emerge process failed with the completely same error messages in
first report.

According to the bug #122855 (it might alpha specific, though),
-Os in CFLAGS may produce aspell's segfault.
This report suggests to use -O2 instead of -Os by replace-flags.
So, I've tried to do it.

I've modified ebuild and emerge app-text/aspell-0.60.4 with CFLAGS="-O2
-mcpu=G4 -mtune=G4 -fno-strict-aliasing -Wall -pipe".
Then, emerge app-dicts/aspell-en-6.0.0.
But, it reproduces segfault, too.
Comment 11 hiyuh 2006-03-10 06:01:47 UTC
Created attachment 81838 [details]
emerge --info, emerge --pretend, emege failed outputs are "cat"ed
Comment 12 Mark Loeser (RETIRED) gentoo-dev 2006-03-13 19:32:39 UTC
Well, this is fixed for now by filtering altivec for just this package.  I'll keep an eye on this for 4.1.1.
Comment 13 Joe Jezak (RETIRED) gentoo-dev 2006-03-22 22:40:32 UTC
*** Bug 127083 has been marked as a duplicate of this bug. ***
Comment 14 Joe Jezak (RETIRED) gentoo-dev 2006-04-30 19:17:56 UTC
lu_zero says this is fixed now.