libsqlite3 no matching architecture in universal wrappe

Ryan Schmidt ryandesign at macports.org
Mon Jul 14 13:33:23 PDT 2008


On Jul 14, 2008, at 09:16, Yitzhak Bar Geva wrote:

> I must have done something which screwed up my library, but still  
> after hours and hours of poking around and trying to fathom  
> Macports, I still cannot get to the bottom.
> I noticed there are certain programs which don't launch. (This may  
> also have something to do with Firefox 3.0 frequently bombing).
> Here's an example:
>
> admin$ java
> dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib
>   Referenced from: /System/Library/Frameworks/ 
> CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/ 
> Versions/A/CFNetwork
>   Reason: no suitable image found.  Did find:
>         /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
>         /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
> Trace/BPT trap
>
> I had already rebuild sqlite3 and all relevant Macport  
> installations with the universal variant, but to no avail.

MacPorts does not touch anything in /System or /usr/lib. Those  
directories are supposed to be under the control of Apple and Mac OS  
X and Software Update. Something has clobbered your system's sqlite3  
library. You should get it back from your Time Machine backups, or if  
you have none, then from your Mac OS X installation DVD. You may be  
able to copy it from the installation DVD's OS, or you may have to  
reinstall Mac OS X.


> Now I had the same or similar problem in a previously running  
> application:
> admin$ /Applications/NX\ Client\ for\ OSX.app/Contents/MacOS/nxclient
> dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib
>   Referenced from: /System/Library/Frameworks/ 
> CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/ 
> Versions/A/CFNetwork
>   Reason: no suitable image found.  Did find:
>         /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
>         /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
> Trace/BPT trap
>
> I solved it by copying libsqlite3.0.dylib from /opt/local/lib to / 
> usr/lib and miraculously nxclient (from NoMachine) came to life again.

You should not copy libraries from MacPorts to elsewhere on your  
system. They are not designed to be used that way.


> Drunk with my success, I assumed that it would solve the problems I  
> was having with some of the other programs lie java (above) and  
> NeoOffice for example. But alas, it wasn't to be:
>  admin$ java
> dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib
>   Referenced from: /System/Library/Frameworks/ 
> CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/ 
> Versions/A/CFNetwork
>   Reason: no suitable image found.  Did find:
>         /usr/lib/libsqlite3.0.dylib: no matching architecture in  
> universal wrapper
>         /usr/lib/libsqlite3.0.dylib: no matching architecture in  
> universal wrapper
> Trace/BPT trap

Sounds like you are on Mac OS X 10.5 Leopard, where system libraries  
are 4-way universal builds (ppc, i386, ppc64, x86_64) but MacPorts  
only builds 2-way universal builds by default (ppc, i386). The  
matching architecture it was apparently looking for was a 64-bit one.  
Again, MacPorts did not cause the problem and cannot offer a  
solution. Your operating system is missing a vital component and  
should be reinstalled using normal Apple methods.


> Here's some background info:
>
> admin$ otool -L /usr/lib/libsqlite3.0.dylib
> /usr/lib/libsqlite3.0.dylib:
>         @executable_path/libsqlite3.0.dylib (compatibility version  
> 9.0.0, current version 9.6.0)
>         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,  
> current version 1.0.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
> current version 111.1.1)
>
> admin$ otool -L /opt/local/lib/libsqlite3.0.dylib
> /opt/local/lib/libsqlite3.0.dylib:
>         /opt/local/lib/libsqlite3.0.dylib (compatibility version  
> 9.0.0, current version 9.6.0)
>         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,  
> current version 1.0.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
> current version 111.0.0)
>
> admin$ ls -l /usr/lib/libsqlite3.0.dylib
> -rwxr-xr-x  1 root  wheel  454952 Jun 29 07:04 libsqlite3_saved. 
> 0.dylib
>
> admin$ ls -l /opt/local/lib/libsqlite3.0.dylib
> -rwxr-xr-x  2 root  admin  791064 Jul 13 21:20 /opt/local/lib/ 
> libsqlite3.0.dylib
>
> admin$ sudo port variants sqlite3
> Password:
> sqlite3 has the variants:
>         universal
>         loadable_extensions: Enables experimental loadbale extensions
> admins-power-mac-g4:lib admin$ sudo port installed sqlite3
> The following ports are currently installed:
>   sqlite3 @3.5.9_0+universal (active)



More information about the macports-users mailing list