Archive for the 'Macintosh' Category

Building DBD::mysql under MacOS X

Friday, December 7th, 2007

MySQL Logo

There’s a glitch when you try to build Perl’s DBD::mysql under MacOS X.

When I tried to build it, I got a lot of errors that looked like this:

t/40numrows............install_driver(mysql) failed: Can't load '/Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
  Referenced from: /Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle
  Reason: image not found at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230.

It turns out that DBD::mysql was looking for the dynamic library for MySQL in the wrong place. It invokes mysql_config in order to find the location of the libraries, and mysql_config reports /usr/local/mysql/lib/mysql rather than /usr/local/mysql/lib

The easy way to fix it as to do this is to do this command from a Terminal window:

sudo ln -s /usr/local/mysql/lib/ /usr/local/mysql/lib/mysql

The drawback to this solution is that if you install an update to MySQL, you’ll need to remake this link.

You might also either modify mysql_config (it’s just a script, so it’s easy to edit), or to modify DBD::mysql, but the fix I’ve suggested is the simplest.

The real solution is to fix the MySQL distribution for MacOS X to have the correct path in it.
[tags]dbd::mysql, dbi, perl, mysql, macintosh[/tags]
(more…)

Safari CSS Reference

Wednesday, November 28th, 2007

Apple's Safari browser

Apple has published a new reference to CSS support in Safari version 3 which any web developer concerned with Macintosh support will probably be interested in. You can download the reference as a PDF file so you can use it offline as well.

Safari version 3 is bundled with Leopard, included in the iPhone and is in beta for Windows.

The reference includes CSS properties that are Safari-specific and not supported by other browsers. While I’m not a proponent of using browser-specific extensions they can be helpful to enhance the experience for specific browsers.

(more…)

Patches for Leopard’s X11

Tuesday, November 13th, 2007

Leopard X Server

I haven’t been the only one annoyed by the problems with X11 in MacOS X 10.5 Leopard. I’m lucky enough to only really be depending on X11 out of habit rather than need, though. Folks who do depend on it have now managed to put together a new build of Xquartz, the library that interfaces X11 to the Macintosh Quartz drawing engine. The new build solves some of the problems people have been encountering.

You can find a rundown of issues involving X11 and Leopard on MacOS X Hints forums.

(more…)

More on X11 in MacOS X 10.5 Leopard

Wednesday, November 7th, 2007

Leopard X Server

I mentioned in MacOS X 10.5 Leopard, From a Developer’s Perspective that X11 under Leopard was seriously broken. There’s some new information on how to properly work with ith which helps quite a bit.

The confusion lies in a change in the way that the X server is started. In Tiger, when you wanted to use X11 you’d start the server manually. In Leopard, it’s started automatically via launchd, which controls the DISPLAY variable and detects when something’s trying to talk to the X server and starts it.

(more…)

MacOS X 10.5 Leopard, From a Developer’s Perspective

Sunday, November 4th, 2007

Apple’s eagerly awaited operating system, MacOS X 10.5, also known as “Leopard”, is now in our hands, and there are quite a few features in it that will be interesting to developers. Amazon is still offering Leopard for $20 off list and Leopard Family Pack (5-user license) for $10 off list.

I do limited development on MacOS X. I don’t write Macintosh applications, but I do write web-based applications that I deploy to non-Macintosh servers. The Mac is a great environment for doing this; I get a real UNIX environment under the hood with Apache, MySQL and Perl, and a nice layer of Macintosh over the surface. After years of struggling with Windows and Cygwin, or living with Windows and Linux, it’s been wonderful moving to a single, reasonable environment for working.

Given that, my emphasis on development under Leopard will be on the kinds of tools a web developer might use, rather than XCode, although I’ll touch on XCode at the end.

(more…)

MacOS X 10.5 Leopard’s Official Release Date - October 26th

Tuesday, October 16th, 2007

MacOS X 10.5 Leopard box

Apple has finally announced the release date for their new OS, Mac OS X 10.5 Leopard. You can pre-order Leopard at the Apple Store with free shipping and they promise it will arrive on Friday October 26th. You can also pre-order it at Amazon. Amazon is offering a $20 rebate when you order Leopard and Parallels at the same time, and is also currently charging $20 less for Leopard than Apple is. Amazon says they’ll ship Leopard on Friday October 26th.

Check it out at the Apple Store (click here) or at Amazon (click here).
(more…)

Developing Web Content for the iPhone

Friday, July 6th, 2007

Apple iPhone

Apple has published guidelines for developing web content for the iPhone. Some of the guidelines are just good practice (separating HTML, Javascript and CSS, for instance). Some of it is informational (how many pixels you can expect to be available in the iPhone - at least, in this version of it). Some of it is very iPhone-specific (META tags to help control the viewport and scaling).

The article also includes guidelines for encoding audio and video for access over EDGE and Wifi networks.

The iPhone runs a slimmed down version of Apple’s desktop browser “Safari” - you get real HTML, Javascript and CSS support, and it can do Ajax. In my few days with an iPhone I haven’t found any web sites that simply didn’t work on it, including Javascript-heavy sites like Flickr.

(more…)

Prototype Reference Widget

Thursday, February 1st, 2007

prototype.js Dashboard widget

Ajaxian offered up a pointer to a Macintosh Dashboard widget for searching the documentation for the prototype.js documentation.

prototype.js is an excellent Javascript library which provides browser-independent AJAX functionality. It’s at the heart of many AJAX-based applications out there.

(more…)

Create your own widgets with Dashcode - The Unofficial Apple Weblog (TUAW)

Tuesday, January 9th, 2007

Dashcode icon

There are so many kinds of widgets out there now that I can barely keep track. There are Yahoo Widgets (the widgets formerly known as Konfabulator), Apple’s Dashboard, Google Widgets and now Opera has them too. And of course, they’re all different.

My primary interest in widgets from a development perspective is that they can be a good way to help connect people with a web site.

(more…)

Sponsored Links