Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379597 - app-text/ghostscript-gpl-9.04-r1 fails to build on ~x86 without SSE2 support
Summary: app-text/ghostscript-gpl-9.04-r1 fails to build on ~x86 without SSE2 support
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL: http://bugs.ghostscript.com/show_bug....
Whiteboard: tracking upstream
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 17:22 UTC by Andrew Savchenko
Modified: 2011-08-26 10:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,809.93 KB, text/plain)
2011-08-17 17:23 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,8.03 KB, text/plain)
2011-08-17 17:23 UTC, Andrew Savchenko
Details
ghostscript-gpl-9.04-sse2.patch (ghostscript-gpl-9.04-sse2.patch,350 bytes, patch)
2011-08-18 08:37 UTC, Andrew Savchenko
Details | Diff
ghostscript-gpl-9.04-r1.ebuild.patch (ghostscript-gpl-9.04-r1.ebuild.patch,425 bytes, patch)
2011-08-18 08:39 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2011-08-17 17:22:42 UTC
Hello,

build fails here:

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"

My CPU is Athlon-XP and SSE2 instruction set is obviously absent.
Comment 1 Andrew Savchenko gentoo-dev 2011-08-17 17:23:30 UTC
Created attachment 283673 [details]
build.log
Comment 2 Andrew Savchenko gentoo-dev 2011-08-17 17:23:48 UTC
Created attachment 283675 [details]
emerge --info
Comment 3 Andrew Savchenko gentoo-dev 2011-08-17 17:48:33 UTC
MAKEOPTS="-j1" FEATURES="-distcc -ccache" emerge ghostscript-gpl
fails in the same way.
Comment 4 Andrew Savchenko gentoo-dev 2011-08-18 08:37:35 UTC
Created attachment 283723 [details, diff]
ghostscript-gpl-9.04-sse2.patch

-DHAVE_SSE2 was mistakenly added to the compilation flags, because of malfunctioned sse2 check in configure script. Compilation test must be used instead of linking test. 

Proposed patch fixes this bug.
Comment 5 Andrew Savchenko gentoo-dev 2011-08-18 08:39:42 UTC
Created attachment 283727 [details, diff]
ghostscript-gpl-9.04-r1.ebuild.patch

SSE2 patch must be applied before eautoreconf.
Comment 6 Timo Gurr (RETIRED) gentoo-dev 2011-08-25 14:57:57 UTC
(In reply to comment #4)
> Proposed patch fixes this bug.

I've created an upstream bug, see URL.
Comment 7 Timo Gurr (RETIRED) gentoo-dev 2011-08-25 15:21:57 UTC
(In reply to comment #2)
> emerge --info

Please confirm that it also fails when using sane(er) CLFAGS/LDFLAGS like:

CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 8 Andrew Savchenko gentoo-dev 2011-08-25 17:20:55 UTC
Hmm,

it compiles with my default CFLAGS/CXXFLAGS and simplified LDFLAGS="-Wl,-O1,--as-needed". Though, original LDFLAGS are formally valid.
Comment 9 Timo Gurr (RETIRED) gentoo-dev 2011-08-26 10:04:45 UTC
(In reply to comment #8)
> it compiles with my default CFLAGS/CXXFLAGS and simplified
> LDFLAGS="-Wl,-O1,--as-needed". Though, original LDFLAGS are formally valid.

Well I can't judge on this since your flags are quite.. huge and beyond my knowledge. But shouldn't at least -march be the same for CFLAGS and LDFLAGS? And at least my Atom CPU supports SSE2 hence perhaps the problem?

If you find out the problematic flag and if it's really not something unsupported or the like, please solve it upstream and reopen this bug.