Subject: pkg/33292: libpng build fails on amd64
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gary Duzan <gary@duzan.org>
List: pkgsrc-bugs
Date: 04/19/2006 12:25:01
>Number:         33292
>Category:       pkg
>Synopsis:       libpng build fails on amd64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 19 12:25:00 +0000 2006
>Originator:     Gary Duzan
>Release:        NetBSD 3.99.17
>Organization:
	Not a lot
>Environment:
System: NetBSD capo 3.99.17 NetBSD 3.99.17 (CAPO64) #17: Sun Apr 9 23:35:12 EDT 2006 gary@capo:/src/sys/arch/amd64/compile/obj.amd64/CAPO64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	libpng fails to build due to inclusion of i386 assembly code.

 cc -DHAVE_CONFIG_H -I. -O2 -MT pngpread.lo -MD -MP -MF .deps/pngpread.Tpo -c pngpread.c -o pngpread.o >/dev/null 2>&1
if /bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H  -I. -I. -I.   -I/usr/include   -O2 -I/usr/include -MT pnggccrd.lo -MD -MP -MF ".deps/pnggccrd.Tpo" -c -o pnggccrd.lo pnggccrd.c;  then mv -f ".deps/pnggccrd.Tpo" ".deps/pnggccrd.Plo"; else rm -f ".deps/pnggccrd.Tpo"; exit 1; fi
 cc -DHAVE_CONFIG_H -I. -O2 -MT pnggccrd.lo -MD -MP -MF .deps/pnggccrd.Tpo -c pnggccrd.c  -fPIC -DPIC -o .libs/pnggccrd.o
/var/tmp//cc3waCBx.s: Assembler messages:
/var/tmp//cc3waCBx.s:2321: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2407: Error: suffix or operands invalid for `pop'
/var/tmp//cc3waCBx.s:2663: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2664: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2665: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2666: Error: suffix or operands invalid for `pushf'
/var/tmp//cc3waCBx.s:2667: Error: suffix or operands invalid for `pop'
/var/tmp//cc3waCBx.s:2670: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2671: Error: suffix or operands invalid for `popf'
/var/tmp//cc3waCBx.s:2672: Error: suffix or operands invalid for `pushf'
/var/tmp//cc3waCBx.s:2673: Error: suffix or operands invalid for `pop'
/var/tmp//cc3waCBx.s:2674: Error: suffix or operands invalid for `push'
/var/tmp//cc3waCBx.s:2675: Error: suffix or operands invalid for `popf'
/var/tmp//cc3waCBx.s:2693: Error: suffix or operands invalid for `pop'
/var/tmp//cc3waCBx.s:2694: Error: suffix or operands invalid for `pop'
/var/tmp//cc3waCBx.s:2695: Error: suffix or operands invalid for `pop'
*** Error code 1

Stop.
make: stopped in /pkgsrc/graphics/png/work.x86_64/libpng-1.2.9

>How-To-Repeat:
	Try building libpng on amd64.
>Fix:
	I worked around it by adding

CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE

to the Makefile in graphics/png. Other things are broken (e.g.
ImageMagick), but it isn't clear if this is related to the workaround
or the overall png breakage.