Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116686 - mysql 5.x crashes with gcc 3.4.4 and "optimized" CFLAGS
Summary: mysql 5.x crashes with gcc 3.4.4 and "optimized" CFLAGS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
Depends on:
Reported: 2005-12-25 05:26 UTC by Tiziano Müller (RETIRED)
Modified: 2005-12-27 03:52 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2005-12-25 05:26:42 UTC
The problem was nearly the same as described in bug #110560.

My CFLAGS var was set to "-march=pentium4 -O3 -pipe -fomit-frame-pointer -mmmx -m3dnow -msse -msse2" (no comments on the non-sense of it, please :-)

The result was that mysql (and mysql-administrator) crashed.

I tried different versions of mysql, even the 5.1_alpha. All with the same result. For me it seemed that gcc-3.4.4 + mysql + CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer" could be a problem.

So I did: 'CFLAGS="-O2" emerge mysql' and now it works.
Comment 1 Francesco R. (RETIRED) gentoo-dev 2005-12-26 14:26:30 UTC
need to comment the nonsense ;-)

MySQL AB build and test it's binaryes with "-O3" so I strongly doubt that it is the cause (expecially with gcc-3.4).

try CFLAGS="-O3" emerge mysql , it should work fine.

instead, you could define "mmm" "sse" "sse2" "3dnow" as USE flags _not_ in CFLAGS.

The supported ebuild will compile with the cpu optimizations you want leaving untouched the others ebuild.

Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2005-12-26 16:44:13 UTC
I don't think I completely understood, what you wanted to tell me.
Therefore I did some testing...

As you wrote, mysql works perfectly, when I set CFLAGS="-march=pentium4 -fomit-frame-pointer -pipe -O3"
But it crashes, when I add "-mmmx -msse -msse2 -m3dnow".

Since no other software on this machine (which is completely compiled with the mentioned CFLAGS), I think that's a problem with mysql (and probably gcc). Could you please explain to me, why you think it's not?

Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2005-12-26 17:21:18 UTC
Well, did another test. Removing "3dnow" from the CFLAGS did resolve it. I don't think, that this will give the slightest performance, so...
you can close this bug :-)
Comment 4 Francesco R. (RETIRED) gentoo-dev 2005-12-27 03:52:03 UTC
mmh, try to explain:
it's a question of "real life" versus "perfect world", sure it's mysql or gcc that fail with those optimization but because the gain using them is not huge and the dificult to debug and keep stable is great, noone will fix the problem ;-) .

Also it's gentoo policy to close bugs depending on non standard CFLAGS.


P.S. If no other software has problem you're lucky ;-)