Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12561 - emerge media-libs/libpng-1.2.5-r1 fails on on AMD-k6 arch
Summary: emerge media-libs/libpng-1.2.5-r1 fails on on AMD-k6 arch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-22 08:52 UTC by Sascha Herrmann
Modified: 2004-05-13 09:24 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Herrmann 2002-12-22 08:52:11 UTC
HI folks,
while updating media-libs/libpng-1.2.5-r1 following error message appered:

[...]
gcc -I/usr/include -Wall -march=k6 -O3 -pipe -fomit-frame-pointer -funroll-loops
     -c -o pngrtran.o pngrtran.c
{standard input}: Assembler messages:
{standard input}:1088: Error: value of ffffffffffffff7f too large for field of 1
bytes at 0000000000001019
make: *** [pngrtran.o] Error 1

!!! ERROR: media-libs/libpng-1.2.5-r1 failed.
!!! Function src_compile, Line -90, Exitcode 2
!!! (no error message)

I have been using CFLAGS="-march=k6 -O3 -pipe -fomit-frame-pointer" and again
(like a previos bug i reported on mysql) thats the problem!

SOLUTION:
Using CFLAGS="-march=k6 -O3 -pipe -fomit-frame-pointer" solves this problem
again, so i recommend to insert the following lines into the libpng-1.2.5-r1.ebuild:

inherit flag-o-matic
replace-flags "-march=k6-3" "-march=i586"
replace-flags "-march=k6-2" "-march=i586"
replace-flags "-march=k6" "-march=i586"

with regards
Sascha Herrmann
Comment 1 foser (RETIRED) gentoo-dev 2002-12-22 15:00:33 UTC
What about tuning down on optimisations ? O2 and the like any effect ?
Comment 2 Sascha Herrmann 2002-12-22 15:34:44 UTC
No, replacing -O3 with -O2 had no effect, it's the -march=k6 flag, as i
discovered this error this evening again in graphivx! And there it was the same
fault. This kind of errors increased in number since i updated to new stable
binutils and gcc-3.2.1, but i found some of them even before (like in bug#11681 !)
bye Sascha
Comment 3 foser (RETIRED) gentoo-dev 2002-12-22 16:04:38 UTC
would be nice if someone could pin it down on a certain pack, so we can send a
bugreport upstream. I'll fix the libpng ebuild.
Comment 4 Sascha Herrmann 2002-12-22 16:29:59 UTC
H
Comment 5 Sascha Herrmann 2002-12-22 16:29:59 UTC
Hähh, how do you mean "pin it down on a certain pack"????
if you need more proofs for my report, i can send you all my error log that i
solved with downgrading form -march=k6 to -march=i586!
This problem can't be assigned to a certain combination of packages, because it
seems to be a bug in the combination of binutils and gcc (and i had at least 2*2
different combinations with similar errors!) The problem is that binary code is
produced, that doesn't do would it#s supposed to do!
bye Sascha
Comment 6 foser (RETIRED) gentoo-dev 2002-12-23 07:44:08 UTC
4 different combinations ? ;)

And i know what the problem is yeah

anyway, fixed in the tree
Comment 7 Hezekiah 2003-01-13 22:06:30 UTC
How I solved it:

I used CFLAGS="-march=k6-2 -O3 -pipe -fomit-frame-pointer" and got the same
error. However, the problem for me was not the -march param. It was
-fomit-frame-pointer. (I had a similer problem with net-print/cups. See bug
#13471.) I removed -fomit-frame-pointer from the CFLAGS, and it built fine! :)

That's my experiance. So, you just might not need to change -march after all. :)
Comment 8 foser (RETIRED) gentoo-dev 2003-01-14 08:41:32 UTC
Can you confirm that sascha ?
Comment 9 Sascha Herrmann 2003-01-14 09:14:04 UTC
Hmm,

for the "K6-2" i can confirm hezekiah version. Yes it works without -fomit-frame..
for the "K6", yes it even works for k6 arch without -fomit-frame...

Maybe that
Comment 10 Sascha Herrmann 2003-01-14 09:14:04 UTC
Hmm,

for the "K6-2" i can confirm hezekiah version. Yes it works without -fomit-frame..
for the "K6", yes it even works for k6 arch without -fomit-frame...

Maybe that´s the better solution, but what about all those without k6* archs, do
they have to compile it without -fomit-frame.. when we change this, or are there
smart filter-flags like "filter this when march=that"???

bye Sascha
Comment 11 Hezekiah 2003-01-15 13:08:42 UTC
Here's some code that would remove -fomit-frame-pointer ONLY if -march is set to
a k6 type arch (i.e. k6, k6-2, k6-3). This way you can remove
-fomit-frame-pointer for k6* but still let the rest of the archs use it. :)

----------

inherit flag-o-matic

case `get-flag march` in 
    k6*) filter-flags -fomit-frame-pointer ;;
esac

----------

Hope that helps. :)
Comment 12 Brett 2003-12-08 04:08:06 UTC
I am getting this error when compiling on a K6-2 with flags:
-O3 -mcpu=k6-2 -march=i586 -fomit-frame-pointer -pipe

The following two lines in the ebuild (either will work) are a workaround.
replaceflags "-fomit-frame-pointer" ""
replaceflags "-mcpu=k6-2" "-mcpu=i586"

So therefore, the -mcpu flag (and not just the -march flag) can cause this bug.
Comment 13 Viperlin 2004-05-13 09:24:53 UTC
*** Bug 50931 has been marked as a duplicate of this bug. ***