Archive

Archive for the ‘MacBook’ Category

MySQL 64bit, Perl 32bit and OS X Leopard

December 26th, 2008 Pankaj Comments

This is a little tip on how to get Perl(32bit) working with a 64bit version of MySQL on OS X Leopard.

I was working on a small project today that required MySQL 5.067 and I opted to do it in Perl 5.10. You may remember a post that I put up in August describing how to compile MySQL 64 bit for OS X Leopard. Well, since then I also compiled and installed Perl 5.10 (not replacing Apple’s system install of Perl). I wanted to take advantage of some of the Perl 6 features that have been backported to Perl 5.10 (the first Perl release in two years).

Back to today’s project, I decided to use the awesome Class::DBI Perl module to do my little project. I wrote all my code and began to run it in the perl debugger and realized that I need to install the DBD::mysql module. During the installation process for DBD::mysql, the Perl module is compiled using the mysql libraries and header files. Compilation wasn’t a problem. It’s when we got to the ‘make test’ step that all hell broke loose.

To cut a very long story short, I kept getting the error below:


# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't find 'boot_DBD__mysql' symbol in /Users/pankaj/.cpanplus/5.10.0/build/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.bundle

I dug around a bit and decided to run the installation manually. The problem here has to do with compiler flags that were used for mysql. MySQL was compiled as a 64 bit Leopard binary. However, Perl 5.10 was compiled as a 32bit binary because many Perl modules don’t support 64 bit out of the box.

To solve the problem, I had to recompile the mysql client libraries:


--($:~/src/mysql-5.0.67)-- export ARCHFLAGS="-arch i386"
--($:~/src/mysql-5.0.67)-- CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql.32 --without-server --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared
--($:~/src/mysql-5.0.67)-- make
--($:~/src/mysql-5.0.67)-- make test
--($:~/src/mysql-5.0.67)-- sudo make install

Once the mysql client libs were done compiling and installed into /usr/local/mysql.32, I changed my PATH to ensure that the newly compiled mysql libraries and binaries were picked up before anything else.


export PATH=/usr/local/mysql.32/bin:${PATH}

Once that was done, I went back to my DBD::mysql source directory and built it using the following commands:


--($:~/src/DBD-mysql-4.010)-- perl Makefile.PL --libs="-L/usr/local/mysql.32/lib/mysql -lmysqlclient -lz -lm" --cflags="-I/usr/local/mysql.32/include/mysql"
--($:~/src/DBD-mysql-4.010)-- make
--($:~/src/DBD-mysql-4.010)-- make test
--($:~/src/DBD-mysql-4.010)-- sudo make install

This time, make test ran beautifully with a few minor exceptions because I didn’t actually give it a mysql db to connect to.

The mysql 32bit client can easily connect to the 64 bit server. Perl, Class:DBI are now very happy and the application is running as planned.

Apple MacBook Hard Drive Goes Kplunk!

June 24th, 2007 Pankaj Comments

After downloading from iTunes and watching episode 3 of the second season of Sleeper Cell: American Terror, my MacBook completely froze up and wouldn’t respond to anything. I don’t think it was some terrorist plot to thwart my viewing of Sleeper Cell but I was forced to power off the machine and since then I haven’t gotten the machine to boot up. The MacBook displays the blinking folder with a question mark in it. This means, the MacBook doesn’t recognize that a hard drive is present.

I called Apple support in the US and they are pretty sure the hard drive is dead. I’ve sent an email to Apple in New Delhi with my case number and I’m waiting to hear back from them about salvaging any data on the drive, if possible, a replacement drive, and OS X 10.4 installation disks since I don’t have my install disks with me in New Delhi. I hope to hear back from them ASAP as I need to finish the second season of Sleeper Cell :-)

Update Juney 28th, 2006: I went to Apple Care Delhi on Monday and had the MacBook tested. The drive was not being detected in Target mode or or with the Disk Utility so a new drive was ordered and delivered on Wednesday. I had to call Apple in the US to request OS X Tiger replacement disks which were also delivered on Wednesday. Apple was also very quick about re-enabling my iTunes account to download any of the music and shows that were not backed up. Overall, a real pain and lost a lot of data but the MacBook is up and running again.

Categories: Apple, MacBook, OS X, iTunes Tags:

Apple MacBook Upgraded

May 15th, 2007 Pankaj Comments

As expected by AppleInsider, the new MacBook upgrades are just basic upgrades to keep the MacBook competitive with other laptops out there.

Apple has increased the HD to a maximum of 200GB and the minimum RAM has been upped to 1GB. The maximum RAM is still capped at 2GB but the MacBook now sports the Airport Extreme 802.11n WiFi card. The minimum CPU speed of the Intel Core 2 Duo available with the MacBook is now 2.0 GHz and the maximum is 2.16 GHz. All of the other usual items are still present like Bluetooth, 1 Firewire 400, and 2 USB 2.0 ports.

I wonder if Apple has solved the discoloration and sharp edge problems with the newer MacBooks.

Categories: Apple, MacBook Tags:

Apple MacBook vs. Lenovo ThinkPad – Final!

November 7th, 2006 Pankaj Comments

Well, as much as I love OS X, the MacBook just wasn’t cutting it for me. The MacBook is a great computer for people who want to get things done and not have to worry about the underlying technology. I need to be able to get things done without futzing with configurations, but I also need a flexible environment where I can work with new technologies, get back to working on my open source social networking project, and also be able to work with Linux environments like Fedora, OpenSuse and Ubuntu.

The MacBook is great for multimedia things and I will probably continue to use OS X for video editing, managing my music collection, and managing the fast increasing number of digital photos that I take. However, it will probably NOT by my MacBook. I have decided to sell my MacBook. It was a tough decision, especially since I bought it less than six months ago and I upgraded the RAM to 2GB less than two months ago. I might try another Apple portable someday in the future but for now, the geek in me is screaming for a ThinkPad running Fedora Core 6, OpenSuse 10.1 and Ubuntu 6.10.

On Thursday, I picked up a Lenovo ThinkPad T60. Sorry, but i was just too excited about getting a new ThinkPad and I didn’t take the required unpackaging pictures. The ThinkPad T60 comes with 1 GB RAM, 120GB 5400 RPM HD, Intel 3945abg Wireless, ATI Mobility Radeon X1400 with 128MB Hypermemory, SXGA+ video at 1400×1050, Intel Core 2 Duo T7200 at 2GHz, DVD Recordable, 56k Fax modem, Infrared, Bluetooth, Gigabit Ethernet, Verizon Broadband Connect EVDO, 3 USB, Mic and Headphones, 1 PCI Express Full and 1 PCMCIA Slots, Fingerprint Reader, Security chip, 9 cell battery, and a three year warrant. The only real difference in specs is that the ThinkPad doesn’t have any sort of webcam (Apple MacBook has iSight) or remote control (Apple MacBook has FrontRow).

The ThinkPad has an Intel Core 2 Duo chip, 128MB of video RAM, double the hard drive capacity, double the RAM of the MacBook, and also the Verizon EVDO built-in. That’s a substantial amount of hardware for $1600. The only thing I’ve found so far to complain about the ThinkPad is that the screen isn’t as bright as the MacBook and considering winter is approaching, the ThinkPad can’t double as a heater like the MacBook can.

The 14.1″ version of the ThinkPad T60 is a bit smaller and lighter than the 15″ version. I had considered an ThinkPad X60 or X41 but I decided against it mainly because they both use an Intel 950 graphics chip with 64MB of shared memory, the units in stock didn’t have DVD-RW capability and the HD was maxxed out at 60GB.

The feel of the lenovo ThinkPad T60 isn’t very different from my old IBM ThinkPad T40. However, Lenovo has made a few changes like changing the battery type and the power adapter. I won’t be able to use the battery from my T40 nor will I be able to use the two T40 chargers I have. I presume that dock options are also different for the T60 than for the T4x series of ThinkPads. This ThinkPad T60 also has the Lenovo name displayed prominently next to the T60 logo.

I’ll get into what I’m doing with my new T60 in another post but suffice it to say, I am very happy to be typing on a ThinkPad. However, I do miss having OS X working with such ease and finesse. As much as I love Linux, it is a serious PITA getting things to run and things still don’t run as cleanly or well as they do in OS X. Synchronizing a phone over bluetooth with your PIM is a perfect example … Oh well, I guess that’s part of the fun and challenge of using Linux :-)

Fedora Core 6 is Available

October 30th, 2006 Pankaj Comments

As scheduled, Fedora Core 6 was released on October 24th, 2006.  I’ve upgraded a Dell PowerEdge to FC6 but that was after creating a bootable CD.  Apparently, the diskboot.img that is used to create bootable USB flash drives wasn’t working for me.

Upgrading FC5 to FC6 had a few issues like an i586 kernel being installed instead of an i686 kernel but for the most part, the server is doing everything it should be.  All services, CVS, Apache, Postgres, MySQL, MediaWiki are functioning fine without any changes.

I haven’t been able to get FC6 installed on an external USB HD for use with my MacBook so my ability to play with FC6 is very limited.  I hope to get FC6 running off an external USB HD but all initial research indicates that it "should" work.  I’ll let everyone know if I get it working. 

I will also be accepting donations to purchase a ThinkPad T60 to triple boot FC6, Ubuntu Edgy Eft and OpenSuSE 10.1 :-)


FedoraMain – Fedora Project Wiki

Download Fedora Core 6 Torrents (preferred) || x86 || x86_64 || ppcThese ISO links should be functional. Thank you for your patience.
Categories: MacBook Tags: , , ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes