Subject: pkg/24059: pkgsrc/print/ghostscript-6.01nb4 causes ICE on sparc64 -current
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/11/2004 19:06:38
>Number:         24059
>Category:       pkg
>Synopsis:       pkgsrc/print/ghostscript-6.01nb4 causes ICE on sparc64 -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 12 00:07:00 UTC 2004
>Originator:     Rafal Boni
>Release:        NetBSD 1.6ZE
Largely absent
System: NetBSD 1.6ZE NetBSD 1.6ZE (FEARLESS_VAMPIRE_KILLER) #0: Tue Nov 11 23:00:07 EST 2003 sparc64
Architecture: sparc64
Machine: sparc64
	(See also toolchain/24055, which is the compiler side of this)

	gcc ICE's while building pkgsrc/print/ghostscript-6.01nb4; the
	ICE happens at -O2 (but not at -O0) in src/gdevstp-color.c, which
	is one of the drivers pulled over from gimp-print-4.2.0.

	Here's the head & tail of the build log:

===> Checking for vulnerabilities in ghostscript-6.01nb4
=> Checksum OK for ghostscript/ghostscript-6.01.tar.bz2.
=> Checksum OK for ghostscript/jpegsrc.v6b.tar.gz.
=> Checksum OK for ghostscript/
=> Checksum OK for ghostscript/gimp-print-4.2.0.tar.gz.
=> Checksum OK for ghostscript/hpijs-1.0.2.tar.gz.
=> Checksum OK for ghostscript/hpdj-2.6.tar.gz.
=> Checksum OK for ghostscript/dmprt-2.01.tar.gz.
=> Checksum OK for ghostscript/gdev10v.tar.gz.
=> Checksum OK for ghostscript/gdevmjc-0.8.tar.gz.
=> Checksum OK for ghostscript/gdevalps-0.2.tar.gz.
=> Checksum OK for ghostscript/gdevmd2k-0.2a.tar.gz.
=> Checksum OK for ghostscript/gdevlips-2.3.6.tar.gz.
=> Checksum OK for ghostscript/gdevrpdl.tar.gz.
=> Checksum OK for ghostscript/gdevprsc-0.4.tar.gz.
=> Checksum OK for ghostscript/samsung-gdi-driver.tar.gz.
=> Checksum OK for ghostscript/gs6.01-jpdf-exp.patch.gz.
===> Extracting for ghostscript-6.01nb4
===> Required installed package ghostscript-fonts-6.0: ghostscript-fonts-6.0 found
===> Required installed package watanabe-vfont-19930318: watanabe-vfont-19930318 found
===> Required installed package png>=1.2.4: png-1.2.5nb2 found
===> Required installed package ja-vflib-lib>=2.24.2: ja-vflib-lib-2.24.2 found
===> Required installed package freetype-lib>=1.3.1nb1: freetype-lib-1.3.1nb1 found
===> Required installed package x11-links>=0.17: x11-links-0.18 found
===> Required installed package gmake>=3.78: gmake-3.80nb1 found
gcc `cat ./object/`  -O2 -DA4 -DHAVE_MKSTEMP=1 -I/usr/pkg/include -I/usr/X11R6/include -I./src -I./object  -o ./object/gdevstp-color.o -c -DDISABLE_NLS ./src/gdevstp-color.c
src/gdevstp-color.c: In function `rgb_to_rgb':
src/gdevstp-color.c:1059: error: insn does not satisfy its constraints:
(insn:HI 35 33 3244 0 0x40d28300 (set (reg:DI 31 %i7 [32])
        (fix:DI (fix:SF (reg:SF 32 %f0 [124])))) 165 {fix_truncsfdi2} (insn_list 33 (nil))
src/gdevstp-color.c:1059: internal compiler error: in reload_cse_simplify_operands, at reload1.c:8345
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.
gmake: *** [object/gdevstp-color.o] Error 1
*** Error code 2

make: stopped in /extra/pkgsrc/print/ghostscript
*** Error code 1

make: stopped in /extra/pkgsrc/print/ghostscript


	Build the above package on a post gcc3 sparc64 -current; watch
	the build break after a while.

	I'm not sure how to patch files from one of the other distfiles
	(this one comes from gimp-print-4.2.0), but tweaking the makefile
	to use -O0 vs -O2 for that file (via $(GLCC:-O2=-O0) in the right
	makefile, for example) does make it build.  I'm also not sure how
	we handle these things when they're platform-specific.

      gcc version:
  	Using built-in specs.
  	Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf --host=sparc64--netbsd --target=sparc64--netbsd
  	Thread model: posix
  	gcc version 3.3.2 (NetBSD nb1 20031026)