The missing declaration of variable "col" breaks the build of netpbm. gcc -c -I/usr/ports/works/usr/ports/graphics/netpbm/work/netpbm-10.25/lib -I. -DNDEBUG -O2 -pipe -s -march=pentium4 -fpic -DPIC \ -o libpbm3.lo libpbm3.c libpbm3.c: In function `packBitsWithMmxSse': libpbm3.c:83: error: `col' undeclared (first use in this function) libpbm3.c:83: error: (Each undeclared identifier is reported only once libpbm3.c:83: error: for each function it appears in.) libpbm3.c:86: warning: cast to pointer from integer of different size gmake[1]: *** [libpbm3.lo] Error 1 gmake[1]: Leaving directory `/usr/ports/works/usr/ports/graphics/netpbm/work/netpbm-10.25/lib' gmake: *** [lib/all] Error 2 *** Error code 2 Stop in /usr/ports/graphics/netpbm. How-To-Repeat: % cd /usr/ports/graphics/netpbm % make
Hi all, The same bug has bitten me on my 5.3 system. This is apparently a known issue, per the netpbm-10.25 release notes @ http://sourceforge.net/project/shownotes.php?release_id=275719: "libpbm3.c won't compile if you use a -msse Gcc compile flag. The error is "undefined variable 'col'." You need to add the declaration "int c;"." In fact, that doesn't appear to be totally correct; you need to simply declare "int col;" The port compiles successfully with the following patch, though I have not tested it yet: --- lib/libpbm3.c Fri Oct 1 08:56:33 2004 +++ lib/libpbm3.c.patch Mon Nov 15 15:24:59 2004 @@ -80,6 +80,8 @@ di const zero64 = 0; /* to clear with PXOR */ + int col; + for (col =0; col < cols-7; col += 8) packedBits[col/8] = bitreverse [ ~ (unsigned char) __builtin_ia32_pmovmskb ( -- Justin
Responsible Changed From-To: freebsd-ports-bugs->dinoex Over to maintainer
> cc -c -I/usr/ports/graphics/netpbm/work/netpbm-10.25/lib -I. -DNDEBUG -g -O= > -pipe -fpic -DPIC \ > -o libpbm3.lo libpbm3.c > libpbm3.c: In function `packBitsWithMmxSse': > libpbm3.c:83: error: `col' undeclared (first use in this function) > libpbm3.c:83: error: (Each undeclared identifier is reported only once > libpbm3.c:83: error: for each function it appears in.) > gmake[1]: *** [libpbm3.lo] Error 1 It builds fine with FreeBSD-4.10 and FreeBSD-5.3 default. Pleae verfiy if the patch in http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/73964 solves your problem. kind regards Dirk - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
State Changed From-To: open->closed committed, thanks.
On Wed, 2004-11-17 at 06:24 +0100, Dirk Meyer wrote: > > cc -c -I/usr/ports/graphics/netpbm/work/netpbm-10.25/lib -I. -DNDEBUG -g -O= > > -pipe -fpic -DPIC \ > > -o libpbm3.lo libpbm3.c > > libpbm3.c: In function `packBitsWithMmxSse': > > libpbm3.c:83: error: `col' undeclared (first use in this function) > > libpbm3.c:83: error: (Each undeclared identifier is reported only once > > libpbm3.c:83: error: for each function it appears in.) > > gmake[1]: *** [libpbm3.lo] Error 1 > > It builds fine with FreeBSD-4.10 and FreeBSD-5.3 default. > > Pleae verfiy if the patch in > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/73964 > > solves your problem. Yes, that does indeed solve my problem. Thanks Cheers, Sean