Fixing Weird Problems on sqlite3

I ran into a problem today with trying to use CoPilot to connect to my mother's computer to do some of the typical tech support that tech-saavy sons do for their non-tech- saavy parents.

I downloaded the CoPilot and tried to launch it but nothing happened. I was stumped. I have seen this behavior before with a couple other apps on my PowerBook but have never been able to determine what was happening. Then I remembered this tool called "Console" that shows log messages (remember, I am new to all this Mac stuff). The tool revealed this message when I tried to launch the app:

dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
  Reason: no suitable image found.  Did find:
    /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
    /usr/local/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
    /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture

I then remembered something about Universal Binaries so that the same app could run on both a PowerPC and an i386 architecture. So then I ran "lipo -info" on both the app and the /usr/lib/libsqlite3.0.dylib:

lipo -info Copilot\\ Helper 
Non-fat file: Copilot Helper is architecture: ppc

lipo -info /usr/lib/libsqlite3.dylib 
Non-fat file: /usr/lib/libsqlite3.dylib is architecture: i386

So now, I set out on a Google-search-fest to figure out how I could get my hands on a Universal Binary version of the sqlite3 library so the Copilot app would be compatible. After trying a few other solutions found on other blog posts that didn't work, I found one that did, somewhat.

That somewhat is the that I made the following changes to the instructions for it to work for me:

  • Changed --enable-shared=no to --enable-shared=yes
  • The line
    TCC += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc

went after