Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232126 - x11-libs/pixman-0.11.8 does not detect SSE2 intristics
Summary: x11-libs/pixman-0.11.8 does not detect SSE2 intristics
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 232294 232301 232486 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-17 23:16 UTC by Andriy Baranskyy
Modified: 2008-07-21 22:20 UTC (History)
34 users (show)

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


Attachments
complete build log (config.log,35.88 KB, text/plain)
2008-07-17 23:17 UTC, Andriy Baranskyy
Details
sse.patch (sse.patch,415 bytes, patch)
2008-07-18 11:50 UTC, Ben de Groot (RETIRED)
Details | Diff
pixman-0.11.8.ebuild.diff (pixman-0.11.8.ebuild.diff,429 bytes, patch)
2008-07-18 11:51 UTC, Ben de Groot (RETIRED)
Details | Diff
pixman-0.11.8.ebuild.diff (pixman-0.11.8.ebuild.diff,754 bytes, patch)
2008-07-19 14:21 UTC, Ben de Groot (RETIRED)
Details | Diff
error occurs (error.log,20.35 KB, text/plain)
2008-07-20 14:15 UTC, Cyrill Helg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Baranskyy 2008-07-17 23:16:10 UTC
When compiled, pixman-0.11.8 gives the following error:
....
checking for getisax... no
checking whether byte ordering is bigendian... no
checking for perl... /usr/bin/perl
checking for -fvisibility... yes
checking whether to use MMX intrinsics... yes
checking whether to use SSE intrinsics... no
checking whether to use SSE2 intrinsics... yes
configure: error: SSE2 intrinsics not detected


emerge --info:
Portage 2.2_rc1 (default-linux/x86/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-tuxonice-r6 i686)
=================================================================
System uname: Linux-2.6.25-tuxonice-r6-i686-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-glibc2.0
Timestamp of tree: Thu, 17 Jul 2008 21:06:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
LINGUAS="en pl uk be de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dfx 3dnow 3dnowext 7zip X Xaw3d a52 aac aalib accessibility acl acpi adns alsa amr amrnb amrr amrwb ao arts auto-completion autoipd automount avahi bash-completion bidi bluetooth branding bzip2 c++ cairo caps cddb cdparanoia cisco cli cpudetection cracklib crypt css cups curl daap dbus dga directfb divx djvu dri dts dv dvd dvdnav dvdr dvdread emovix enca encode exif fam fax fbcon ffmpeg firefox flac font-server fontconfig fortran ftp gd gdbm geoip ggi gif glibglitz gmail gmedia gpg2-experimental gphoto2 gpm gsm gtk hal htmlhandbook http hyperestraier iconv icq idn imagemagick inotify ipod ipv6 ipw3945 isdnlog java javascript jpeg jpeg2k justify kde kdrive kerberos ladspa lame laptop latex libcaca libsamplerate libwww lilo live lm_sensors lzo mad matroska matrox mbrola md5sum mdnsresponder-compat midi mjpeg mmap mmx mmxext mng modplug motif mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer msn mtp mudflap musepack musicbrainz mysql nas ncurses neXt net netbeans netboot network network-cron networking nfs nis nls nptl nptlonly nsplugin ntp nvidia nvram nvtv obex odbc ogg openal openct openexr opengl openmp openssh openvpn oss overlays pch pcmcia pcre pcsc-lite pda pdf perl pic player plotutils plugins pmu png portaudio pppd pulseaudio pythonqt-static qt3 qt3support qt4 quicktime radio rar raw readline real realmedia reflection reiser4 reiserfs rss rtc samba sasl scanner sdl session skey slang slp smartcard sndfile snmp socks5 speech speex spell spl sql sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification svg svga tcpd tetex tga theora threadstiff timidity tk tools truetype unicode usb v4l v4l2 vcd vidix visualization vorbis wav wavpack wifi win32codecs wma wmf wmp wxwindows x264 x86 xanim xcb xcomposite xine xinerama xml xorg xpm xprint xulrunner xv xvid xvmc yv12 zeroconf zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks                   iec958 ioplug ladspa lfloat linear meter mulaw multi null plug                   rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="nikon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl uk be de" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always
Comment 1 Andriy Baranskyy 2008-07-17 23:17:16 UTC
Created attachment 160674 [details]
complete build log
Comment 2 Maxim Popov 2008-07-18 06:17:44 UTC
SSE2 depends on SSE, but SSE disabled in configure script for archs !x86-64. Try comment 

#if !defined(__amd64__) && !defined(__x86_64__) 
#error "Need x86-64 for SSE" 
#endif 

block in configure script
Comment 3 Bas van Dijk 2008-07-18 07:07:37 UTC
Same problem here.

Temporary workaround:
echo "x11-libs/pixman -sse2" > /etc/portage/package.use
Comment 4 Neil Bothwick 2008-07-18 08:09:38 UTC
I get the same here on an Eee PC900, but /proc/cpuinfo shows

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
        clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx bts
Comment 5 Neil Bothwick 2008-07-18 08:18:16 UTC
(In reply to comment #2)
> SSE2 depends on SSE, but SSE disabled in configure script for archs !x86-64.
> Try comment 
> 
> #if !defined(__amd64__) && !defined(__x86_64__) 
> #error "Need x86-64 for SSE" 
> #endif 
> 
> block in configure script

That block is already commented here, uncommmenting it made no difference.

Comment 6 Maxim Popov 2008-07-18 08:30:42 UTC
(In reply to comment #5)
> 
> That block is already commented here, uncommmenting it made no difference.
> 

You should comment this block with /* */, because # is not comment, ex:

/*
#if !defined(__amd64__) && !defined(__x86_64__) 
#error "Need x86-64 for SSE" 
#endif 
*/

PS. SSE2 works only with gcc 4.2, but it work with gcc 4.1 too, comment block

/*
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) 
#error "Need GCC >= 4.2 for SSE2 intrinsics" 
#endif 
*/
Comment 7 Neil Bothwick 2008-07-18 08:51:28 UTC
Doh! I'm spending too much time with shell scripts :(

Yes, really commenting it did work, thanks.
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2008-07-18 10:48:44 UTC
This is moronic! Can we please fire the coder who thought this was a good idea?
Comment 9 Ben de Groot (RETIRED) gentoo-dev 2008-07-18 11:50:10 UTC
Created attachment 160709 [details, diff]
sse.patch

Patch to remove x86_64 check in configure.ac which prevents using SSE on x86.
Comment 10 Ben de Groot (RETIRED) gentoo-dev 2008-07-18 11:51:07 UTC
Created attachment 160711 [details, diff]
pixman-0.11.8.ebuild.diff

Patch for pixman-0.11.8.ebuild to apply the patch and call eautoreconf.
Comment 11 Doug Goldstein (RETIRED) gentoo-dev 2008-07-18 14:46:22 UTC
Alright. We can patch that out. But does it have any consequences? Anyone prod upstream why it is this way? Or actually try this patch?
Comment 12 Ben de Groot (RETIRED) gentoo-dev 2008-07-18 15:18:29 UTC
I tried the patch, and it works fine.

configure.ac has this to say about why upstream did it this way:

GCC 4.2 when compiling with -msse will generate SSE instructions
on its own.  This means anything compiled with -msse can only be
run after a runtime check for SSE.  Unfortunately, since we still
need to support MMX-but-not-SSE (such as the OLPC), this means we
can only use SSE when compiling for x86-64 (where SSE is always
supported).
Comment 13 Ben de Groot (RETIRED) gentoo-dev 2008-07-18 15:20:28 UTC
I just realized we can't unconditionally apply the patch, for the reason upstream gives. So I guess we need to "hide" it behind an sse useflag.
Comment 14 Soren Sandmann 2008-07-19 01:31:22 UTC
The bug here is that when SSE2 is explicitly turned on it will use the value for SSE, due to a typo.

You can use the patch below.

And no, you can't fire me.


commit 51576cda8ba830c0d7dbbeaebb79fbef276f7e2d
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date:   Fri Jul 18 14:49:35 2008 -0400

    Fix typo in sse2 configure logic

diff --git a/configure.ac b/configure.ac
index 05e66ae..6dcffb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,7 @@ if test $have_sse2_intrinsics = yes ; then
 fi
 
 AC_MSG_RESULT($have_sse2_intrinsics)
-if test $enable_sse2 = yes && test $have_sse_intrinsics = no ; then
+if test $enable_sse2 = yes && test $have_sse2_intrinsics = no ; then
    AC_MSG_ERROR([SSE2 intrinsics not detected])
 fi
 
Comment 15 Mark R. Pariente 2008-07-19 03:20:26 UTC
Compiles / works with Soren's patch (on x86 32-bit intel core duo, with mme and sse2). Had to mess around with autotools/libtoolize in the ebuild to get configure.ac change picked up.
Comment 16 Doug Goldstein (RETIRED) gentoo-dev 2008-07-19 03:56:13 UTC
Thanks for the follow up Soren.
Comment 17 Doug Goldstein (RETIRED) gentoo-dev 2008-07-19 04:05:26 UTC
Patch applied to 0.11.8. Didn't bump since it's purely a compilation issue.
Comment 18 Philip Kovacs 2008-07-19 05:17:20 UTC
Cpuld you re-open this?  I am still getting this error.  gcc 4.1.2 here
Comment 19 Torsten Veller (RETIRED) gentoo-dev 2008-07-19 06:00:03 UTC
*** Bug 232294 has been marked as a duplicate of this bug. ***
Comment 20 Torsten Veller (RETIRED) gentoo-dev 2008-07-19 06:31:15 UTC
Still failing here too.
Uncommenting SNAPSHOT=yes fixes it.
Comment 21 Edward "Hades" 2008-07-19 08:08:06 UTC
Yeah, it should run eautoreconf since configure.ac was updated.
Comment 22 Ben de Groot (RETIRED) gentoo-dev 2008-07-19 10:47:44 UTC
(In reply to comment #14)
> And no, you can't fire me.

Sorry, I said that in the heat of my frustration, nothing personal. ;-)

But could you please add an --enable-sse flag and leave it up to distros/packagers to enable or disable it?
Comment 23 Edward "Hades" 2008-07-19 10:52:22 UTC
Søren, I also wonder if GCC >= 4.2 check in configure script is crucial? It's just GCC > 4.1.2 are not yet stabilized in Gentoo.
Comment 24 Ben de Groot (RETIRED) gentoo-dev 2008-07-19 14:21:50 UTC
Created attachment 160849 [details, diff]
pixman-0.11.8.ebuild.diff

New ebuild patch, adding sse useflag with my previous sse.patch (renamed to pixman-0.11.8-sse.patch), as well as applying the fix that is already in portage. And of course, we need to call eautoreconf after patching configure.ac.
Comment 25 Soren Sandmann 2008-07-19 19:33:10 UTC
(In reply to comment #23)
> Søren, I also wonder if GCC >= 4.2 check in configure script is crucial? It's
> just GCC > 4.1.2 are not yet stabilized in Gentoo.
> 

It needs __force_align_arg_pointer__. If that's available in 4.1.2 you can use that.
Comment 26 Donnie Berkholz (RETIRED) gentoo-dev 2008-07-20 01:21:23 UTC
*** Bug 232301 has been marked as a duplicate of this bug. ***
Comment 27 Ben de Groot (RETIRED) gentoo-dev 2008-07-20 14:08:26 UTC
Because Doug Goldstein is not around today and people keep running into libtool
errors as witnessed in bug 232301, I have committed my fixes. So I think this
can be closed now. Reopen if there are still issues.
Comment 28 Cyrill Helg 2008-07-20 14:13:42 UTC
I just synced and the still have this issue. See attached log.
Comment 29 Cyrill Helg 2008-07-20 14:15:37 UTC
Created attachment 160930 [details]
error occurs
Comment 30 Ben de Groot (RETIRED) gentoo-dev 2008-07-20 14:44:38 UTC
Did you enable both sse and sse2 useflags?
Comment 31 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-07-20 17:27:02 UTC
*** Bug 232486 has been marked as a duplicate of this bug. ***
Comment 32 Ronny Perinke 2008-07-20 17:56:30 UTC
(In reply to comment #29)
> Created an attachment (id=160930) [edit]
> error occurs
> 

According to the code, you need GCC 4.2 or newer to use this feature. GCC 4.2 is currently masked by ~x86.

#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
#error "Need GCC >= 4.2 for SSE2 intrinsics"
#endif


A question to the devs: why GCC 4.2?
Comment 33 Edward "Hades" 2008-07-20 18:00:42 UTC
(In reply to comment #32)
> (In reply to comment #29)
> > Created an attachment (id=160930) [edit]
> > error occurs
> > 
> 
> According to the code, you need GCC 4.2 or newer to use this feature. GCC 4.2
> is currently masked by ~x86.
> 
> #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <
> 2))
> #error "Need GCC >= 4.2 for SSE2 intrinsics"
> #endif
> 
> 
> A question to the devs: why GCC 4.2?
> 

We've already got a reply (see comment #25).

I've successfully removed this check, and pixman compiled and works fine for me with gcc 4.1.2. All packages using cairo (that is the only package using pixman) seem to work fine too.
Comment 34 Ronny Perinke 2008-07-20 18:32:40 UTC
(In reply to comment #33)
> We've already got a reply (see comment #25).
> 
> I've successfully removed this check, and pixman compiled and works fine for me
> with gcc 4.1.2. All packages using cairo (that is the only package using
> pixman) seem to work fine too.
> 

thanks ... I've found the actual reason for __force_align_arg_pointer__ -> http://lists.freedesktop.org/archives/xorg-commit/2008-May/016448.html

p.s.
Cryill, if it's not GCC 4.1, then you should attach the config.log
Comment 35 Edward "Hades" 2008-07-20 18:55:12 UTC
(In reply to comment #34)
> 
> thanks ... I've found the actual reason for __force_align_arg_pointer__ ->
> http://lists.freedesktop.org/archives/xorg-commit/2008-May/016448.html
> 

GCC 4.1 really does not support this attribute. Here's what it gives:

pixman-pict.c:1742: warning: '__force_align_arg_pointer__' attribute directive ignored

So, I think that I am lucky my Mozilla didn't crash yet, and we also would need a >=gcc-4.2 dependency in pixman.
Comment 36 Philip Kovacs 2008-07-20 19:26:09 UTC
Please re-open this bug as it is still not fixed.

configure: error: SSE2 intrinsics not detected.

I have both sse and sse2 USE flags on.  GCC is 4.1.2.

I do see the new eautoreconf running, but it didn't resolve the issue.

emerge --info
Portage 2.2_rc1 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r4-i686-Intel-R-_Pentium-R-_4_CPU_2.40GHz-with-glibc2.0
Timestamp of tree: Sun, 20 Jul 2008 18:45:02 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.mirrors.pair.com/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X aalib acl acpi alsa cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode evo fbcon firefox gif gpm gstreamer gtk hal iconv imlib isdnlog jpeg kerberos mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session slang spell spl sse sse2 ssl svg tcpd tiff truetype unicode v4l vorbis win32codecs x86 xcomposite xml xml2 xorg xv xvid zlib" ALSA_CARDS="emu10k1 intel8x0 bt87x usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 37 David 'Bombe' Roden 2008-07-20 20:42:57 UTC
Seems to be fixed here (~x86), I ran into this problem an hour ago but after another "emerge --sync" everything compiles fine now.
Comment 38 Andriy Baranskyy 2008-07-20 21:12:54 UTC
Same here - problem fixed for me on ~x86
Comment 39 Philip Kovacs 2008-07-20 21:37:58 UTC
Just --sync'd a minute ago and the error persists here on x86.  

I have masked off 0.11.8 and am using .6 for now.  

Just as a sanity check to verify that my cpu does support sse2 ...

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping        : 7
cpu MHz         : 2405.535
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts sync_rdtsc cid xtpr
bogomips        : 4812.81
clflush size    : 64
Comment 40 Ben de Groot (RETIRED) gentoo-dev 2008-07-20 22:09:48 UTC
Reopening. This needs gcc-4.2 or greater, which is available in ~arch.
Comment 41 Billy DeVincentis 2008-07-20 23:32:25 UTC
Fixed for me too after a sync.  Philip, just goes to show why testing and stable shouldn't be mixed.
Comment 42 Philip Kovacs 2008-07-20 23:45:02 UTC
(In reply to comment #41)
> Fixed for me too after a sync.  Philip, just goes to show why testing and
> stable shouldn't be mixed.
> 

The fact that many of my packages are ~ on an otherwise stable x86 system, has NOTHING to do with this bug.  I cannot possibly do what I need to do with a purely x86 system, nor do I want the problems associated with a totally ~x86 system.

Comment 43 Tyler Mecke 2008-07-21 08:06:53 UTC
hey, i'm having the same issue on amd64.  Also when i run emerge -av pixman
it doesnt build with mmx or sse2 even though both use flags are enabled in my make.conf, it only builds with sse%*.  I sill get the same error 

checking whether to use MMX intrinsics... yes
checking whether to use SSE intrinsics... yes
checking whether to use SSE2 intrinsics... no
configure: error: SSE2 intrinsics not detected

after syncing 5 minutes ago. it is patching through the tree. 

* Applying pixman-0.11.8-sse2-intrinsics-check.patch ...            

same with #USE="sse sse2 mmx" emerge -av pixman

here's my emerge --info:

Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r6 x86_64 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
Timestamp of tree: Mon, 21 Jul 2008 07:36:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://mirror.usu.edu/mirrors/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bzip2 cdr cli cracklib crypt cups dri dvd emt64 fortran fuse gdbm gpm gtk hdaps iconv ipv6 isdnlog kde madwifi midi mmx mudflap multilib ncurses nls nptl nptlonly nvidia openmp pam pcre perl pppd python qt3 qt4 readline reflection samba session spl sse sse2 sse3 ssl ssse3 tcpd unicode xorg xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 44 Ben de Groot (RETIRED) gentoo-dev 2008-07-21 12:42:55 UTC
(In reply to comment #43)
> hey, i'm having the same issue on amd64.  Also when i run emerge -av pixman
> it doesnt build with mmx or sse2 even though both use flags are enabled in my
> make.conf, it only builds with sse%*.  I sill get the same error 
> 
> checking whether to use MMX intrinsics... yes
> checking whether to use SSE intrinsics... yes
> checking whether to use SSE2 intrinsics... no
> configure: error: SSE2 intrinsics not detected

> Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0,
> 2.6.25-gentoo-r6 x86_64)

The problem is you're using gcc-4.1. For sse2 you need gcc-4.2 or greater.
Comment 45 Alan Hourihane 2008-07-21 12:47:35 UTC
And GCC 4.2 isn't stable, yet pixmman-0.11.8 is marked stable which is contradictory.
Comment 46 Alan Hourihane 2008-07-21 12:49:23 UTC
Ugh, scratch that. My local machine fault. 
Comment 47 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 13:23:45 UTC
(In reply to comment #42)
> (In reply to comment #41)
> > Fixed for me too after a sync.  Philip, just goes to show why testing and
> > stable shouldn't be mixed.
> > 
> 
> The fact that many of my packages are ~ on an otherwise stable x86 system, has
> NOTHING to do with this bug.  I cannot possibly do what I need to do with a
> purely x86 system, nor do I want the problems associated with a totally ~x86
> system.
> 

Firstly, mixing is not supported by Gentoo. If you can't satisfy all the depends of a package, then you shouldn't use it. Additionally, NOTHING depends on a version of pixman newer then 0.10.x. The API is roughly the same (there are new methods in there) but primary it's internal bits which were improved upon.

So that being said. If you have gcc 4.1 (aka a stable machine) don't use ~arch pixman.
Comment 48 Paul Varner (RETIRED) gentoo-dev 2008-07-21 14:16:24 UTC
(In reply to comment #47)
>
> So that being said. If you have gcc 4.1 (aka a stable machine) don't use ~arch
> pixman.
> 

Actually, I have an unstable machine using the stable GCC, so of course this fails.  Thequestion I have is in reading through the comments, this requires gcc 4.2.  Why isn't there a dependency on gcc 4.2 or higher in the ebuild?
Comment 49 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 14:39:12 UTC
(In reply to comment #48)
> (In reply to comment #47)
> >
> > So that being said. If you have gcc 4.1 (aka a stable machine) don't use ~arch
> > pixman.
> > 
> 
> Actually, I have an unstable machine using the stable GCC, so of course this
> fails.  Thequestion I have is in reading through the comments, this requires
> gcc 4.2.  Why isn't there a dependency on gcc 4.2 or higher in the ebuild?
> 

Because I was gone all weekend and didn't have a chance to commit that until this morning? ;)
Comment 50 Guillaume Castagnino 2008-07-21 15:11:44 UTC
(In reply to comment #47)
> 
> So that being said. If you have gcc 4.1 (aka a stable machine) don't use ~arch
> pixman.
> 

Sorry, but hardened profiles (Portage 2.2_rc1 (hardened/linux/x86, gcc-3.4.6, glibc-2.8_p20080602-r0, 2.6.25-hardened-r2 i686) for example) uses a gcc 3.4, even in ~arch ;)

disabling sse2 use flag solves the issue of course on such archs
So I really think this should be managed
Comment 51 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 15:16:12 UTC
(In reply to comment #50)
> (In reply to comment #47)
> > 
> > So that being said. If you have gcc 4.1 (aka a stable machine) don't use ~arch
> > pixman.
> > 
> 
> Sorry, but hardened profiles (Portage 2.2_rc1 (hardened/linux/x86, gcc-3.4.6,
> glibc-2.8_p20080602-r0, 2.6.25-hardened-r2 i686) for example) uses a gcc 3.4,
> even in ~arch ;)
> 
> disabling sse2 use flag solves the issue of course on such archs
> So I really think this should be managed
> 

It already is. emerge --sync
Comment 52 Philip Kovacs 2008-07-21 19:48:00 UTC
(In reply to comment #47)
> (In reply to comment #42)
> > (In reply to comment #41)
> > > Fixed for me too after a sync.  Philip, just goes to show why testing and
> > > stable shouldn't be mixed.
> > > 
> > 
> > The fact that many of my packages are ~ on an otherwise stable x86 system, has
> > NOTHING to do with this bug.  I cannot possibly do what I need to do with a
> > purely x86 system, nor do I want the problems associated with a totally ~x86
> > system.
> > 
> 
> Firstly, mixing is not supported by Gentoo. 

So remove the entire /etc/portage/package.keywords/mask/unmask mechanism from Gentoo.  Don't admonish me for using available, documented functionality in a way that satisfies my particular needs.

> If you can't satisfy all the depends of a package, then you shouldn't use it. 

I agree.  This bug was a result of there being an unstated, implicit dependency on gcc 4.2 for pixman 0.11.8.  My system and everyone else's with gcc<4.2 would have kept pixman below this revision level had a proper ebuild been in the tree.

> Additionally, NOTHING depends on a version of pixman newer then 0.10.x. 
  
I added pixman to package.keywords long ago to satisfy either an xorg or cairo dependency, i.e. at the time I needed to arch-unmask pixman.  That fact that, today, I need not have it ~x86 is a non sequitur -- this bug would still have existed and been reported with or without my participation.
Comment 53 Edward "Hades" 2008-07-21 20:11:03 UTC
(In reply to comment #52)
> > Firstly, mixing is not supported by Gentoo. 
> 
> So remove the entire /etc/portage/package.keywords/mask/unmask mechanism from
> Gentoo.  Don't admonish me for using available, documented functionality in a
> way that satisfies my particular needs.

Yes, this crossed my mind too, the power of Gentoo is flexibility, if we stop mixing stable with testing, apply universal set of use-flags, and stick to one -march and minimal CFLAGS, we'll end up using Debian.

But let's not start a flame here, there's a mailing list for that ;)

> > Additionally, NOTHING depends on a version of pixman newer then 0.10.x. 
> 
> I added pixman to package.keywords long ago to satisfy either an xorg or cairo
> dependency, i.e. at the time I needed to arch-unmask pixman.

That's true, I did it too. I think that was mozilla-firefox that required it, because it lies somewhere around nss/nspr in my package.keywords.


Comment 54 Petteri Räty (RETIRED) gentoo-dev 2008-07-21 20:53:58 UTC
(In reply to comment #52)
> 
> So remove the entire /etc/portage/package.keywords/mask/unmask mechanism from
> Gentoo.  Don't admonish me for using available, documented functionality in a
> way that satisfies my particular needs.
> 

We encourage people to use the functionality we provide any way they want but what makes you think we would be obliged to provide support to every scenario possible? Supported means that it's expected to work. Mixing arch and ~arch is not expected to be a flawless experience. The problem with gcc is that even if you depend on >=gcc-4.2 it doesn't automatically make it the selected gcc and stuff will still fail.
Comment 55 Soren Sandmann 2008-07-21 21:20:47 UTC
Maybe I don't appreciate The Gentoo Way, but why don't you just let pixman's configure script figure it out by itself? If it detects that SSE2 can be used, it will ...
Comment 56 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 21:31:36 UTC
Soren,

Simply because a lot of people build binary packages for other machines. Heck, you're even trying to work around your own configure script by not allowing SSE on x86 due to the OLPC.

I was actually going to discuss this with you. There's all this effort to inject the proper CFLAGS into the build step. Why not allow users and distro packages to include the proper CFLAGS without all this.

For example, for all amd64/x86_64 based platforms GCC will default to having -mmmx -msse and -msse2 enabled so these checks are actually pointless. In fact, thinking about it since it's on by default on amd64/x86_64 for gcc 4.1 users, they will always build with sse/sse2 code and as such result in the same crashes you've been trying to prevent. In those situations you'll need to specifically pass -mno-sse2 to prevent sse2 from being used. So the bug still exists.

It's not really the Gentoo way, it's simply not trying to do a distro packagers job in a configure script.

Comment 57 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 21:33:37 UTC
btw. From the gcc 3.4 man page it specifically states that -mfpmath=sse, -msse and -msse2 are default on for x86-64/amd64 architecture.

I'd honestly say remove all those checks and instruct packagers and users to do the right thing in INSTALL
Comment 58 Doug Goldstein (RETIRED) gentoo-dev 2008-07-21 21:51:37 UTC
$ uname -m
x86_64
$ gcc -dumpversion
3.4.6

$ ./configure
...
checking whether to use MMX intrinsics... yes
checking whether to use SSE intrinsics... yes
checking whether to use SSE2 intrinsics... no

$ make > /dev/null
pixman-pict.c:111: warning: 'fbCompositeOver_x888x8x8888' defined but not used
pixman-pict.c:1062: warning: 'fbCompositeSrcSrc_nxn' defined but not used
pixman-trap.c:91: warning: 'dump_image' defined but not used

Now if we look at a list of SSE2 instructions.. i.e. http://docs.sun.com/app/docs/doc/817-5477/6mkuavhrn?a=view

And search through the result object using objdump, you'll find that SSE2 was still used on a build not using gcc 4.2 or higher..

$ objdump -d pixman/.libs/libpixman-1.so | grep movlpd


Comment 59 Philip Kovacs 2008-07-21 22:10:20 UTC
(In reply to comment #54)
> (In reply to comment #52)
> > 
> > So remove the entire /etc/portage/package.keywords/mask/unmask mechanism from
> > Gentoo.  Don't admonish me for using available, documented functionality in a
> > way that satisfies my particular needs.
> > 
> 
> We encourage people to use the functionality we provide any way they want but
> what makes you think we would be obliged to provide support to every scenario
> possible? Supported means that it's expected to work. Mixing arch and ~arch is
> not expected to be a flawless experience. The problem with gcc is that even if
> you depend on >=gcc-4.2 it doesn't automatically make it the selected gcc and
> stuff will still fail.
> 

Mine was the eighteenth comment in a long list of prior comments from people observing this bug.  Your assertion that [I think you are obliged to provide support to every scenario possible] is not fair.  I reported my experience in good faith, that's all. If mixing arch and ~arch somehow forfeits my right to report my experience, please say so.  It's news to me.
 
Comment 60 Petteri Räty (RETIRED) gentoo-dev 2008-07-21 22:18:46 UTC
(In reply to comment #59)
> 
> Mine was the eighteenth comment in a long list of prior comments from people
> observing this bug.  Your assertion that [I think you are obliged to provide
> support to every scenario possible] is not fair.  I reported my experience in
> good faith, that's all. If mixing arch and ~arch somehow forfeits my right to
> report my experience, please say so.  It's news to me.
> 

It doesn't forfeit the right and you actually should report the findings so that they can be fixed but I was just trying to explain Cardoe's comment as it's quite easy to misunderstand as a negative comment towards users. I guess my comment wasn't that easy to understand either. Many users don't understand that the devs do this on their own free time and as such you can't expect to get support from us for everything but most of us do try to help as best as we can. If people need further clarification or want to discuss this more contact me on IRC because this is way OT for this bug.
Comment 61 Soren Sandmann 2008-07-21 22:20:31 UTC
Yes, on amd64 the 4.2 requirement does not apply. Feel free to submit a patch for that.