Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 271475

Summary: dev-db/mysql-community-5.0.77-r1 fails to compile on gcc-4.4.0
Product: Gentoo Linux Reporter: rob shelton <rob.s.ng15>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Severity: normal CC: bsdunx, bugs+gentoo, esigra, heiko, Martin.Jansa, vamp898
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: InExtras 2009/05/29
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 249226    
Attachments: Patch to change the #elif to #else

Description rob shelton 2009-05-27 22:49:38 UTC
mysql-community-5.0.77-r1 fails to compile using gcc-4.4.0 from portage due to an empty #elif cause in one file.

Reproducible: Always

Steps to Reproduce:
1.emerge -v =mysql-community-5.0.77-r1

Actual Results:  
DbaccMain.cpp:11675:6: error: #elif with no expression

Expected Results:  
Compiled and installed
Comment 1 rob shelton 2009-05-27 22:51:30 UTC
gentoo64-laptop ~ # emerge -vp mysql-community
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-db/mysql-community-5.0.77-r1  USE="berkdb cluster embedded extraengine latin1 perl ssl -big-tables -debug -max-idx-128 -minimal (-selinux) -static" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

These are the USE flags that i have on this system.
Comment 2 rob shelton 2009-05-27 22:52:38 UTC
Created attachment 192643 [details, diff]
Patch to change the #elif to #else

This patch works for the above USE flags. Other combinations may trigger other errors.
Comment 3 rob shelton 2009-05-27 22:54:25 UTC
Unfortunately I am unable to proceed any further as the mysql-community ebuild is out of my league in terms of applying patches, as there is no simple way to add an epatch line to the ebuild.

Patch tested manually by issuing appropriate ebuild commands, applying the patch, and then applying the remaining ebuild commands for the compilation/installation to complete.
Comment 4 Heiko Becker 2009-05-29 10:05:59 UTC
It seems to me the incorrect line only appears after patching the sources with 0723_all_avoid_bus_error_5.0.76.patch.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-05-30 06:04:08 UTC
Fixed in the patch series.
Comment 6 Pablo Cholaky 2009-05-30 17:00:34 UTC
I want know when will be fixed on portage.
Comment 7 Martin Jansa 2009-06-10 13:58:13 UTC
(In reply to comment #6)
> I want know when will be fixed on portage.

mysql-community-5.0.77-r1 fails to compile using gcc-4.4.0 for me, but a bit later when casting from (const char *) to (char *). 

Attached patch fixed it for me.

Maybe it would be better to cast index->table_name in strchr to make it return char * instead of const char *.

                                if((p = strchr(index->table_name, '/')))
                                        strncpy(db_name_raw, index->table_name, p-index->table_name);
                                        db_name_raw[p-index->table_name] = 0;
                                        table->field[11]->store(db_name_raw, strlen(db_name_raw), system_charset_info);
                                } else {
                                        table->field[11]->store(NULL, 0, system_charset_info);
                                        p = (char *)index->table_name;
                                strcpy(table_name_raw, p);
Comment 8 Martin Jansa 2009-06-10 13:58:45 UTC
Created attachment 194164 [details, diff]
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 18:13:56 UTC
The base #elif/#else was already in my tree.

But the additional char/constchar change will be be released in mysql-extras-20090706-1810Z shortly.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 19:09:02 UTC
5.0.83 has been committed to Gentoo now, with both of these patches.
Comment 11 Mike Auty gentoo-dev 2009-08-15 15:37:15 UTC
*** Bug 281047 has been marked as a duplicate of this bug. ***
Comment 12 Philipp Riegger 2009-08-17 19:33:59 UTC
So there is a fixed version of dev-db/mysql, but dev-db/mysql-community still fails to compile? Am I right?
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-17 19:45:50 UTC upstream has discontinued mysql-community, move to dev-db/mysql!
Comment 14 白川間瀬流 2009-11-06 17:34:59 UTC
There is no dev-db/mysql >= 5.1 and amarok needs MySQL 5.1 so without mysql-community, amarok wont work!

So until there is no dev-db/mysql-5.1.x we have to use mysql-community
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-06 17:51:42 UTC
1. dev-db/mysql-community is merged with dev-db/mysql by upstream.
2. Gentoo Amarok devs have debunked that MySQL 5.1 is required. They have it working fine with MySQL 5.0.
Comment 16 白川間瀬流 2009-11-06 18:00:08 UTC
So why isnt it working on Gentoo with 5.0? with 5.1 it works on Gentoo