Archive for the ‘Open Source Software’ Category

Blender 2.49b is Out

Tuesday, September 22nd, 2009

Years ago I got an SGI Indigo2 workstations with High Impact graphics, and was simply blown away by blender on that machine. It had something like 384MB RAM, and a sub-200MHz R10k, but it could run blender like it was a machine with 100 times that processing power. Since then, I haven't done a lot with blender, but I have staid up to date with it on my Macs as the graphics are better, the CPUs are better, and it was a great experience.

Today the blender crew released Blender 2.49b and I had to get it. It seems to run very nicely on Snow Leopard, but then again, the entire app was written in OpenGL, so if the graphics are good, the app is good. Nice to see it's still being worked on.

Growl 1.2b4 is Out

Tuesday, September 22nd, 2009

They seem to be getting close to a release with Growl 1.2b4 as the release notes are less about bugs and more about tweaks in the app. Minimum version of OS X, icon layout in the DMG, etc. These things are the polish on the app as opposed to the real meat of the functionality. Good to see.

Cyberduck 3.3b3 is Out

Monday, September 21st, 2009

While continuing to work towards a release that's Snow Leopard compatible, the Cyberduck team has released 3.3b3 and it's getting closer. I haven't had a real need to check on Cyberduck, the upgrade to Snow Leopard made me take an active interest in the app's compatibility. It's nice to see the progress is still being made.

Upgrading to 64-bit PostgreSQL 8.3.7 from KyngChaos

Friday, September 18th, 2009

PostgreSQL.jpg

With the problems I had getting PostgreSQL support in PHP, and the desire to take control of my toolset, I went looking for a 64-bit version of PostgreSQL rather than resort to building it myself. What I found was that William Kyngesburye (a.k.a. KyngChaos) maintains a dual-build of PostgreSQL - i386 and x86_64 that's even Snow Leopard compatible! Marc seems to be out of it, and even the EnterpriseDB guys have no plans for building a 64-bit version.

While I don't need a 64-bit version per se, I do need the 64-bit libraries and this was an easy way to get them.

The upgrade was pretty easy - dump the database, move/remove the old install, and then follow the package installer. It should "just work", but it was missing the launchd file. I found something close to it on the net, and just fiddled the parameters to make it work:

  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
    <key>Label</key>
      <string>PostgreSQL</string>
    <key>UserName</key>
      <string>postgres</string>
    <key>RunAtLoad</key>
      <true/>
    <key>EnvironmentVariables</key>
      <dict>
        <key>PGDATA</key>
        <string>/usr/local/pgsql/data</string>
      </dict>
    <key>ProgramArguments</key>
      <array>
        <string>/usr/local/pgsql/bin/postgres</string>
        <string>-e</string>
        <string>-i</string>
      </array>
    <key>StandardOutPath</key>
      <string>/usr/local/pgsql/var/logfile</string>
    <key>StandardErrorPath</key>
      <string>/usr/local/pgsql/var/logfile</string>
    <key>ServiceDescription</key>
      <string>PostgreSQL Server</string>
  </dict>
  </plist>

Once I created that file as /Library/LaunchDaemons/org.postgresql.postgres.plist, I was ready to go. The instructions in the package work perfectly for starting it up, but now that I have the file there, the installer is supposed to restart PostgreSQL.

Once I had this installed, it was a simple matter of rebuilding the pgsql.so file using the provided libraries and it worked like a champ!

Now I feel I can move forward with this guy's PostgreSQL packages and making the PHP library each time I upgrade. Not a bad place to be.

[9/20] UPDATE: well, when trying to upgrade the PostgreSQL on my 20-inch iMac with 2GB RAM, I got a ton of errors about the SHMMAX value not being large enough to complete the operation. Basically, PostgreSQL wasn't able to get the shared memory to complete the operations. I did a bit of googling and found this post about setting the SHMMAX value.

When I set the SHMMAX sufficiently high, I was able to get the initdb command to work, and then I had to set these parameters in the startup by creating /etc/sysctl.conf which is read by the 10.4+ kernel on initialization. The file contains:

  kern.sysv.shmmax=1073741824
  kern.sysv.shmmin=1
  kern.sysv.shmmni=32
  kern.sysv.shmseg=8
  kern.sysv.shmall=1073741824

and after a reboot, I was able to finish the migration by loading up the database and things were working perfectly. I then compiled the PHP PostgreSQL extension and added it to the config and all was working quite nicely.

Quite an adventure!

Google Chrome on Windows 3.0.195.21 is now Stable

Wednesday, September 16th, 2009

While it's not core to my Mac work, it's nice to see that Google has moved Chrome 3.0.195.21 to the stable branch so that I can use it for production web sites at work. The stuff I run at work makes heavy use of JavaScript for large data sets and the Google Visualization. The move from 2.x to 3.x is certainly going to bring much needed speed improvements as well as stability improvements for those users really pushing their machines.

Glad to see them making these steps forward as opposed to the "perpetual beta" status.

Getting PostgreSQL Support into PHP 5.3.0 on Mac OS X 10.6

Wednesday, September 16th, 2009

PostgreSQL.jpg

One of my favorite web scripting languages is PHP. To me, it seems that it's right in the sweet spot of powerful yet fundamentally a scripting language. That means that it's much more lightweight for a developer than, say Java/JSP, and at the same time, more C-like than, say Perl. While there is a place for almost all of the web technologies in today's development environment, I have to say, PHP holds a really special place in my heart.

Because of that, I was thrilled over the years to see Marc Liyanage continue to produce a great PHP distribution with all the bells and whistles - including my favorite database - PostgreSQL. For the last several OS releases, Apple has delivered a PHP component to Apache, they leave out the PostgreSQL support that I need to do the few scripting-based web projects that I have.

Not Playing Well with Snow Leopard

But with the introduction of Snow Leopard - Mac OS X 10.6, Marc hasn't been able to build a PHP distribution that is compatible with the OS. So when I ran across this article about building the PostgreSQL support for PHP into the Snow Leopard Apache install, I had to jump at it for several reasons:

  • It's low-impact. I don't have to get rid of all the suport that Apple has in it's PHP install.
  • It's independent of Marc, so I don't have to wait on him to release compelte updates to PHP.

So it is with excitement that I venture off on my own to build the PostgreSQL support into Snow Leopard's Apache server and forever empower myself to keep PostgreSQL support in PHP as it ships from Apple.

Let's get to it!

According to the write-up, we need to set the bash variables:

  MACOSX_DEPLOYMENT_TARGET=10.6
  CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
  CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
  CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
  LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
  export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET

but we can also use the tcsh variable scheme:

  setenv MACOSX_DEPLOYMENT_TARGET 10.6
  setenv CFLAGS "-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
  setenv CCFLAGS "-arch i386 -arch x86_64 -g -Os -pipe"
  setenv CXXFLAGS "-arch i386 -arch x86_64 -g -Os -pipe"
  setenv LDFLAGS "-arch i386 -arch x86_64 -bind_at_load"

Then I get into the PHP 5.3.0 source code at: php-5.3.0/ext/pgsql/ and run the commands to build the module:

  phpize
  ./configure
  make

The end result being that in php-5.3.0/ext/pgsql/.libs/ there is now pgsql.so that's ready to be used with PHP. All we need to do is to copy into the right place: (assuming we're still in the php-5.3.0/ext/pgsql directory)

  sudo cp .libs/pgsql.so /usr/lib/php/extensions/no-debug-non-zts-20090626

and then edit the /etc/php.ini file to tell it about the addition. This is a two-step process, as we need to update the commented-out line:

  ;extension_dir=./

to:

  extension_dir=/usr/lib/php/extensions/no-debug-non-zts-20090626

and then add in the line:

  extension=pgsql.so

after all the Windows examples of loadable modules.

A quick restart with:

  sudo apachectl restart

and then the system is all ready to go!

Results

It's amazing to see the show up with the familiar 'pgsql' section:

phpinfo()

And with this, I can dump Marc's PHP distribution and not have to worry about his updates any longer. The feeling of freedom and independence this gives me is really hard to express. It's fantastic!

UPDATE: this seems to be working, but when I look at /var/log/apache2/error_log I see a bunch of:

dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb
  Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/pgsql.so
  Expected in: flat namespace

dyld: Symbol not found: _PQconnectdb
  Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/pgsql.so
  Expected in: flat namespace

when I try to run a simple PHP script to hit a PostgreSQL database and pull back a little data. I have a bad feeling that it's a 32-bit/64-bit issue as the libraries are most likely 32-bit and I'm guessing Apache2 is 64-bit from Apple.

Indeed... the file type of the libpq.5.dylib library in use is ppc and i386, but the pgsql.so is i386 and x86_64. But I'm betting that httpd is x86_64. This means I need to update to a 64-bit version of PostgreSQL for the Mac. Marc L doesn't have one. I wonder if that means I'm on my own, or if I can get something built for me?

[9/18] UPDATE: when I updated from PostgreSQL 8.3.0 by Marc L. to the 8.3.7-3 from William Kyngesburye, and repeated the build, the 64-bit (actually 32-bit and 64-bit) libraries were all I needed. The test page was perfect without any errors:

PHP PostgreSQL Test

Google Chrome dev 4.0.207.0 is Out

Wednesday, September 16th, 2009

GoogleChrome.jpg

While I'm a big fan of Google Chrome on Windows at work, I haven't really been that excited about it coming to the Mac. Face it, Safari is WebKit, so there's not a lot that is in Chrome that I don't already have in Safari, but it's nice to see the progress, anyway.

Today I noticed that they had dropped another release of the 'dev' branch at 4.0.207.0 and so I got it just to check it out. I have to say, it's a little behind Camino, which is behind Firefox and then Safari - to me. Buttons aren't rendered right, and this is on the Google home page - of all places. So I think they're still looking at the big issues and not yet interested in looking at the things like how something is rendered.

Thankfully, it's making progress, but I don't have to depend on it.

Growl 1.2b3 is Out

Monday, September 14th, 2009

The guys working on Growl have delivered a new beta: 1.2b3 and in an interesting twist, you need to run the 1.2b3 uninstaller before installing 1.2b3. Clearly, there was something missing in the previous uninstaller, and the new one was necessary to "clear the decks" for the new beta. Fair enough, it's done and we're on the latest beta.

Firefox 3.5.3 is Out

Thursday, September 10th, 2009

With more stability and security fixes, Firefox 3.5.3 is out. I hadn't had any issues with Snow Leopard, but it's nice to stay on top of the fixes due to the number of idiot kids hacking crud together to try and take over a few machines to show they are smart. Better safe than sorry.

Interesting Interface Builder 3 NIB-ware

Tuesday, September 8th, 2009

A good friend tweeted about this interesting collection of objects for Interface Builder 3. There seem to be a lot of very useful widgets in the collection, and I would love to spend a little time looking at these, as it could make development of a nice GUI quite a bit easier.

Until I get the chance, we'll just use this as a bookmark for the URL.