Re: bakefile fails on Snow Leopard

Kevin Ollivier <[email protected]> Tue, 6 Oct 2009 14:31:35 -0700
Newsgroups gmane.comp.sysutils.bakefile.devel
Message-ID <[email protected]>
Hi Teo,

On Oct 6, 2009, at 1:52 PM, Teo Fonrouge wrote:

>
> On Oct 6, 2009, at 3:18 PM, Vaclav Slavik wrote:
>
>> Hi,
>>
>> On Tue, 2009-10-06 at 11:46 -0500, Teo Fonrouge wrote:
>>> ImportError: dynamic module does not define init function
>>> (init_bkl_c)
>> ...
>>> For sure, there must be something that I've missed. Any help would  
>>> be
>>> appreciated.
>>
>> The next step in debugging this is obvious: did you check whether the
>> compiled module does or does not define this symbol? If it doesn't,
>> why?
>> (You have the SWIG-generated sources, it shouldn't be hard to figure
>> out). If it does define the symbol, you'll have to figure out why
>> Python
>> doesn't find it.
>
> Hello,
>
> I've removed on my system the installed SVN bakefile and installed the
> one on the download page of bakefile.org and this is the output with
> the "bakefile/tests/cond" :
>
> <output>
>
> bash-3.2$ bakefile -f gnu hello.bkl
> Traceback (most recent call last):
>   File "/usr/local/lib/bakefile/bakefile.py", line 237, in <module>
>     run(sys.argv[1:])
>   File "/usr/local/lib/bakefile/bakefile.py", line 200, in run
>     import reader, writer
>   File "/usr/local/lib/bakefile/reader.py", line 31, in <module>
>     import mk
>   File "/usr/local/lib/bakefile/mk.py", line 30, in <module>
>     import bkl_c
>   File "/usr/local/lib/bakefile/bkl_c.py", line 25, in <module>
>     _bkl_c = swig_import_helper()
>   File "/usr/local/lib/bakefile/bkl_c.py", line 17, in
> swig_import_helper
>     import _bkl_c
> ImportError: No module named _bkl_c
>
> </output>
>
> Can you point me how can I check if the compiled module contains the
> missing symbol ?

This is likely due to a mismatch between 32-bit and 64-bit between  
Python and Bakefile's C extension.

I don't think Bakefile currently checks and compiles the extension to  
match the architecture used by Python itself, or reports if there's a  
mismatch. I think it just uses the compiler's default architecture,  
which differs depending on which OS you compiled on or which Python  
you're using.

Regards,

Kevin

>
> Thanks in advance.
>
>
> best regards,
>
> Teo Fonrouge
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Bakefile-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bakefile-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference