Bug 692464

Summary: Ghostscript 9.04 fails to build on ~x86 without SSE2 support
Product: Ghostscript Reporter: Timo Gurr <timo.gurr>
Component: Build ProcessAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: build.log
ghostscript-9.04-sse2-fix.patch

Description Timo Gurr 2011-08-25 14:52:12 UTC
Created attachment 7831 [details]
build.log

System uname: Linux-2.6.38.7-yoruichi-i686-AMD_Athlon-tm-_XP_3200+-with-gentoo-2.0.2

build failure:

In file included from ./base/gxht_thresh.c:45:0:                                
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/include/emmintrin.h:32:3: error: #error
"SSE2 instruction set not enabled"

Offending Ghostscript git commit:
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=4132ef5d36ff63b2b84f9864b7240609ac84ac38

Downstream Gentoo bug with more information and complete build.log:
https://bugs.gentoo.org/show_bug.cgi?id=379597
Comment 1 Timo Gurr 2011-08-25 14:54:48 UTC
Created attachment 7832 [details]
ghostscript-9.04-sse2-fix.patch

Proposed patch by Andrew Savchenko, source: https://bugs.gentoo.org/show_bug.cgi?id=379597#c4
Comment 2 Chris Liddell (chrisl) 2011-08-25 15:13:51 UTC
It works correctly for me, and the patch makes no sense - if the compile test fails, then the compile and link test should also fail (which it does for me).

I'm using autoconf 2.67, but I'm not aware of anything that should cause problems with the stated required version (2.52).
Comment 3 Timo Gurr 2011-08-26 10:10:13 UTC
(In reply to comment #2)
> It works correctly for me, and the patch makes no sense - if the compile test
> fails, then the compile and link test should also fail (which it does for me).

Thanks for investigating, in the meantime we found out that it has to be some CFLAGS/LDFLAGS combination causing the error. If it's some valid combination causing the problem the reporter will report and reopen this bug.
Comment 4 Chris Liddell (chrisl) 2011-08-26 10:23:15 UTC
Thanks for updating this bug, much appreciated.

Indeed, if you do established a sane set of flags that reproduces the problem, I'll be happy to investigate.