cputype problem on snow leopard

Ryan Schmidt ryandesign at macports.org
Tue Jul 20 15:10:01 PDT 2010


On Jul 20, 2010, at 10:26, Anne Poupon wrote:

>   I'm trying to install postgresql on snow leopard, and it looks like I have a cputype problem...
> 
>   The macports log file says:
> version:1
> :debug:main Executing org.macports.main (gettext)
> :debug:main Skipping completed org.macports.fetch (gettext)
> :debug:main Skipping completed org.macports.checksum (gettext)
> :debug:main Skipping completed org.macports.extract (gettext)
> :debug:main Skipping completed org.macports.patch (gettext)
> :msg:main --->  Configuring gettext
> :debug:main Using compiler 'Mac OS X gcc 4.2'
> :debug:configure configure phase started at Tue Jul 20 15:12:19 CEST 2010
> :debug:configure Executing proc-pre-org.macports.
> configure-configure-0
> :error:configure File /opt/local/lib/libiconv.dylib contains unexpected architecture cputype.
> :error:configure This may be a bug in the archcheck portgroup.
> :error:configure Target org.macports.configure returned: unexpected architecture
> :debug:configure Backtrace: unexpected architecture
>     while executing
> "$pre $targetname"
> :info:configure Warning: the following items did not execute (for gettext): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
> :notice:configure Log for gettext is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gettext/main.log
> 
>   When I try to launch postgresql I get:
> 
> dyld: Library not loaded: /usr/local/pgsql/lib/libpq.5.
> dylib
>   Referenced from: /usr/local/bin/psql
>   Reason: no suitable image found.  Did find:
>     /usr/local/pgsql/lib/libpq.5.dylib: mach-o, but wrong architecture
> Trace/BPT trap
> 
> From the various mailing lists and forum it looks like the problem comes from lipo, which says:
> sh-3.2# lipo -info /opt/local/lib/libform.dylib 
> Non-fat file: /opt/local/lib/libform.dylib is architecture: cputype 16777223 cpusubtype 3
> 
> If I have understood what I read, lipo should answer x86_64. Question is, how do I get it to give the right answer ?

First, remove /usr/local/bin/psql and anything else in /usr/local/{bin,etc,include,lib,libexec,man,sbin,share,var}; these things interfere with software built using MacPorts.

Second, indeed it sounds like your lipo doesn't understand the x86_64 architecture. It sounds a lot like this ticket

http://trac.macports.org/ticket/24825

in which the end result was that the user had apparently somehow replaced /usr/bin/lipo with an older version. Please check whether that's the case for you as well: run

/usr/bin/lipo -info /usr/lib/libz.dylib

This should say that the file contains the architectures "x86_64 i386 ppc7400". But if it still mentions "cputype 16777223 cpusubtype 3" instead of "x86_64", then please replace /usr/bin/lipo with a good copy from your backups or from your Mac OS X installation media.



More information about the macports-users mailing list