First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 211296
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: media-gfx herd <graphics@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ryan Hill <dirtyepic@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gcc43.patch netpbm-gcc43.patch patch Harald van Dijk 2008-02-25 20:32 0000 331 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 211296 depends on: Show dependency tree
Show dependency graph
Bug 211296 blocks: 198121
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-02-24 19:02 0000
I don't have a patch since I don't know MMX builtins and it seems like no one
at the other distros do either ;P.  The workaround for this error is
append-flags -flax-vector-conversions, which is the route it seems everyone has
taken.  I would recommend we do the same until someone fixes this correctly. 
This code is only triggered by -msse, so this is x86/x86_64 specific.


the error:

i686-pc-linux-gnu-gcc -Wall -c
-I/var/tmp/portage/media-libs/netpbm-10.41.0/work/netpbm-10.41.0/lib -I.
-Iimportinc -DNDEBUG  -O2 -g -march=prescott -fomit-frame-pointer -pipe -fPIC \
            -o libpbm3.o libpbm3.c
libpbm3.c: In function 'packBitsWithMmxSse':
libpbm3.c:107: warning: specifying vector types with __attribute__ ((mode)) is
deprecated
libpbm3.c:107: warning: use __attribute__ ((vector_size)) instead
libpbm3.c:116: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
libpbm3.c:116: error: incompatible type for argument 1 of
'__builtin_ia32_pcmpeqb'
libpbm3.c:116: error: incompatible type for argument 2 of
'__builtin_ia32_pcmpeqb'
libpbm3.c:116: error: incompatible types in initialization
libpbm3.c:118: error: incompatible type for argument 1 of
'__builtin_ia32_pmovmskb'
make[1]: *** [libpbm3.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/media-libs/netpbm-10.41.0/work/netpbm-10.41.0/lib'


the code if anyone wants to look at this:

    typedef int v8qi __attribute__ ((mode(V8QI)));
    typedef int di __attribute__ ((mode(DI)));

    di const zero64 = 0;        /* to clear with PXOR */

    unsigned int col;

    for (col = 0; col + 7 < cols; col += 8) {
        v8qi const compare =
            __builtin_ia32_pcmpeqb(*(v8qi*) (&bitrow[col]), *(v8qi*) &zero64);
        unsigned char const backwardWhiteMask = (unsigned char)
            __builtin_ia32_pmovmskb(compare);
        unsigned char const backwardBlackMask = ~backwardWhiteMask;
        unsigned char const blackMask = bitreverse[backwardBlackMask];

        packedBits[col/8] = blackMask;
    }



To prevent the deprecated warning change
    typedef int v8qi __attribute__ ((mode(V8QI)));
to
    typedef int v8qi __attribute__ ((vector_size(8)));

------- Comment #1 From Harald van Dijk 2008-02-25 20:14:53 0000 -------
Looks like it simply needs
  typedef char v8qi __attribute__ ((vector_size(8)));

I've checked that the resulting netpbm still works using
  netpbm pbmtoatk testgrid.pbm | netpbm atktopbm - | diff testgrid.pbm -
(and verified that the modified code gets executed by atktopbm)

------- Comment #2 From Harald van Dijk 2008-02-25 20:32:35 0000 -------
Created an attachment (id=144639) [edit]
netpbm-gcc43.patch

In a nice patch format...

------- Comment #3 From Ryan Hill 2008-02-26 00:37:56 0000 -------
i thought the base type was ignored when defining vector types with builtins.

------- Comment #4 From Ryan Hill 2008-02-26 00:42:07 0000 -------
ahhh.  it helps if the manual i'm looking at isn't for 3.4.4.  :P

thanks!

------- Comment #5 From Grégoire Favre 2008-03-28 17:06:06 0000 -------
Any idea why this patch isn't included as it works just like a charm ?
I know gcc-4.3.x isn't really in portage, but it will prepare the future, no ?

------- Comment #6 From SpanKY 2008-03-28 18:22:03 0000 -------
learn a little bit of patience please

------- Comment #7 From Grégoire Favre 2008-03-28 18:55:58 0000 -------
Well, I am not complaining... so either my english is too bad and I didn't
wrote what I am feeling, or ???

Anyway, thank for the patch :-)

------- Comment #8 From SpanKY 2008-03-29 16:18:25 0000 -------
sent fix upstream and i merged what he committed

http://sources.gentoo.org/media-libs/netpbm/netpbm-10.26.52.ebuild?r1=1.1&r2=1.2
http://sources.gentoo.org/media-libs/netpbm/netpbm-10.42.0.ebuild?r1=1.1&r2=1.2
http://sources.gentoo.org/media-libs/netpbm/files/netpbm-10.42.0-gcc43.patch?rev=1.1

------- Comment #9 From Samuli Suominen 2008-06-16 15:11:43 0000 -------
*** Bug 227451 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug