MAMP 1.7 and DBD::mysql

This is a brief post on how to get Perl's DBD::mysql working with MAMP 1.7 on Mac OS X Leopard. The instructions for now, are quite concise.

I have found that using CPAN does not seem to work to install DBD::mysql when you only have MAMP installed. The CPAN commands:

perl -MCPAN -eshell
install DBD::mysql

This I think is due to MAMP not having the correct MySQL files or libraries installed. Below are the steps required to get DBD::mysql working.

Note: You will probably need XCode tools installed to be able to compile the MySQL libraries.

1. Install the header files

Download the full MAMP packages.

The file that you need is called something like MAMP_1.7_intel_full.dmg.

This image contains the required files. Copy:

cp -r /Volumes/MAMP/MAMP/Library/include /Applications/MAMP/Library

2. Install the MySQL client libraries

  1. Download the MAMP sources. MAMP_1.7_src.tar.gz
  2. Untar
  3. Untar the mysql archive file
  4. Change directory to the mysql directory
  5. Configure and build mysql
    ./configure --with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock \
        --without-server \
        --prefix=/Applications/MAMP/Library
    make -j2
    
  6. Copy libraries
    cp libmysql/.libs/*.dylib /Applications/MAMP/Library/lib/mysql
    

3. Build and install DBD::mysql

  1. Download DBD-mysql-4.006.tar.gz or similar from CPAN. (Or use the one in ~/.cpan/build/DBD-mysql-4.006)
  2. Build
    perl Makefile.PL --CFLAGS="-I/Applications/MAMP/Library/include/mysql -Os -arch i386 -fno-common" \
        --libs="-L/Applications/MAMP/Library/lib/mysql -lmysqlclient -lz -lm" \
        --mysql_config="/Applications/MAMP/Library/bin/mysql_config"
    make
    make test
    sudo make install
    

Make test may throws errors about connecting to the database server but should not throw an errors about using shared libraries or missing symbols.

Well, well, Wells

A few months have passed since the passing of old John Young and not much has changed.

Young's is now brewed by Wells in Bedford.

No longer in Wandsworth. No longer local. No longer drunk by me.

Well, well, Wells.

John Young, the oldest and longest-serving chairman in the brewing industry, died on Sunday night aged 85, after a long battle against cancer. He had headed the family's brewery in Wandsworth, southwest London, for 44 years.

Mr Young was the great-great-grandson of Charles Allen Young, one of two businessmen who took over the 16th-century Ram Brewery in 1831 and founded Young & Co. John Young's death came in the week that Young's beers are being brewed in Wandsworth for the last time. In May, the company said the Ram Brewery was to be sold for redevelopment, with production transferred to Bedford in a deal with the Bedford brewer, Charles Wells.

Mr Young, who was known as Mr John at the brewery, joined the family business in 1954 after serving as a fighter pilot with the Fleet Air Arm during the Second World War and after a spell in merchant shipping. He became chairman and chief executive of the brewery in 1962 when his father, William Allen Young, retired and reverted to executive chairman in 1999.

John Young was well-known for his support of regional brewing and real ale. In the 1960s he promoted draught beer rather than keg beers favoured by other brewers.


Languages

I found this on /.

  • APL ~= Car built out of Legos. Fully operational. No one knows how it works. Or why.
  • ASM ~= Suzuki Hayabusa: Ready, aim, goodbye
  • C ~= Ferrari – drive it wrong and you'll be wrapped round a tree before you know it
  • C++ ~= Pickup truck w/extended cab, dually axles, 4wd
  • COBOL ~= Loaner. No one would buy one, after all
  • Fortran ~= 1980's generic sedan. Speedo only goes to 80. But it has a lot of controls and gauges
  • Haskell ~= Kit car. Not assembled. No directions. Not street legal.
  • Java ~= VW bug complete w/flower stickers, rabid activists, and parking permit for trendy coffee shop
  • Lisp ~= Mexican hopping car – scares the hell out of anyone who encounters it
  • Pascal ~= Delorean DMC-12. Beautifully conceived; decently built; underpowered.
  • Perl ~= Heavily modified Sachsenring Trabant P50 w/snow tires and chains. Only the owner can drive it, but it'll go anywhere. And then break down. Only the owner can fix it. But he can fix anything that happens.
  • Python ~= Corvette w/luxury options, hatch full of cool accessories.
  • Rexx ~= Modular 4-cylinder engine; plugs into anything. Every time you do, though, you need a new manual
  • Ruby ~= Camaro – trying like hell to be a Corvette, still not stable or fast enough
  • SQL ~= Coke truck – it'll carry anything, as long as it fits in a coke sized slot
  • VB ~= Poorly designed bicycle with two flat tires and no pump.
  • VHDL ~= Huge box of legos. Only you can make it run. But you can make anything.

Vmware on Debian 4.0 (Etch) Kernel 2.6.18-3

Having problems compiling the vmmon kernel module on Debian 4.0 (Etch) using the 2.6.18-3 kernel?

Getting an error like:

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.18-3-amd64).  Even if the module were to compile successfully, it would not load into the running kernel. 

To fix this you need to copy the UTS_RELEASE information into the version.h file.

Copy the line (or similar):

#define UTS_RELEASE "2.6.18-3-amd64"
from /usr/src/linux-headers-2.6.18-3-amd64/include/linux/utsrelease.h /usr/src/linux-headers-2.6.18-3-amd64/include/linux/version.h 

The vmmon module will then compile successfully.