Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

help compiling Python on vs 2008!

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


inhahe at gmail

May 16, 2008, 8:09 PM

Post #1 of 11 (417 views)
Permalink
help compiling Python on vs 2008!

In order to compile Python, I need to compile 7 external libraries manually
that don't come with Python, the first being tcl. I'm compiling on VS 2008.
Since the Python source doesn't have a PCBuild9 directory, I'm using the
PCBuild8 directory. When following readme.txt to a T, tcl won't compile.
First it gave me an error because an environment variable wasn't set, so I
dug in and found out what needs to be set (MSDEVDIR, MSVCDIR, or MSSDK) and
set it. Not that I know what it needs to be set to, but I made a good guess
based on some google searches. Now I don't get that error, but I get a
truckload of C errors when compiling.
Here's the first one, or actually, all the output up to and including the
first C error:

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

===============================================================================
*** Compiler has 'Optimizations'
*** Compiler has 'Pentium 0x0f fix'
*** Linker has 'Win98 alignment problem'
*** Intermediate directory will be '.\Release\tcl_Dynamic'
*** Output directory will be '.\Release'
*** Suffix for binaries will be ''
*** Optional defines are ''
*** Dependency rules are not being used.

cl -nologo -c -W3 -YX -Fp.\Release\tcl_Dynamic\ -QI0f -O2 -Op -Gs -MD -I
"..\win" -I"..\generic" -DTCL_PIPE_DLL=\"tclpip84.dll\" -DBUILD_tcl -Fo.\Relea
se\tcl_Dynamic\ @E:\Users\ADMINI~1\AppData\Local\Temp\nmD926.tmp
cl : Command line warning D9002 : ignoring unknown option '-YX'
cl : Command line warning D9002 : ignoring unknown option '-QI0f'
cl : Command line warning D9002 : ignoring unknown option '-Op'
regerror.c
..\generic\regerror.c(53) : warning C4996: 'errcode': This name was
supported du
ring some Whidbey pre-releases. Instead, use the standard name errno_t.
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(548) :
see declaration of 'errcode'
..\generic\regerror.c(53) : error C2081: 'preg' : name in formal parameter
list
illegal


what is going on here, and how do I compile these external libraries?


--
http://mail.python.org/mailman/listinfo/python-list


lists at cheimes

May 17, 2008, 5:59 AM

Post #2 of 11 (396 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

inhahe schrieb:
> what is going on here, and how do I compile these external libraries?

I assume you are trying to compile Python 2.5 with VS 9.0. It's not
supported. Some extensions don't compile under VS 9.0

Christian

--
http://mail.python.org/mailman/listinfo/python-list


inhahe at gmail

May 17, 2008, 12:03 PM

Post #3 of 11 (395 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

"Christian Heimes" <lists [at] cheimes> wrote in message
news:mailman.1270.1211029209.12834.python-list [at] python
> inhahe schrieb:
>> what is going on here, and how do I compile these external libraries?
>
> I assume you are trying to compile Python 2.5 with VS 9.0. It's not
> supported. Some extensions don't compile under VS 9.0
>
> Christian
>

I just installed Visual Studio 8 and tried compling and I bgot the same
problem. hope this isn't a redundant post. i don't know if
pyhon-list [at] python reposts here.


--
http://mail.python.org/mailman/listinfo/python-list


matthieu.brucher at gmail

May 17, 2008, 12:26 PM

Post #4 of 11 (389 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

Hi,

I did not manage to build extension with distutils with Python compiled with
VS different than 2003. The need for 2003 was hard-coded in distutils.
You can try building extensions with VS2008 with Scons. This is what I do a
lot, and everything works fine as long as the interface does not use
standard structures (like FILE, custom structures are fine) or objects
allocated in the extension is freed in the extension.

Matthieu

2008/5/17 inhahe <inhahe [at] gmail>:

>
> "Christian Heimes" <lists [at] cheimes> wrote in message
> news:mailman.1270.1211029209.12834.python-list [at] python
> > inhahe schrieb:
> >> what is going on here, and how do I compile these external libraries?
> >
> > I assume you are trying to compile Python 2.5 with VS 9.0. It's not
> > supported. Some extensions don't compile under VS 9.0
> >
> > Christian
> >
>
> I just installed Visual Studio 8 and tried compling and I bgot the same
> problem. hope this isn't a redundant post. i don't know if
> pyhon-list [at] python reposts here.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


lists at cheimes

May 17, 2008, 2:05 PM

Post #5 of 11 (387 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

Matthieu Brucher schrieb:
> Hi,
>
> I did not manage to build extension with distutils with Python compiled with
> VS different than 2003. The need for 2003 was hard-coded in distutils.
> You can try building extensions with VS2008 with Scons. This is what I do a
> lot, and everything works fine as long as the interface does not use
> standard structures (like FILE, custom structures are fine) or objects
> allocated in the extension is freed in the extension.

Python 2.5 is compiled with VS 2003. Neither VS 2005 nor 2008 are
officially supported.

You can compile extensions with a different version of MS VC but it can
get you in a lot of trouble. Every version of the VS Compiler uses its
own C Runtime Library (MSVCRT). You can't share some resources like
allocated memory and FILE* objects between MSVCRTs.

Christian

--
http://mail.python.org/mailman/listinfo/python-list


matthieu.brucher at gmail

May 17, 2008, 2:35 PM

Post #6 of 11 (389 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

2008/5/17 Christian Heimes <lists [at] cheimes>:

> Matthieu Brucher schrieb:
> > Hi,
> >
> > I did not manage to build extension with distutils with Python compiled
> with
> > VS different than 2003. The need for 2003 was hard-coded in distutils.
> > You can try building extensions with VS2008 with Scons. This is what I do
> a
> > lot, and everything works fine as long as the interface does not use
> > standard structures (like FILE, custom structures are fine) or objects
> > allocated in the extension is freed in the extension.
>
> Python 2.5 is compiled with VS 2003. Neither VS 2005 nor 2008 are
> officially supported.


Even if you compile Python 2.5 with VS2008, VS2003 is used for the
extensions, AFAIR. I didn't try Python 2.6 because I only have Visual C++
Express 2008.

You can compile extensions with a different version of MS VC but it can
> get you in a lot of trouble. Every version of the VS Compiler uses its
> own C Runtime Library (MSVCRT). You can't share some resources like
> allocated memory and FILE* objects between MSVCRTs.


I don't see your point, that's what I wrote...

Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


lists at cheimes

May 17, 2008, 3:22 PM

Post #7 of 11 (387 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

Matthieu Brucher schrieb:
> Even if you compile Python 2.5 with VS2008, VS2003 is used for the
> extensions, AFAIR. I didn't try Python 2.6 because I only have Visual C++
> Express 2008.

You can compile 2.6 and 3.0 with the free Express Edition just fine.

Christian

--
http://mail.python.org/mailman/listinfo/python-list


cjw at ncf

May 17, 2008, 4:51 PM

Post #8 of 11 (383 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

inhahe wrote:
> "Christian Heimes" <lists [at] cheimes> wrote in message
> news:mailman.1270.1211029209.12834.python-list [at] python
>> inhahe schrieb:
>>> what is going on here, and how do I compile these external libraries?
>> I assume you are trying to compile Python 2.5 with VS 9.0. It's not
>> supported. Some extensions don't compile under VS 9.0
>>
>> Christian
>>
>
> I just installed Visual Studio 8 and tried compling and I bgot the same
> problem. hope this isn't a redundant post. i don't know if
> pyhon-list [at] python reposts here.
>
>
You might consider working with Python
2.6, which does compile with Visual
Studio C++ 2008 and running the test
(Tools\Buildbot\rt.bat) produces very
few errors. Just remember that 2.6 is
tsill at the alpha stage of development.

Colin W.
--
http://mail.python.org/mailman/listinfo/python-list


inhahe at gmail

May 17, 2008, 9:21 PM

Post #9 of 11 (366 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

VS2005 seems to be officially supported. Here's part of the readme file in
the PCBuild8 directory in the Python 2.5 source.

"
Building Python using VC++ 8.0
-------------------------------------
This directory is used to build Python for Win32 platforms, e.g. Windows
95, 98 and NT. It requires Microsoft Visual C++ 8.0
(a.k.a. Visual Studio 2005). There are two Platforms defined, Win32
and x64.
(For other Windows platforms and compilers, see ../PC/readme.txt.)
"

Although I take your point about sharing resources. I'm not sure I should
bother compiling 2.6, since I'll probably come across/already use modules
that I need that don't support 2.6 since it's so new. So it would be nice
to know why following the instructions doesn't work. Compilers never work
for me, though.. even when I follow instructions and they work for everybody
else. It's like a schroedinbug - I just don't expect them to work. As a
matter of principle, though, it /should/ work.. so it's gotta be
*somebody's* job to debug this! :P

"Christian Heimes" <lists [at] cheimes> wrote in message
news:mailman.1287.1211058342.12834.python-list [at] python
> Matthieu Brucher schrieb:
>> Hi,
>>
>> I did not manage to build extension with distutils with Python compiled
>> with
>> VS different than 2003. The need for 2003 was hard-coded in distutils.
>> You can try building extensions with VS2008 with Scons. This is what I do
>> a
>> lot, and everything works fine as long as the interface does not use
>> standard structures (like FILE, custom structures are fine) or objects
>> allocated in the extension is freed in the extension.
>
> Python 2.5 is compiled with VS 2003. Neither VS 2005 nor 2008 are
> officially supported.
>
> You can compile extensions with a different version of MS VC but it can
> get you in a lot of trouble. Every version of the VS Compiler uses its
> own C Runtime Library (MSVCRT). You can't share some resources like
> allocated memory and FILE* objects between MSVCRTs.
>
> Christian
>


--
http://mail.python.org/mailman/listinfo/python-list


inhahe at gmail

May 17, 2008, 10:00 PM

Post #10 of 11 (375 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

"inhahe" <inhahe [at] gmail> wrote in message news:...
> VS2005 seems to be officially supported. Here's part of the readme file
> in the PCBuild8 directory in the Python 2.5 source.
>
> "
> Building Python using VC++ 8.0
> -------------------------------------
> This directory is used to build Python for Win32 platforms, e.g. Windows
> 95, 98 and NT. It requires Microsoft Visual C++ 8.0
> (a.k.a. Visual Studio 2005). There are two Platforms defined, Win32
> and x64.
> (For other Windows platforms and compilers, see ../PC/readme.txt.)
> "
>
> Although I take your point about sharing resources. I'm not sure I should
> bother compiling 2.6, since I'll probably come across/already use modules
> that I need that don't support 2.6 since it's so new. So it would be nice
> to know why following the instructions doesn't work. Compilers never work
> for me, though.. even when I follow instructions and they work for
> everybody else. It's like a schroedinbug - I just don't expect them to
> work. As a matter of principle, though, it /should/ work.. so it's gotta
> be *somebody's* job to debug this! :P
>

Actually, I was under the impression that the socket module relied on one of
the external libraries to work, since it didn't work when I compiled it.
But reading the readme again I realized that the socketmodule is supposed to
compile out of the box. So I compiled Python again on VS2005 instead of
2008 (the error I posted that didn't work on 2008 or 2005 was trying to
compile one of the external libraries), and the socket module seems to work.
The external libraries don't seem that important. So it was partly my
fault.. but still, the external libraries didn't compile like they said they
would. =P



--
http://mail.python.org/mailman/listinfo/python-list


martin at v

May 17, 2008, 11:34 PM

Post #11 of 11 (373 views)
Permalink
Re: help compiling Python on vs 2008! [In reply to]

> VS2005 seems to be officially supported.

That impression is incorrect. There is the PCbuild8 directory, but
it isn't maintained or tested in a systematic way. Users of it may
need to adjust it before it can do something useful.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.