[Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-15 Thread Luke Kenneth Casson Leighton
no, the above subject-line is not a joke: i really _have_ successfully
built python2.5.2 by installing wine on linux, then msys under wine,
and then mingw32 compiler - no, not the linux mingw32-cross-compiler,
the _native_ mingw32 compiler that runs under msys, and then hacking
things into submission until it worked.

issue-report: http://bugs.python.org/issue4954
source code: http://github.com/lkcl/pythonwine/tree/python_2.5.2_wine
related issue-report: http://bugs.python.org/issue3871
related issue-report: http://bugs.python.org/issue1597850

i'm going to _try_ to merge in #3871 but it's... the prospect of
sitting waiting for configure to take THREE hours to complete, due to
/bin/sh.exe instances taking TWO SECONDS _each_ to start up does not
really fill me with deep joy.

consequently i did a major hatchet-job on configure.in with repeated
applications of "if test $win32build = no; then" ... cue several
hundred lines of configure.in tests blatantly ignored "fi #
$win32build=no! " and thus cut the configure time down from three
hours to a mere 15 minutes.  the only reason why this was possible at
all was because PC/config.h already exists and has been pre-set-up
with lots of lovely #defines.

also, there is another significant difference between #3871 and #4954
- i chose to build in to libpython2.5.dll exactly as many modules as
are in the proprietary win32 build.  this turned out to be a good
practical decision, due to /bin/sh.exe messing around and stopping
python.exe from running!  (under cmd.exe it's fine.  i have to do a
bit more investigation: my guess is that the msys "remounter" is
getting in the way, somehow.  compiling python to have a prefix of
/python25 results in files being installed in /python25 which maps to
c:/msys/python25/ but actually that doesn't get communicated
correctly to the compiled python.exe

it's all a bit odd - it still feels like things are being
cross-compiled... but they're not... it's just that setup.py has paths
that don't _quite_ match up with the msys environment...

needs work, there.

the regression testing is _great_ fun!  some of the failures are
really quite spectacular, but surprisingly there are less than
anticipated.  file "sharing violation" isn't a big surprise (under
wine); the ctypes structure failures are going to be a bitch to hunt
down; the test_str %f failure _was_ a big surpise; the builtin file
\r\n <-> \n thing wasn't in the _least_ bit of a surprise :)

overall, this has been... interesting.  and the key thing is that
thanks to #3871 and #4954 and #1597850, python will soon happily
compile for win32 _without_ the dependence on _any_ proprietary
software or operating systems.  that's a pretty significant milestone.

l.

p.s. if anyone would like to try out this build, on a windows box, to
see if it fares any better on the regression tests please say so and i
will make the binaries available.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-15 Thread Aahz
On Thu, Jan 15, 2009, Luke Kenneth Casson Leighton wrote:
>
> p.s. if anyone would like to try out this build, on a windows box, to
> see if it fares any better on the regression tests please say so and i
> will make the binaries available.

Don't bother on my account, but please publicize the URL if you end up
doing it; I may try it on my Mac with Windows under Fusion...
-- 
Aahz (a...@pythoncraft.com)   <*> http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."  --Brian W. Kernighan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-15 Thread Luke Kenneth Casson Leighton
> practical decision, due to /bin/sh.exe messing around and stopping
> python.exe from running!  (under cmd.exe it's fine.  i have to do a
> bit more investigation:

http://bugs.python.org/issue4956

found it.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-17 Thread Roumen Petrov

Luke Kenneth Casson Leighton wrote:
[SNIP]

i'm going to _try_ to merge in #3871 but it's... the prospect of
sitting waiting for configure to take THREE hours to complete, due to
/bin/sh.exe instances taking TWO SECONDS _each_ to start up does not
really fill me with deep joy.


As from version 1.1.8 msys bash could be run in wine. May be wine issue 
12046 is not enough to run a born shell in wine. The ash from pw32 
projects (not updated in past 6 years :( ) work in wine but the problem 
is same - it is to slow, even more.



[SNIP]

it's all a bit odd - it still feels like things are being
cross-compiled... but they're not... it's just that setup.py has paths
that don't _quite_ match up with the msys environment...


You could use CPPFLAGS and LDFLAGS to point other locations.
Usually wine drive Z: is mapped to filesystem root and visible as /z in 
msys.



[SNIP]

the regression testing is _great_ fun!  some of the failures are
really quite spectacular, but surprisingly there are less than
anticipated.


About 5 test fail in emulated environment due bugs in emulator.

May be some math tests fail. Python math tests are too strict for msvcrt
7.0/6.0 (default runtime). Simple work around is to use long double 
functions from mingwex library.
Other work-around is to build whole python (including modules) with 
msvcrt 9.0 but I'm not sure that I will publish soon technical details 
about this build as "DLL hell" is replaces by "Assembly hell" (see 
python issues related to vista and MSVC build).



[SNIP]
Roumen

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-17 Thread Luke Kenneth Casson Leighton
hiya roumen, good to hear from you - i've been merging in the work
that you did, on mingw native-and-cross compiles.  got a couple of
questions, will post them in the bugreport ok?

On Sat, Jan 17, 2009 at 3:16 PM, Roumen Petrov
 wrote:
> Luke Kenneth Casson Leighton wrote:
> [SNIP]
>>
>> i'm going to _try_ to merge in #3871 but it's... the prospect of
>> sitting waiting for configure to take THREE hours to complete, due to
>> /bin/sh.exe instances taking TWO SECONDS _each_ to start up does not
>> really fill me with deep joy.
>
> As from version 1.1.8 msys bash could be run in wine.

 ah, that might be worth trying.  thank you!

>> it's all a bit odd - it still feels like things are being
>> cross-compiled... but they're not... it's just that setup.py has paths
>> that don't _quite_ match up with the msys environment...
>
> You could use CPPFLAGS and LDFLAGS to point other locations.
> Usually wine drive Z: is mapped to filesystem root and visible as /z in
> msys.

 oh don't get me wrong - it all works, all compiles absolutely fine,
 modules and everything...

 it just... _feels_ like a cross-compile, because of msys.
 you're sort-of in unix-land, yet the resultant binary python.exe
 is most _definitely_ "c:/"ey.

>> the regression testing is _great_ fun!  some of the failures are
>> really quite spectacular, but surprisingly there are less than
>> anticipated.
>
> About 5 test fail in emulated environment due bugs in emulator.

 i have 12 that fail - but if i replace msvcrt builtin with msvcrt
native, all but two or three disappear.  the S8I one (which is due to
gcc, you already found that i noticed); tmpfile() tries to write to
z:/ which is of course / - the root filesystem; and
os.environ['HELLO'] = 'World; os.popen("/bin/sh echo $HELLO").read()
!= 'World' but i'm not sure if that one _should_ succeed: the only
reason it got run is because i _happened_ to have msys installed.


> May be some math tests fail. Python math tests are too strict for msvcrt
> 7.0/6.0 (default runtime). Simple work around is to use long double
> functions from mingwex library.

 oh i noticed in http://bugs.python.org/issue3871 that you replaced
some of the math functions.

> Other work-around is to build whole python (including modules) with msvcrt
> 9.0 but I'm not sure that I will publish soon technical details about this
> build as "DLL hell" is replaces by "Assembly hell" (see python issues
> related to vista and MSVC build).

 ooo, scarey.

 oh!  roumen, very important: martin says we have to be _really_
careful about releases of mingw-compiled python.exe and
libpython2.N.dll - they _have_ to match up with the python-win32 build
msvcrt otherwise it will cause absolute mayhem.

i'm currently adding an msvcr80 specfile so i can build under wine -
see http://bugs.python.org/msg79978 which requires that you customise
wine to get it to drop something blah blah don't care in the least, i
just want it all to work :)

l.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] report on building of python 2.5.2 under msys under wine on linux.

2009-01-17 Thread Luke Kenneth Casson Leighton
> About 5 test fail in emulated environment due bugs in emulator.

 oh - nearly forgot: several of the ctypes tests fail quite spectacularly :)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com