[EVALUATION] - E02 - Support for MinGW Open Source Compiler

S

Stephen Kellett

Simon said:
Oh, I don't. But fair's fair - we've carried our share of the burden, surely?

He is already badgering the Ruby guys. Without about as much success as
this newsgroup. When he doesn't get what he wants a post along the lines
of

"XXXX lang is only suited to small projects and not real world
industrial projects"
or
"the community doesn't care"
will appear.

Its quite incredible - in the time he has spent complaining he could
have done his own research and written some useful tools. I know how
long it took me to write my first major C++ app that interfaced with
Python and Ruby. It was less time than he has spent complaining - and
that included rebuilding Python/Ruby, inspecting the source for what I
needed and performing many experiments before I succeeded.

Stephen
 
G

Grant Edwards

I have.

I've review several threads,publications, actions etc., that show that
the users have this need.

This is open source. You don't just order somebody else to do
what you want. You _do_ it and donate it to the community.
please review the initial thread with care, i've pointed to
some documents/thread.

So what? You want it, you do it.
 
D

Diez B. Roggisch

Now, it's rather common to accuse people of trolling these days.
The fact that Markus Wankus said that Ilias is a troll does not mean
that everybody should reply to him in that tone.
This is a one .vs many battle and it sucks.

Just because someone says somebody else is a troll surely is not valid
reason to take that for granted.

But googling [1-*] for Mr. Lazaridis makes it apparent that he _is_ a troll.
And even if you only take the two threads on c.l.py into account IMHO you
can see that.

He's been _banned_ from several OS project mailing lists like eclipse,
netbeans and hibernate. Of course he claims that is because of censorship
and has nothing to do with his actions in those respective communities. But
somehow to me at least a pattern is visible.


[1]:
http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#748a70ee4e39fc41

[2]: http://www.netbeans.org/servlets/ReadMsg?msgId=872061&listName=nbusers

[3]:
http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#85ae8ee0bccdeb14

[4]:
http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#18b5dcfd54a6a902
 
P

Pat

Wow! I must say, I'm less than impressed with the responses so far. I
know Ilias can give the impression that he is just trolling, but I can
assure you he is not. At least, not in this case. ;-)

So in an effort to make some headway, I'm going to try to summarize the
current state of affairs. The bottom line is that compiling C
extension modules on the Windows platform for Python 2.4 is, today, a
royal pain in the ass. Period. Here's why.

The main challenge is that extensions must be compiled using the same
runtime dll as that used by the Python interpreter itself. The
official Windows binary installation of Python 2.3.5 and its
predecessors was compiled with one MS product, which was fairly easy to
support with minGW, but Python 2.4 was compiled with the newer .NET
compiler. Unfortunately, compiling extensions for Python 2.4 with the
free MS tools is not trivial, as evidenced by Mike Fletcher's very
thorough document on the subject:

Python 2.4 Extensions w/ the MS Toolkit Compiler

http://www.vrplumber.com/programming/mstoolkit/

In addition, there are some unresolved licensing questions concerning
the .NET runtime file for extensions (msvcr71.dll):

http://mail.python.org/pipermail/python-dev/2005-February/051393.html

There have been extensive discussions about these issues on the
Python-Dev mailing list over the past couple of months (mostly in
December, but continuing to the present - see
http://mail.python.org/pipermail/python-dev/2004-December/thread.html
as a starting point), which seem to have fizzled out or at least
haven't resolved much. The discussions made reference to work that has
already been done to allow Python to be compiled with minGW:

pyMinGW is a patch to Python source that aims to get Python to compile
under MinGW

http://jove.prohosting.com/iwave/ipython/pyMinGW.html

I've not seen any commentary on the quality of this patch, so that
doesn't appear to be the reason it hasn't been officially adopted.
Reading all the threads from Python-Dev has not enlightened me at all
as to what the underlying reason is for not adopting these changes.
Maybe there are good reasons, I just couldn't find them, and I'm
usually pretty good with Google.

A few of you have mentioned that minGW is not an optimizing compiler on
the Windows platform, whereas the MS .NET one is. If anyone has
information on the performance differences, I'd really appreciate being
able to see it, particularly as it applies to Python 2.4.

Now, we get to the essence of my particular situation. I've got a
project that includes some Python extensions written in C. My users
(who are Python developers, but not necessarily hard-core types) need
to be able to work out of their local Subversion checkouts. This
includes locally compiling these extensions as necessary. I'd like
this to work with Python 2.4, and be as painless as possible on my
users. I can't expect them to purchase a .NET compiler or go through a
bunch of configuration changes. So far, I haven't figured out a good
way to support this. I'm open to suggestions. I suspect that my needs
are very similar to those of the original poster.

Perhaps the issue is in part a matter of minGW catching up with the new
MS compilers. My understanding of and experience with Python 2.3.5 and
its predecessors has been that Python itself didn't need to be
recompiled with minGW, since extensions compiled with minGW linked to
the same C runtime dll. So if minGW had support for msvcr71.dll then
maybe this problem goes away with Python 2.4 as well.

If anyone can shed any light on this situation, it would really help me
out. Thanks.
 
F

Fredrik Lundh

:

The bottom line is that compiling C extension modules on the
Windows platform for Python 2.4 is, today, a royal pain in the
ass.
really?

> python setup.py install

works for me.

</F>
 
C

Cameron Laird

I don't see the contradiction here. It beats a great deal of commercial
solutions in a lot of ways. But not on every single one of these. And the
_reason_ for beating commercial software in certain aspects is exactly that
somebody stood up and volunteered. Obviously you aren't interested in the
more labour-intensive parts of the os-development.


They might not care about _your_ perceived essential needs. But as lots of
people use python and python based solutions with great commercial success,
you might think of reviewing your needs more critical. After all, there is
no _perfect_ system for all needs.
.
.
.
Me, too. On the off-chance that a naive passerby is misled by
parts of this thread, I'll point out that ... well, if the
alternative to Python, say, is commercial products which are to
be judged on how much they "care about essential needs and
requirements" of *users* ...

Nope, 'can't do it. I can't finish that sentence with a straight
face.
 
P

Pat

So what if someone appears to be a troll? Suck it up and rise above
it. This thread started with legitimate questions. Unfortunately,
almost every response has been dismissive, petty, and a complete waste
of time and effort. Please respond to the issue or simply ignore it.
The issue is real and I'd like to find a solution to it as well. Right
now it feels like I'm in the company of a bunch of hell-bent school
bullies. I'm ashamed of the behavior I'm witnessing on this list.
 
P

Pat

I thought I was being as clear and specific as I needed to be.
Apparently not. I'm talking about compiling the original source code,
per the recommendations made by Mike Fletcher and documented here:

Python 2.4 Extensions w/ the MS Toolkit Compiler

http://www.vrplumber.com/programming/mstoolkit/

Now, if you know something I don't, I'm all ears. But I don't see how
your suggestion solves my problem. But I'll be thrilled if that is the
case. Care to enlighten me?
 
S

Stephen Kellett

Pat said:
Wow! I must say, I'm less than impressed with the responses so far. I
know Ilias can give the impression that he is just trolling, but I can
assure you he is not. At least, not in this case. ;-)

He deserves what he gets. He appears to put no effort in, other than to
o Write his own document for his own needs that no one else is
interested in
o Answer people's comments to him in a way that does not demonstrate he
has put any effort in.
o Based on his answers it seems pretty clear to me (and it seems many
others) that he has not put any effort in and has no intention of doing
so.
In addition, there are some unresolved licensing questions concerning
the .NET runtime file for extensions (msvcr71.dll):

To quote that URL;
<QUOTE>
The 2.4 python.org installer installs msvcr71.dll on the target system.

If someone uses py2exe or a similar tool to create a frozen application,
is he allowed to redistribute this msvcr71.dll to other users together
with his application or not, even if he doesn't own MSVC?
</END QUOTE>

msvcr71.dll is a redistributable for applications written using their
compiler. You can redistribute that. If that answer is not good enough
for you there is now a free version of Microsofts Visual Studio called
Visual Studio Express (downloadable from the Microsoft's website). This
DLL is (to my understanding) part of Visual Studio 7.1 and Visual Studio
Express.

No licensing problem exists. Microsoft will not get upset about
msvcr71.dll being distributed. They will if you distribute msvcr71d.dll
though - don't do that!

I'm not a lawyer, so take this as you would any other free advice and
download Visual Studio Express and read the redistribution sections in
the license/help file to verify. Alternatively search msdn.microsoft.com
for "redistributable".

Look at this from Microsoft's perspective - Python is a language that
can be used on Windows operating systems. msvcr71.dll is required to
make some versions of Python work. Microsoft are not stupid - they know
that to encourage uptake of their OS they shouldn't put needless
restrictions on certain technology - the C runtime being on of those
technologies. It is in Microsoft's own best interests to allow
msvcr71.dll to be used for Python.
users. I can't expect them to purchase a .NET compiler or go through a

See above.

Regards

Stephen
 
D

David Fraser

Pat said:
Wow! I must say, I'm less than impressed with the responses so far. I
know Ilias can give the impression that he is just trolling, but I can
assure you he is not. At least, not in this case. ;-)

So in an effort to make some headway, I'm going to try to summarize the
current state of affairs. The bottom line is that compiling C
extension modules on the Windows platform for Python 2.4 is, today, a
royal pain in the ass. Period. Here's why.

The main challenge is that extensions must be compiled using the same
runtime dll as that used by the Python interpreter itself.

Actually compiling extensions with mingw seems to work fine. Have you
tried it?

David
 
S

Stephen Kellett

Stephen Kellett said:
Studio Express (downloadable from the Microsoft's website). This DLL is
(to my understanding) part of Visual Studio 7.1 and Visual Studio
Express.

My mistake. Visual Studio Express is going to be part of Version 8
(2005) and thus the DLLs there will be msvcr80.dll

That said, I still stand by my licensing comments.

Distributable files overview.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/h
tml/vcconalistofredistributablefiles.asp

V7.0/V7.1 specific redistribution instructions.
http://support.microsoft.com/default.aspx?scid=kb;en-us;326922
Title: INFO: Redistribution of the Shared C Runtime Component in Visual
C++ .NET
Article ID : 326922
Last Review : March 25, 2004
Revision : 1.0
Keywords: kbinfo KB326922

Stephen
 
S

Stephen Kellett

Pat said:
now it feels like I'm in the company of a bunch of hell-bent school
bullies.

From my experience of bully behaviour that isn't what is happening here.
Bullying usually involves abusive behaviour and language and isn't much
to do with the topic as the person. The responses he has got are to do
with how he is behaving, not who he is. I haven't seen any abusive
language. As for behaviour, people are being as blunt with him as he is
with them. Many have also told him what he should do in order to get a
better response. He has ignored them.

Many societies around the world shun people that won't fit the norm. The
norm in the newsgroups he is causing trouble in is that "You look for
yourself first, do some research, then ask". He isn't even willing to
use a search engine, let alone read the documentation or heaven forbid,
read the source code himself. Sooner or later he'll give up, or realise
that if he does a bit of the work himself he'll get much more back. Its
up to him.

You'll notice that I've answered your question in another reply as its
obvious you have put some effort in before making your comments. In
other words I am not behaving in a contradictory way to what I specified
above.

Stephen
 
P

Pat

Actually, no. We ran into some issues with Python 2.4 that caused us
to return to Python 2.3.5. But I would really like to upgrade to
Python 2.4. So I started researching the subject before I did
anything.

If you are telling me that minGW can compile extensions that are
compatible with the Python 2.4 that uses msvcr71.dll, then that is good
news indeed. Is there anything that needs to be configured or patched
to make this happen? And how does minGW know which dll to link? What
if I have both versions of Python installed - 2.3.5 and 2.4? Is there
an easy way to detect this and switch between the two dlls?

If I'm asking questions already answered elsewhere, I'd love a link to
that resource, if you have it.

Thanks,

Pat

Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Pypersyst http://www.pypersyst.org
 
F

Fredrik Lundh

"Pat"wrote:
I thought I was being as clear and specific as I needed to be.
Apparently not. I'm talking about compiling the original source code

the python source or the extension source?
> The bottom line is that compiling C extension modules

would indicate the latter. setup.py handles that just fine, if you have the
right tools. no pain at all.
Now, if you know something I don't, I'm all ears. But I don't see how
your suggestion solves my problem.

if your problem is compiling C extension modules, I suggest getting a
good compiler. I've done that, and compiling C extension modules is
no problem at all.

if your problem is that you don't want to use a good compiler, or that
your company cannot afford to buy you a compiler, or you have other
reasons to chose the "pain in the ass" way over the "it just works" way,
I'm afraid I cannot help you. my time's too precious to waste on inferior
tools.

</F>
 
I

Ilias Lazaridis

Grant said:
This is open source. You don't just order somebody else to do
what you want. You _do_ it and donate it to the community.

I analyze the current situation.

The is the fundamentall step before doing anything.

But the reaction of this community raises some questions and my curiosity.
So what? You want it, you do it.

I like to synchronize any efforts with the existing ones.

That's why I ask some questions.

nothing special.

..
 
P

Pat

Stephen,

I appreciate your responses. Maybe "school bullies" was an
exaggeration on my part. At the same time, I'm not sure it is good for
the Python community to expect everyone to roll up their sleeves and
hack at something to make it work. (And I don't mean to imply that you
hold that opinion. But far too many others *have* expressed that.)
It's a marketing issue as much as anything. Why is Apple doing so
well? They make everything simple. Now the techies will argue that
they make some things too simple (like the iPod), but it's hard to deny
that simple things that work consistently without any fuss have a
broader appeal with the public at large.

I think the same applies to developers. Not every programmer is
willing to go through a lot of pain and effort just to get something
simple to work. I, for one, am willing to go through that pain to save
users of my product (who happen to be developers) from having to do the
same. But I don't think any less of my users. I'm as lazy as they
are. I like simple things that work consistently without any fuss too.
:)

Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Pypersyst http://www.pypersyst.org
 
S

Stephen Kellett

Pat said:
Actually, no. We ran into some issues with Python 2.4 that caused us
to return to Python 2.3.5. But I would really like to upgrade to
Python 2.4. So I started researching the subject before I did
anything.

Pat, could you include some context in your replies? I have no idea if
you are replying to my comments about Visual Studio Express or someone
else? The only text I see in your replies is what you write, no text
from the posting you are replying to. As it is I've ignored all your
replies so far as I'm not sure I'm the person you are addressing (until
I saw the above, now I'm confused).

Stephen
 
P

Pat

users. I can't expect them to purchase a .NET compiler or go through
a
See above.

That answers the cost question (assuming that your interpretation of
the licensing is correct, since I'm not a lawyer nor qualified to
render much of an opinion on that). But there is still the issue of
going through a bunch of configuration hassle that scares me away from
expecting my users to make use of the MS tools. Unless things have
gotten easier since Mike Fletcher wrote about the situation.

But thanks for the licensing info. Much appreciated. :)

Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Pypersyst http://www.pypersyst.org
 
B

Bruno Desthuilliers

jfj a écrit :
bruno said:
Ilias said:
I'm a newcomer to python:

[EVALUATION] - E01: The Java Failure - May Python Helps?
http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553

My trollometer's beeping...

When person 'A' calls person 'B' a troll, these are the possibilities:

1. 'A' is indeed a troll

2. 'B' is the troll

3. both 'A' and 'B' are trolls

4. nobody is a troll. they're computer scientists passionate about their
ideas and they are trying to convince each other.

5. nobody is a troll and there is no trolling going on.

Now, it's rather common to accuse people of trolling these days.
The fact that Markus Wankus said that Ilias is a troll does not mean
that everybody should reply to him in that tone.
This is a one .vs many battle and it sucks.
You're totaly right. Now just take some minutes to (re)read this thread,
then google for 'Ilias Lazaridis'.

Bruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top