power computing

So, I needed to convert some MySQL tables & rows to Couch documents, see blog post from 31/01/2012 for back story, and I merrily type in

sudo port install mysql5-devel

In order to get the development libraries so I can install DBD::mysql

But lo and behold BahBow !  Fail

 Computing dependencies for mysql5-devel
---> Fetching archive for mysql5-devel
---> Attempting to fetch mysql5-devel-5.5.2-m2_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/mysql5-devel
---> Fetching mysql5-devel
---> Verifying checksum(s) for mysql5-devel
---> Extracting mysql5-devel
---> Applying patches to mysql5-devel
---> Configuring mysql5-devel
---> Building mysql5-devel
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for mysql5-devel is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql5-devel/mysql5-devel/main.log
Error: Status 1 encountered during processing.
To report a bug, see 

And I’m thinking, my dear Lord why cant I just have one day without crap.

Checking in to the logs reveals 

:info:build < #include <stdlib.h>
:info:build make[2]: *** [do_abi_check] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql5-devel/mysql5-devel/work/mysql-5.5.2-m2'
:info:build make[1]: *** [abi_check] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql5-devel/mysql5-devel/work/mysql-5.5.2-m2'
:info:build make: *** [all-recursive] Error 1

So I chuck make[1]: *** [do_abi_check] macports into Google and come across a post that suggests using a different compiler. Coolio, let’s give that a shot

sudo port clean mysql5-devel
sudo port install mysql5-devel configure.compiler=llvm-gcc-4.2

Yay !

As always, standing on the shoulders of giants…

Thanks to: https://trac.macports.org/ticket/32723