64-bit Mac OS X pain with AFNI and libpng12.0.dylib

by Forrest Sheng Bao http://fsbao.net

Once I felt that Mac OS X had no big difference from Linux. Geez, I was almost killed these weekend. A short version: Fink is way complex to use than Aptitude (like the apt-get on Ubuntu Linux, uhn? ).

Long version - hope i will help other AFNI users on 64-bit Mac OS X 10.6 Snow Leopard.

I thought I had AFNI already on my Mac. So I tried to study a function of it. I typed afni on the shell and this was my greetings:

$ afni
dyld: Library not loaded: /sw/lib/libpng12.0.dylib
  Referenced from: /Users/forrest/sw/abin/afni
  Reason: no suitable image found.  Did find:
    /sw/lib/libpng12.0.dylib: mach-o, but wrong architecture
Trace/BPT trap

I said, what? Then I dig down:
$ file /sw/lib/libpng12.0.dylib
/sw/lib/libpng12.0.dylib: Mach-O dynamically linked shared library i386
$ file /Users/forrest/sw/abin/afni
/Users/forrest/sw/abin/afni: Mach-O 64-bit executable x86_64

I said again, what? How come Fink compiled everything as 32-bit?

Then I googled around religiously. I was the only unlucky guy. Many AFNI users had this problem.

The Fink I installed was 32-bit so everything installed via Fink was 32-bit. Why couldn't Fink select the version automatically when I installed it? I am lazy guy who never take a look at on screen prompts but press Enter all the time. Sadly, the default setting was 32-bit. I guess the reason is because Fink does not have as many 64-bit packages as 32-bit packages. But this shouldn't be a problem for open source software. Well, probably compiling existing 32-bit code on 64-bit Mac OS X is a little tricky. See, this problem does not exist on Linux because everything open.

Anywho (a lot people in west Texas do not understand this west Texas English word, meaning "anyway."), easiest solution: Remove everything under /sw and install everything from the scratch. So, I will go home now and leave the computer on.

Detailed fixings:
Another thing I do not understand is that why my SelfUpdateTrees in /sw/etc/Fink.conf was set as 10.4 while the Distribution is 10.6. I don't know the meaning of SelfUpdateTrees anyway. So, I just pretend that there is no problem.

No comments: