On 12/22/09 8:51 AM, Christoph Deil wrote:
> Hi,
>
> I am trying to install a few python packages in my fink python installation, 
> all of which fail because of:
> ld: warning: in /sw/lib/python2.6/config/libpython2.6.dylib, file is not of 
> required architecture
>
> I think the reason might be that I have Fink 32 bit (although I am not sure) 
> but since I am running on Snow Leopard gcc tries to build 64 bit code by 
> default (again I am not sure).
>
> Any suggestions how to fix this problem are very appreciated.
>
> Thanks, --Christoph
>
> Here is the detailed error when trying e.g. to install the astlib package ( 
> http://astlib.sourceforge.net/ )
>
> christoph-deils-macbook:Downloads deil$ which python
> /sw/bin/python
> christoph-deils-macbook:Downloads deil$ ls -lh /sw/bin/python
> lrwxr-xr-x  1 root  admin    17B Dec 22 12:00 /sw/bin/python -> 
> /sw/bin/python2.6
> christoph-deils-macbook:Downloads deil$ which easy_install-2.6
> /sw/bin/easy_install-2.6
> christoph-deils-macbook:Downloads deil$ sudo easy_install-2.6 
> astLib-0.3.1.tar 
> Password:
> Processing astLib-0.3.1.tar
> Running astLib-0.3.1/setup.py -q bdist_egg --dist-dir 
> /tmp/easy_install-OWVj2K/astLib-0.3.1/egg-dist-tmp-m5pwjQ
> binread.c: In function ‘binstar’:
> binread.c:1306: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1350: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1351: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1374: warning: passing argument 1 of ‘binswap2’ from incompatible 
> pointer type
> binread.c: In function ‘binopen’:
> binread.c:1050: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1051: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1052: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1053: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1054: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1055: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c:1056: warning: passing argument 1 of ‘binswap4’ from incompatible 
> pointer type
> binread.c: In function ‘binstar’:
> binread.c:1338: warning: passing argument 1 of ‘binswap8’ from incompatible 
> pointer type
> binread.c:1339: warning: passing argument 1 of ‘binswap8’ from incompatible 
> pointer type
> binread.c:1361: warning: passing argument 1 of ‘binswap8’ from incompatible 
> pointer type
> fitsfile.c: In function ‘fitsrfull’:
> fitsfile.c:909: warning: too few arguments for format
> imsetwcs.c: In function ‘SetWCSFITS’:
> [ there were more warnings here ]
> PyWCSTools/libwcs/wcscon_wrap.c: In function ‘SWIG_Python_AddErrorMsg’:
> PyWCSTools/libwcs/wcscon_wrap.c:853: warning: format not a string literal and 
> no format arguments
> PyWCSTools/libwcs/wcscon_wrap.c: In function ‘_wrap_wcscon’:
> PyWCSTools/libwcs/wcscon_wrap.c:2788: warning: implicit declaration of 
> function ‘wcscon’
> PyWCSTools/libwcs/wcscon_wrap.c: In function ‘_wrap_wcscsys’:
> PyWCSTools/libwcs/wcscon_wrap.c:2823: warning: implicit declaration of 
> function ‘wcscsys’
> ld: warning: in /sw/lib/python2.6/config/libpython2.6.dylib, file is not of 
> required architecture
> Undefined symbols:
>   "_PyCObject_FromVoidPtr", referenced from:
>       _init_wcscon in wcscon_wrap.o
>   "_PyFloat_AsDouble", referenced from:
>       _SWIG_AsVal_double in wcscon_wrap.o
>   "_PyDict_SetItemString", referenced from:
>       _init_wcscon in wcscon_wrap.o
>   "_PyObject_Malloc", referenced from:
>       _PySwigObject_dealloc in wcscon_wrap.o
>       _SWIG_Python_NewPointerObj in wcscon_wrap.o
>       _init_wcscon in wcscon_wrap.o
> [ more undefined symbols here ]
>   "__PyWeakref_CallableProxyType", referenced from:
>       _SWIG_Python_GetSwigThis in wcscon_wrap.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> error: Setup script exited with error: command 'gcc' failed with exit status 1
> christoph-deils-macbook:Downloads deil$ otool -L  
> /sw/lib/python2.6/config/libpython2.6.dylib
> /sw/lib/python2.6/config/libpython2.6.dylib:
>       /sw/lib/python2.6/config/libpython2.6.dylib (compatibility version 
> 2.6.0, current version 2.6.0)
>       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
> version 125.0.0)
>       
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 
> (compatibility version 150.0.0, current version 550.13.0)
> christoph-deils-macbook:Downloads deil$ file  
> /sw/lib/python2.6/config/libpython2.6.dylib
> /sw/lib/python2.6/config/libpython2.6.dylib: Mach-O dynamically linked shared 
> library i386
>
>
>   
To see what flavor of Fink you have, use

    fink -V | head -n2

Some packages try to be "smart" and set the architecture based on the OS
version (or sometimes based on the running kernel).   We have to handle
such cases individually:  there's nothing to do in _our_ python2.6
package to fix this for you.

I suggest looking at fink package descriptions in the libs/pythonmods
section to see how our existing packages do it for 10.6.  Or maybe
someone with knowledge about a specific python module may chime in here.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to