Some of you have the “luxury” of having Macs with Core 2 Duo processors. I’m still working on my Core Duo Mac mini so this post isn’t really for me. But if you have one of those Macs who are capable of running 64 bit software than this post is for you.
To compile MySQL, Apache or PHP you need to add a compiler flag to the ./configure statement and that is it.
./configure etc…
(Note: this is only valid for Intel CPU’s, in case of a PowerPc use ppc_64)
I do not know how this would influence performance as I can’t run 64 bit apps. If someone would test the difference and comment their findings here that would be great.
To find out if you’ve got the capability of running 64 bit applications I found this simple test. Open a Terminal session and execute the following command:
In the output you should find a line with:
if you have got a 64 bit version or
if you have a 32 bits system just like me.
By the way I’m planning for a new Mac before the end of the year. Still need to decide what model but I’ve started saving up for it, care to help ?



Comments
9:12 pm
Environment: 10.5.5, x86_64, mysql-5.0.67
Due to 10.5, the ./configure line has been changed a little: $ CFLAGS=”-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk” ./configure –prefix=/usr/local/mysql –localstatedir=/usr/local/mysql/data –libexecdir=/usr/local/mysql/bin –libdir=/usr/local/mysql/lib –with-server-suffix=-standard –enable-thread-safe-client –enable-local-infile –enable-shared –with-zlib-dir=bundled –with-big-tables –with-readline –with-archive-storage-engine –with-innodb –without-docs –without-bench
The make returns some errors:
—
if gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR -I. -I. -I../../include -I../../include -I../../include -I../.. -DDBUG_OFF -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -MT bind.o -MD -MP -MF “.deps/bind.Tpo” -c -o bind.o bind.c; \
then mv -f “.deps/bind.Tpo” “.deps/bind.Po”; else rm -f “.deps/bind.Tpo”; exit 1; fi
bind.c: In function
1:20 pm
After reading http://dev.mysql.com/doc/refman/4.1/en/configure-options.html
a new configure line was used, that seems to do it’s thing without errors:
CFLAGS=”-arch x86_64 -m64 -O3 -isysroot /Developer/SDKs/MacOSX10.5.sdk” CXX=gcc CXXFLAGS=”-arch x86_64 -m64 -O3 -isysroot /Developer/SDKs/MacOSX10.5.sdk -felide-constructors -fno-exceptions -fno-rtti” ./configure –prefix=/usr/local/mysql –enable-assembler –with-mysqld-ldflags=-all-static –localstatedir=/usr/local/mysql/data –libexecdir=/usr/local/mysql/bin –libdir=/usr/local/mysql/lib –with-server-suffix=-standard –enable-thread-safe-client –enable-local-infile –enable-shared –with-zlib-dir=bundled –with-big-tables –with-readline –with-archive-storage-engine –with-innodb –without-docs –without-bench