Al Hoang

April 14, 2008

OpenMac, yes, me wants one

Filed under: geek, mac, osx, tech — hoanga @ 10:15 am

From their website

OpenMac: The Smart Alternative to an Apple

The Psystar OpenMac works just like an Apple Macintosh

Yes, very desirable. However, we’ll see if Apple lets them continue with it…

Hope they don’t get sued out of existence

OS X 10.4.11 update, you suck

Filed under: fixes, gripe, osx, stupid — hoanga @ 10:10 am

After a long time of not updating my trusty old iLamp iMac, I finally updated it to 10.4.11 over the weekend and let it lie. Later on I hear a report that Safari won’t start up.

That’s odd, I’ve never heard of Safari having launch problems before. I check the log and I see something like the following:

Date/Time:      2008-04-14 22:06:45.474 +0900
OS Version:     10.4.11 (Build 8S165)
Report Version: 4

Command: Safari
Path:    /Applications/Safari.app/Contents/MacOS/Safari
Parent:  WindowServer [86]

Version: 3.1 (4525.13)

PID:    20987
Thread: Unknown

Link (dyld) error:

Symbol not found: _WebDatabaseDirectoryDefaultsKey
  Referenced from: /Applications/Safari.app/Contents/MacOS/Safari
  Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit

Those type of messages go on and on in Console.app. My first round of Googling brought me to a Macrumors thread that recommended deleting the history.plist and other parts from ~/Library/Safari. I tried removing various files from that directory to no effect and finally just removing the directory altogether. Nada.

Troubleshooting a PC WITHOUT a web browser really sucks. I suggest everyone try it once in awhile to see just how much the nature of debugging IT problems has changed when you are deprived of a very powerful tool. Luckily, this Mac had a very crufty version of IE lurking so the first thing I tried was a download of Firefox. However, the disk image refused to be mounted! Seems this is also tied in with the security update. So basically, I’m left with using IE as my main tool for debugging on this Mac.

After a bit of googling, it seems that the fix is tied requiring the latest OS X security update (Available at the Support Download page). For OS X 10.4.x users you can find a link to the latest Universal here.

However, there is a catch. The security update is only available from that page as a Disk Image. Guess what you can’t open it up under the affected Mac. At this point you’re left with 2 options:

  1. Burn the Disk Image to a CD-R/DVD-R and use it that way
  2. Transfer the disk image to another Mac and unarchive it then push it back

I decided on the latter option since I hate wasting a CD-R if I don’t have to. After applying the Security Update and rebooting, Safari boots up and things seem chipper again but that was a serious side trip on something I’ve rarely seen Apple ever mess up. Anti-kudos to Apple for making this update on your ‘legacy’ OS really sucky.

April 10, 2008

Fixing that really irritating perl: warning: Setting locale failed. on OS X leopard

Filed under: fixes, gripe, mac, osx, stupid — hoanga @ 9:19 am

Anytime I’ve been running a perl based script on my leopard box I got this really irritating output with whatever else I was expecting:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = "En_US",
     LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

With a quick Google search I found an answer in this Rubify post. Basically the solution / fix is to make sure the following is set in either your ~/.profile or ~/.bashrc or ~/.cshrc

# This setting is for the new UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Read more at Rubify!

March 21, 2008

Getting erlang to build on MacPorts with an installed iPhone Open SDK

Filed under: fixes, osx — hoanga @ 9:48 am

I had some serious unexpected fun trying to install erlang on my OS X box using MacPorts. In general it’s usually a no brainer you usually type sudo port install <foo> and you have a new package installed without that much fuss. However here is the partial log of trying to install erlang and it blowing up…

$ sudo port install icu erlang
... ICU installs without a problem ...
--->  Fetching tcl
--->  Attempting to fetch tcl8.5.1-src.tar.gz from http://downloads.sourceforge.net/tcl
—>  Verifying checksum(s) for tcl
—>  Extracting tcl
—>  Configuring tcl
—>  Building tcl with target all
Error: Target org.macports.build returned: shell command ” cd “/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix” && make all ” returned error 2
Command output: /usr/bin/gcc-4.0 -c -Os -O2 -pipe    -Wall -Wno-implicit-int -fno-common -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../generic -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../libtommath -DPACKAGE_NAME=\”tcl\” -
…
…
…
_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:62:
/usr/local/include/mach-o/arch.h:35: error: nested redefinition of ‘enum NXByteOrder’
/usr/local/include/mach-o/arch.h:35: error: redeclaration of ‘enum NXByteOrder’
/usr/local/include/mach-o/arch.h:36: error: redeclaration of enumerator ‘NX_UnknownByteOrder’
/usr/include/architecture/byte_order.h:137: error: previous definition of ‘NX_UnknownByteOrder’ was here
/usr/local/include/mach-o/arch.h:37: error: redeclaration of enumerator ‘NX_LittleEndian’
/usr/include/architecture/byte_order.h:138: error: previous definition of ‘NX_LittleEndian’ was here
/usr/local/include/mach-o/arch.h:39: error: redeclaration of enumerator ‘NX_BigEndian’
/usr/include/architecture/byte_order.h:140: error: previous definition of ‘NX_BigEndian’ was here
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function ‘TclpFindSymbol’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:382: warning: ‘NSLookupSymbolInImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:182)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:415: warning: ‘NSLinkEditError’ is deprecated (declared at /usr/include/mach-o/dyld.h:217)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:419: warning: ‘NSLookupSymbolInModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:181)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:428: warning: ‘NSAddressOfSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:188)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function ‘TclpUnloadFile’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:493: warning: ‘NSUnLinkModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:169)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function ‘TclpLoadMemory’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:697: warning: ‘NSCreateObjectFileImageFromMemory’ is deprecated (declared at /usr/include/mach-o/dyld.h:146)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:730: warning: ‘NSLinkModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:161)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:732: warning: ‘NSDestroyObjectFileImage’ is deprecated (declared at /usr/include/mach-o/dyld.h:147)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:740: warning: ‘NSLinkEditError’ is deprecated (declared at /usr/include/mach-o/dyld.h:217)
make: *** [tclLoadDyld.o] Error 1

Error: The following dependencies failed to build: tk tcl
Error: Status 1 encountered during processing.

Pretty sucky, huh? My first lazy thought was, “I thought the point of a package manager was to avoid all these problems.”

After a little bit of thinking and staring at the error message, I did the workaround and moved the /usr/local/include directory away and tried rebuilding which made things much happier. Check the log below…

$ cd /usr/local
l$ ls
arm-apple-darwin	include			man
bin			info			share
docs			lib
etc			libexec
$ sudo mv include include.ignore
l$ sudo port install icu erlang
Skipping org.macports.activate (icu ) since this port is already active
--->  Cleaning icu
--->  Building tcl with target all
--->  Staging tcl into destroot
--->  Installing tcl 8.5.1_0
--->  Activating tcl 8.5.1_0

Voila. A working erlang install. Don’t forget to move back the include directory back to its old place.

December 2, 2007

Latest rev of Macbooks and keyboard conking out after sleep

Filed under: gripe, mac, osx, stupid — hoanga @ 3:30 pm

So I’ve been slowly re-initiating myself into the Church of Mac with a new Macbook however not all is well in Mac-land…

It seems the Macbook can have an unresponsive keyboard if you sleep it and wake it up (Also here).

Needless to say I find this bug extremely irritating and it really hurts the one of the primary raisons d’etre for owning a Mac (ultra-slick Sleep functionality that still is pretty rotten in Linux and Windows imo)

p.s. One workaround is to jam a key for 10 seconds or more when the unresponsiveness is happening. Just make sure you don’t jam something that can alter data badly like the… delete button?

References

February 21, 2007

Finally a gem release of ruby-opengl

Filed under: Open Source, geek, linux, osx, programming, ruby — hoanga @ 8:05 pm

Just wanted to let folks know that I’ve finally figured out how to get the build system in place for ruby-opengl to:

  • Gemify itself
  • Build native extensions during Gem installation using mkrf

Which means (I hope) that there should be an easier way to get OpenGL working with Ruby. Currently it should support installing in Linux and OS X. Installation should be as difficult as:

gem install -y ruby-opengl

Deinstallation should be similar.

For win32 users, I’d suggest using the old bindings provided with the all-in-one installer although I’d like to get a gem built for win32 so hopefully it can get included in the all-in-one installer.

References

January 8, 2004

Earth to Apple, the mini iPod price sucks

Filed under: gripe, mac, stupid — hoanga @ 12:09 pm

I saw th eMacworld 2004 Keynote and it wasn’t that bad. Some nice improvements to iLife but the most disappointing thing is the iPod. JonBert sums it up quite nicely for me:


The iPod mini is more of a question-mark. $249 for 4GB? Sure it’s smaller, and comes in different colors, but as it is it would need to be under $200 to stop registering on the Lame-o-meter

You tell em JonBert. The price sucks, I don’t care how small and cute it is. I understand the prices on the componetns isn’t cheap but I’d rather buy one of these things with the understanding it can die at anytime in a couple of years and I can just buy a new one and toss the old one. When you have to put $250 each time that sucks.

JonBert laying the smack

Macworld on Macworld

December 30, 2003

Excceelleent - KDE/Mac makes more progress

Filed under: mac, osx — hoanga @ 12:45 pm

Tales of the Racoon Fink is a very cool site if you’re interested in fink development and KDE porting to OS X. Personally, I’m psyched over KDE compatibility coming to OS X. That means piles and piles of applications that I’ve liked under Linux/BSD/UNIX will run natively in OS X. But it’s still making progress and is not ready for prime time. But every little step counts.

Here Ranger Rick shows Konqueror running:


Link to Post

December 28, 2003

Correction on Viewing Microsoft Compiled Help Files on OS X (You don’t need X11)

Filed under: fixes, mac, osx — hoanga @ 6:16 am

Ted Leung was kind enough to point out to me on an earlier post I made on viewing CHM files on OS X. YOU DO NOT NEED X11 to view CHM files. xchm uses wxWindows as its backend which has a native OS X port. Definite bonus in my book!

My Old incorrect post

Ted’s Original Post on viewing CHM files under OS X

December 25, 2003

Viewing Microsoft Compiled HTML Files (CHM) in OS X

Filed under: fixes, mac, osx — hoanga @ 1:15 pm

Ted Leung describes how he built xchm which is a X11 app that lets you view Microsoft Compiled Help Files (CHM). THis is really handy although needing X11 is a semi bummer but a liveable one

Obligatory Excerpt:


I got xchm to build on Mac OS X. This is an open source view for compiled HTML help (CHM) files that are mostly used on Windows. The reason that I wanted xchm is that the Python docs are available in CHM format. The advantage of CHM is that its highly searchable (and you can search when you have no network connectivity). So this is a great way to get goo d access to documentation for Python, which I still need at this point.

CHM files are quite handy under Windows I must admit so it’s good to see a tool to let you view it on OS X

Link to Ted Leung’s Post

Rhino JavaScripting on OS X

Filed under: java, mac, osx, programming — hoanga @ 11:55 am

From Ranchero’s Weblog I saw this Weblog Entry on getting the Rhino JavaScript engine setup in OS X. This is pretty neat especially for people who are heavy into ECMA/JavaScript hacking as it allows them to leverage all of their sensibilities of JavaScript for doing scripting tasks.

The breakdown of tasks you need to do are:

  1. Grab the Rhino Tarball from the Mozilla site
  2. Then do some customizations to your shell environment to be able to run it easily

One thing to note is that Rhino relies on a Java VM to be installed as it is basically a JAR file with a bunch of extra functionality. One bonus for OS X is that Java is already installed with OS X (isn’t it nice not having to go hunting around Sun’s website looking for a bloody JVM then waiting for some huuuuge download to finish?). However a detractor is that it’s Java. I’ve tried writing some command line tools using Java and I find them clunky as you have to do lots of annoying contortions to just run it correctly at the command line. For a seasoned Java programmer it’s probably business as usual…

However, I already know my way around Ruby, Python, and am fluent enough in plain Bourne SHell syntax that I don’t see the point of adding yet another tool to compete with my CLI tasks. Right now, I’ve truly decided on Ruby as my scripting language once it gets outside of the realm of too much difficult logic in Bourne Shell (I still use this when the needs are simple). I like Python but it sucks trying to get Python working properly in a command pipeline. But if you do the normal, write a file, then run it in the interpreter it won’t make a big difference. OR if you use some fancy IDE.

But either way, choice is good and I’m sure JavaScript fans will be able to benefit most from this

Link to getting JavaScript up on OS X

December 22, 2003

Getting 802.11g working on older PowerBooks preview

Filed under: fixes, mac, osx — hoanga @ 11:41 pm

I got 802.11g working on an older PowerBook (NOT with an Airport Extreme card but a normal CardBus one). I’ll document more of my the experiences I had with going with what I thought ‘would just work’ in a later blog.

December 3, 2003

Some OS X Panther CLI Goodies

Filed under: mac, osx, unix — hoanga @ 1:16 am

Seems Panther keeps surprising me (or I just don’t check the CLI commands enough) but it seems that the Net SNMP Libraries are included with Panther along with Netcat. These are powerful network utilities I use a lot in UNIX land. I’m glad they’ve been included in Panther (perhaps earlier? Anyone know?).

As with all powerful tools, use them responsibly. If you’re curious about them just do a man on them.

November 18, 2003

Notes from a Mac in Windoze land

Filed under: Education, mac, osx, windoze — hoanga @ 6:05 am

The Harvard Business School requires that its students use an IBM ThinkPad if they wish to be enrolled at the business school. That’s REQUIREMENT not RECOMMENDATION. Seems one of the business school students decided a little differently and setup a weblog documenting his experiences walking in a Windoze universe with a Mac. So far it seems he’s been doing well and continuously questions the need for a Windoze laptop rather than a very strong recommendation. I wish you luck in turning the tide, sir!

Link to Weblog

November 16, 2003

Adding scriptable items in OS X Address Book

Filed under: mac, osx, programming — hoanga @ 5:35 am

This is really neat and I didn’t even know about it. Kudos to Mac OS X Hints for publishing this one. Mac OS X Hints is a great place to find information on Mac OS X.

Powered by WordPress

Protected by AkismetBlog with WordPress