[Python-3000] setup.py fails in the py3k-struni branch
Ron Adam
rrr at ronadam.com
Thu Jun 7 11:15:30 CEST 2007
Neal Norwitz wrote:
> On 6/5/07, Ron Adam <rrr at ronadam.com> wrote:
>> Alexandre Vassalotti wrote:
>> > On 6/5/07, Guido van Rossum <guido at python.org> wrote:
>> >> If "make clean" makes the problem go away, it's usually because there
>> >> were old .pyc files with incompatible byte code. We don't change the
>> >> .pyc magic number for each change to the compiler.
>> >
>> > Nope. It is still not working. I just did the following, and I still
>> > get the same error.
>> >
>> > % make # run fine
>> > % make # fail
>>
>> I can confirm the same behavior. Works on the first make, same error on
>> the second. I deleted the contents of the branch and did an "svn up"
>> on an
>> empty directory. Same thing.
>
> This probably means there is a problem with marshalling the byte code
> out. The first run compiles the .pyc files. Theoretically this
> writes out the same thing in memory. This isn't always the case
> though (ie, when there are bugs).
>
> A work around would be to just remove the .pyc files each time rather
> than do a make clean. Do:
>
> find . -name '*.pyc' -print0 | xargs -0 rm
>
> Bonus points for finding the bug. :-)
Well not the bug yet, but I did find the file. :-)
The following clears it so make will work.
rm ./build/lib.linux-i686-3.0/_struct.so
So maybe something to do with Modules/_struct.c, or would it be something
else that uses it?
Removing all the .pyc files wasn't enough, nor was removing all the .o files.
BTW, I found it by running the commands from the 'clean' section of the
makefile one at a time, then narrowed it down from there by making it more
and more specific.
Version info:
Python 3.0x (py3k-struni, Jun 7 2007, 03:28:43)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
On 7.04 “Fiesty Fawn”
Ron
More information about the Python-3000
mailing list