[Pythonmac-SIG] ImportError, no suitable image found (app not running under 10.5)
David Brooks
dave at bcs.co.nz
Tue Sep 18 13:30:17 CEST 2012
On 18/09/12 8:51 PM, Paul Wiseman wrote:
> On 17 September 2012 22:11, David Brooks <dave at bcs.co.nz
> <mailto:dave at bcs.co.nz>> wrote:
>
>
> On 18/09/12 6:03 AM, Paul Wiseman wrote:
>> On 17 September 2012 18:13, Paul Wiseman <poalman at gmail.com
>> <mailto:poalman at gmail.com>> wrote:
>>
>> This app runs fine on 10.6 and 10.7, but when I run it on
>> 10.5 I an apple error report, and the following error in console
>>
>> Traceback (most recent call last):
>> <some traceback>
>> ImportError:
>> dlopen(/Applications/TestApp.app/Contents/Resources/lib/python2.7/lib-dynload/_librsync.so,
>> 2): Library not loaded:
>> @executable_path/../Frameworks/librsync.1.dylib
>> Referenced from:
>> /Applications/TestApp.app/Contents/Resources/lib/python2.7/lib-dynload/_librsync.so
>> Reason: no suitable image found. Did find:
>> /Applications/TestApp.app/Contents/MacOS/../Frameworks/librsync.1.dylib:
>> unknown required load command 0x80000022
>> /Applications/TestApp.app/Contents/MacOS/../Frameworks/librsync.1.dylib:
>> unknown required load command 0x80000022
>> TestApp Error
>> ([0x0-0x1e01e].org.pythonmac.unspecified.TestApp[342]) Exited
>> abnormally: Bus error
>>
>> I searched around and found this,
>> http://www.riverbankcomputing.com/pipermail/pyqt/2009-November/025098.htmlalthough
>> I think it might be specific to compiling pyqt and this
>> solution
>> http://www.riverbankcomputing.com/pipermail/pyqt/2011-June/029975.htmlbut
>> not really sure if it applies to my case or not.
>>
>> I have both Xcode 3 and 4 installed and I have the 10.5 SDK,
>> I'm just not sure about how I can compile the extensions I
>> need to use it?
>>
>>
>>
>> Just did file on the librsync.1.dylib and it only supports i386
>> which I guess is the problem. Any idea why this wouldn't have
>> been built with ppc like the so was?
>>
>> I've tried building again with -isysroot
>> /Xcode3/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 CFLAGS but
>> doesn't seem to help
>>
> When and how did you install librsync?? Manually or using Brew,
> MacPorts, or Fink? What about re-installing and setting whatever
> options are needed to include the PPC architecture?
>
>
> I downloaded the librsync source using fink, but installed duplicity
> for the python extension. This is how I installed duplicity, it looks
> as if it should be building for ppc, maybe its the targeting 10.5 that
> isn't working though?
>
> paul$ export CC='/Xcode3/usr/bin/gcc-4.0'
> paul$ export ARCHFLAGS='-arch ppc -arch i386'
> paul$ export CFLAGS='-isysroot /Xcode3/SDKs/MacOSX10.5.sdk
> -mmacosx-version-min=10.5'
> paul$ python setup.py --librsync-dir=/sw build
> running build
> running build_py
> running build_ext
> building 'duplicity._librsync' extension
> /Xcode3/usr/bin/gcc-4.0 -DNDEBUG -g -O3 -isysroot
> /Xcode3/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc -arch
> i386 -I/sw/include
> -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> -c duplicity/_librsyncmodule.c -o
> build/temp.macosx-10.3-fat-2.7/duplicity/_librsyncmodule.o
> /Xcode3/usr/bin/gcc-4.0 -bundle -undefined dynamic_lookup -g -isysroot
> /Xcode3/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc -arch
> i386 build/temp.macosx-10.3-fat-2.7/duplicity/_librsyncmodule.o
> -L/sw/lib -lrsync -o build/lib.macosx-10.3-fat-2.7/duplicity/_librsync.so
> ld: warning in /sw/lib/librsync.dylib, file is not of required
> architecture
> running build_scripts
> creating build/scripts-2.7
> copying and adjusting bin/rdiffdir -> build/scripts-2.7
> copying and adjusting bin/duplicity -> build/scripts-2.7
> changing mode of build/scripts-2.7/rdiffdir from 644 to 755
> changing mode of build/scripts-2.7/duplicity from 644 to 755
>
> Perhaps its the warning librsync.dylib is not of required
> architecture, which I guess is missing ppc. Any ideas how I can
> resolve that?
I don't know how to drive fink, but presumably you can tell it to enable
ppc builds. The fink mailing list? What is reported by:
$ file /sw/lib/librsync.dylib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20120918/28c69aa8/attachment.html>
More information about the Pythonmac-SIG
mailing list