Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312435 - ~dev-db/mysql-5.1 fails to build with GCC 4.5
Summary: ~dev-db/mysql-5.1 fails to build with GCC 4.5
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL: http://bugs.mysql.com/bug.php?id=52514
Whiteboard:
Keywords:
: 317681 319655 (view as bug list)
Depends on:
Blocks: gcc-4.5 322359
  Show dependency tree
 
Reported: 2010-03-31 15:18 UTC by Daniel J.
Modified: 2010-08-09 14:36 UTC (History)
8 users (show)

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


Attachments
build.log (build.log,69.03 KB, text/plain)
2010-03-31 15:18 UTC, Daniel J.
Details
Patch to skip do_abi_check (mysql-5.1.45-skip-abi-check.patch,1.12 KB, patch)
2010-03-31 15:19 UTC, Daniel J.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel J. 2010-03-31 15:18:17 UTC
When building dev-db/mysql with gcc 4.5, the build fails with the following message:

make[2]: *** [do_abi_check] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.1.45-r1/work/mysql'
make[1]: *** [abi_check] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.1.45-r1/work/mysql'
make: *** [all-recursive] Error 1
 * ERROR: dev-db/mysql-5.1.45-r1 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line   48:  Called src_compile
 *   environment, line 4415:  Called mysql_src_compile
 *   environment, line 3878:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";

The failure occurs during an ABI-change check designed for internal MySQL developers.  The failure results from a change in behavior of GCC's preprocessor.  Previously, when the preprocessor was unable to #include a header, it would leave the #include intact and issue an error on stderr, but continue to process the file.  With GCC 4.5, the preprocessor immediately aborts and does not complete the preprocessing.  Here's a comparison:

cd /var/tmp/portage/dev-db/mysql-5.1.45-r1/work/mysql

/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.3/gcc -E -nostdinc -dI -I./include -I./include/mysql -I./sql -I./include -I./include/mysql -I./sql include/mysql.h
include/mysql.h:47:23: error: sys/types.h: No such file or directory
<much valid preprocessed output, snipped>

/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0-pre9999/gcc -E -nostdinc -dI -I./include -I./include/mysql -I./sql -I./include -I./include/mysql -I./sql include/mysql.h
include/mysql.h:47:23: fatal error: sys/types.h: No such file or directory
compilation terminated.
# 1 "include/mysql.h"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "include/mysql.h"
# 47 "include/mysql.h"
#include <sys/types.h>

Since do_abi_check is for internal debugging use, it can be safely eliminated for end-user builds.
Comment 1 Daniel J. 2010-03-31 15:18:35 UTC
Created attachment 225971 [details]
build.log
Comment 2 Daniel J. 2010-03-31 15:19:36 UTC
Created attachment 225973 [details, diff]
Patch to skip do_abi_check
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-03-31 20:05:27 UTC
Raised upstream:
http://bugs.mysql.com/bug.php?id=52514

I'll wait for their response before including that patch, because it's meant as a safety value to detect changes due to user systems too.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-04-09 01:25:10 UTC
Upstream has confirmed, but has no fix yet. I'd expect to see it in 5.1.47 probably.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2010-04-16 06:07:39 UTC
do you mind if we leave this open until upstream releases a fixed version so it shows up on the 4.5 tracker?
Comment 6 Rafał Mużyło 2010-04-29 00:38:26 UTC
*** Bug 317681 has been marked as a duplicate of this bug. ***
Comment 7 fkhp 2010-05-02 01:46:49 UTC
(In reply to comment #5)
> do you mind if we leave this open until upstream releases a fixed version so it
> shows up on the 4.5 tracker?
> 

a patch is ready, please put it into the package:

http://bugs.mysql.com/file.php?id=14421

http://bugs.mysql.com/bug.php?id=52514
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-05-02 02:20:28 UTC
(In reply to comment #7)
> (In reply to comment #5)
> a patch is ready, please put it into the package:
> 
> http://bugs.mysql.com/file.php?id=14421
> http://bugs.mysql.com/bug.php?id=52514

Have you noticed there hasn't been any change since Robin's last comment? He's the reporter of the bug (in case you missed it).
Comment 9 Alex Alexander (RETIRED) gentoo-dev 2010-05-14 06:55:04 UTC
*** Bug 319655 has been marked as a duplicate of this bug. ***
Comment 10 Chris Smith 2010-07-20 03:46:38 UTC
what's the holdup here? now mysql wont even start after the openssl upgrade and there's a patch from 4 months ago that will fix this?
Comment 11 Rob 2010-07-21 18:25:55 UTC
(In reply to comment #10)
> what's the holdup here? now mysql wont even start after the openssl upgrade and
> there's a patch from 4 months ago that will fix this?
> 

That was just a temporary workaround. There was a patch (or 3?) committed upstream yesterday. The referenced bug, mysql 52514, now has the status 'documenting' and the fix should be included in 5.1.49.

You can switch to gcc 4.4, build mysql, then switch back to gcc 4.5 if you're in need of mysql quickly. 
Comment 12 Chris Smith 2010-07-21 18:35:08 UTC
(In reply to comment #11)
> That was just a temporary workaround. There was a patch (or 3?) committed
> upstream yesterday. The referenced bug, mysql 52514, now has the status
> 'documenting' and the fix should be included in 5.1.49.

As I don't really use the ssl feature currently I cheated with:
ln -s libssl.so.1.0.0 libssl.so.0.9.8
ln -s libcrypto.so.1.0.0 libcrypto.so.0.9.8

Hopefully we'll see 5.1.49 soon.
Comment 13 Rob 2010-07-27 15:44:06 UTC
mysql 5.1.49 was released:

http://forums.mysql.com/read.php?3,377551

A version bump would not only fix this but, but this one as well: http://bugs.gentoo.org/show_bug.cgi?id=321791

A version bump in ~arch would be nice.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-07-27 19:41:06 UTC
5.1.49 added to overlay, testing it now.
http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=11aa801ac65212e678ed8da7715c56a39bd5077b

Hopefully it passes the tests where 5.1.48 failed.
Comment 15 Rob 2010-08-02 16:33:51 UTC
The bug was fixed before 5.1.49 was released, but it will not be included until 5.1.50. Using the overlay doesn't help any.

http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-03 05:46:27 UTC
We've got it backported for 5.1.49, but there are other problems causing it to not pass the testsuite, so it's still only in the overlay.
Comment 17 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-08 23:44:27 UTC
Please retest w/ 5.1.49 now in the tree.
Comment 18 Chris Smith 2010-08-09 03:50:23 UTC
(In reply to comment #17)
> Please retest w/ 5.1.49 now in the tree.

Still fails here:
make[2]: *** [do_abi_check] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.1.49/work/mysql'
make[1]: *** [abi_check] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.1.49/work/mysql'
make: *** [all-recursive] Error 1

Comment 19 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-09 05:03:10 UTC
retest w/ 5.1.49-r1 now.
Comment 20 Chris Smith 2010-08-09 14:36:01 UTC
(In reply to comment #19)
> retest w/ 5.1.49-r1 now.

Compiled fine with -r1.