Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388677 - dev-libs/xapian: uses sse instruction even when cpu doesn't support it
Summary: dev-libs/xapian: uses sse instruction even when cpu doesn't support it
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 18:16 UTC by Amadeusz Żołnowski (RETIRED)
Modified: 2011-10-30 15:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-10-27 18:16:52 UTC
I have compiled xapian on Athlon-XP which supports only SSE and not SSE2. When used with app-text/notmuch it failed with "Illegal instruction". Disabling use of SSE (with --disable-sse passed to configure) solves the issue, but disabling it should conditional, of course.

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2011-10-27 20:13:48 UTC
Actually there's an option to use sse only rather than sse2 which is the default.  From ./configure --help

  --disable-sse           disable use of SSE FP instructions on x86
  --enable-sse[=sse|sse2] set which SSE FP instructions to use on x86
                          (default: sse2)

So I should set use flags for those with IUSE="+sse2" for the default.  I think I'll have USE="nosse" for --disable-sse, USE="sse" for --enable--sse=sse and USE="sse2" for --enable-sse=sse2.  "nosse" "sse" and "sse2" will be mutually exclusive.

@aidecoe, if you have a chance, can you test --enable-sse=sse and see if app-text/notmuch still fails?

I've also noticed that there's some other stuff:

  --enable-documentation  enable make rules to rebuild documentation
                          [default=maintainer-mode]
  --enable-backend-brass  build the brass database backend [default=yes]
  --enable-backend-chert  build the chert database backend [default=yes]
  --enable-backend-flint  build the flint database backend [default=yes]
  --enable-backend-inmemory
                          build the inmemory database backend [default=yes]
  --enable-backend-remote build the remote database backend [default=yes]

I should add some local use flags for these.
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-10-27 21:43:44 UTC
(In reply to comment #1)
> Actually there's an option to use sse only rather than sse2 which is the
> default.  From ./configure --help
> 
>   --disable-sse           disable use of SSE FP instructions on x86
>   --enable-sse[=sse|sse2] set which SSE FP instructions to use on x86
>                           (default: sse2)
> 
> So I should set use flags for those with IUSE="+sse2" for the default.  I think
> I'll have USE="nosse" for --disable-sse, USE="sse" for --enable--sse=sse and
> USE="sse2" for --enable-sse=sse2.  "nosse" "sse" and "sse2" will be mutually
> exclusive.

Maybe just "sse" and "sse2"?  "nosse" is redundant, I think.

> @aidecoe, if you have a chance, can you test --enable-sse=sse and see if
> app-text/notmuch still fails?

I cannot at this time.  x86 host has gone down for today and I'm going away
for few days. Although I'm almost sure that "sse" would work for that host
(Athlon-XP supports SSE).
Comment 3 Anthony Basile gentoo-dev 2011-10-27 22:09:02 UTC
I added xapian-1.2.7-r2.ebuild.  Please test.
Comment 4 Johan Bergström 2011-10-28 05:04:51 UTC
Hey and thanks for the assistance. I think you forgot to attach the ebuild?
Comment 5 Anthony Basile gentoo-dev 2011-10-28 11:19:44 UTC
(In reply to comment #4)
> Hey and thanks for the assistance. I think you forgot to attach the ebuild?

Its on the tree so I didnt' attach it here.  If you emerge --sync you'll see dev-libs/xapian-1.2.7-r2.  Its ~arch for now.

The only thing that bothers me a little about it is that most systems have both USE="sse sse2" so you get the warning.  Its just a warning, but some might think to act on it.  We may want to soften the statement and add something to the effect, "On x64_64 systems, you most likely have both flags enabled, in which case this behavior is what you want" after my statement that its defaulting to USE="sse2".  It might be overkill to ask them to look into /proc/cpuinfo to check for available cpu flags.  Let me know what you think.
Comment 6 Anthony Basile gentoo-dev 2011-10-30 12:13:54 UTC
Can this be closed?  I'm trying to clear the way for stabilization of 1.2.7 so we can get rid of some older cruft.
Comment 7 Johan Bergström 2011-10-30 13:39:21 UTC
LGTM!
Comment 8 Anthony Basile gentoo-dev 2011-10-30 15:55:39 UTC
Please reopen if there's a problem with this.