Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310615 - =dev-db/mysql-5.1.44-r1 fails to compile: Active GCC too old.
Summary: =dev-db/mysql-5.1.44-r1 fails to compile: Active GCC too old.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 310533
  Show dependency tree
 
Reported: 2010-03-21 21:58 UTC by nietonfir
Modified: 2010-03-23 07:45 UTC (History)
0 users

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 nietonfir 2010-03-21 21:58:22 UTC
According to the eclass >mysql-5.0.83 needs at least GCC4.3, but the ebuild says _DEPEND="|| ( >=sys-devel/gcc-4.3 >=sys-devel/gcc-apple-4.2 )"_.

My current gcc-version is: gcc (GCC) 4.2.1 (Apple Inc. build 5574).

After commenting lines 612 - 618 in the mysql.eclass [1], mysql emerges just fine. Any ideas how to solve this one without providing a prefixed eclass? Maybe by adding another method that passes also the name? I don't know where gcc-version is set, but one could add gcc-name [2] and then [3] check for apple(s). ;)

[1]:
#       # Bug #290570 fun. Upstream made us need a fairly new GCC4.
#       if mysql_version_is_at_least "5.0.83" ; then
#               GCC_VER=$(gcc-version)
#               case ${GCC_VER} in
#                       2*|3*|4.0|4.1|4.2) die "Active GCC too old! Must have at least GCC
4.3" ;;
#               esac
#       fi

[2]:
gcc-name () 
{ 
    $(tc-getCC "$@")
}

[3] (no correct bash but you get the meaning):
       # Bug #290570 fun. Upstream made us need a fairly new GCC4.
       if mysql_version_is_at_least "5.0.83" ; then
               GCC_VER=$(gcc-version)
               GCC_NAME=${gcc-name}
               case ${GCC_VER} in
                       2*|3*|4.0|4.1) die "Active GCC too old! Must have at least GCC
4.3" ;;
                       4.2) if [ ${gcc-name} != "*apple"* ]; then
                                die "Active GCC too old"
                            fi ;;
               esac
       fi
Comment 1 nietonfir 2010-03-21 22:03:07 UTC
Another idea would be to completely remove the check from the eclass because it's already managed through the ebuild DEPEND...
Comment 2 Fabian Groffen gentoo-dev 2010-03-23 07:45:43 UTC
I added this patch instead:

Index: mysql.eclass
===================================================================
--- mysql.eclass        (revision 57509)
+++ mysql.eclass        (working copy)
@@ -612,8 +612,9 @@
        # Bug #290570 fun. Upstream made us need a fairly new GCC4.
        if mysql_version_is_at_least "5.0.83" ; then
                GCC_VER=$(gcc-version)
-               case ${GCC_VER} in
-                       2*|3*|4.0|4.1|4.2) die "Active GCC too old! Must have at least GCC4.3" ;;
+               case ${CHOST}:${GCC_VER} in
+                       *-darwin*:4.*) : ;;
+                       *:2*|3*|4.0|4.1|4.2) ewarn "Active GCC too old! Must have at least GCC4.3" ;;
                esac
        fi