[118041] trunk/dports/databases/mysql56

Marcus Calhoun-Lopez mcalhoun at macports.org
Thu Mar 20 17:13:14 PDT 2014


I submitted the patch that was committed in r118041.
I will try to explain my tortured logic.

mysql was already silently using g++ as the C++ compiler for 32-bit builds.
Apparently, clang caused a problem at some point (See #42943 for more details).

Some possible solutions were:
1) Blacklist clang for 32-bit builds, in which case MacPorts would fallback to llvm-gcc42.
        Since llvm-gcc42 is not working on Mavericks (#42849), this did not seem like an optimal choice.

2) For 32-bit builds, blacklist versions of clang in use at the time the problem was first reported.
        Since there is no guarantee that subsequent version of clang (or mysql) fixed the problem,
        this also seemed less than ideal.

3) Set "configure.compiler gcc”

4) Let mysql continue to use whichever g++ it could find.
        This is more or less the same as setting "configure.compiler gcc"
        At least setting configure.compiler makes the ambiguity obvious.
        Is that a virtue?

Solution 4 seemed to be the lesser of the evils.
I hope I did not miss an obvious solution.

-Marcus


On Mar 20, 2014, at 10:27 AM, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Mar 19, 2014, at 19:28, pixilla at macports.org wrote:
> 
>> Revision
>> 118041
>> Author
>> pixilla at macports.org
>> Date
>> 2014-03-19 17:28:20 -0700 (Wed, 19 Mar 2014)
>> Log Message
>> 
>> databases/mysql56:
>> - Fix universal build. Closes #42938
>> - Use the right compiler. Closes #42943
> 
>> Modified: trunk/dports/databases/mysql56/Portfile (118040 => 118041)
> 
> 
>> +    # Don't allow mysql to set the compiler to g++
>> +    # See http://bazaar.launchpad.net/~mysql/mysql-server/5.6/revision/4223.1.4
>> +    # See also #42943
>> +    patchfiles-append   patch-CMakeLists.txt.diff
>> +    if { (![variant_isset universal] && ${build_arch} eq "i386") || ([variant_isset universal] && [lsearch ${universal_archs} i386] != -1) } {
>> +        # Disallow clang versions older than the clang version which caused the problem
>> +        #compiler.blacklist {clang < 425}
>> +        
>> +        # Disallow all clang versions
>> +        #compiler.blacklist *clang*
>> +        
>> +        # switch to /usr/bin/gcc and /usr/bin/g++
>> +        # closest to SET(CMAKE_CXX_COMPILER g++) removed in the patchfile
>> +        configure.compiler gcc
>> +    }
> 
> “gcc” could be anything — from gcc 4.0 or 4.2 to llvm-gcc to clang, depending on the Xcode version. Setting configure.compiler to “gcc” is the exact opposite of using the right compiler. MacPorts shouldn’t even have that as a value for configure.compiler.
> 
> What is the real problem that you’re trying to solve here?
> 
> 
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



More information about the macports-dev mailing list