Problem with compiling module usung VC and Python 2.6

Bug #553851 reported by Michał Niklas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyMQI
Fix Released
Low
Dariusz Suchojad

Bug Description

I have a problem while compiling module.

I use ActivePython 2.6:
c:\python_libs\pymqi-1.0.1>python
ActivePython 2.6.5.12 (ActiveState Software Inc.) based on
Python 2.6.5 (r265:79063, Mar 20 2010, 14:22:52) [MSC v.1500 32 bit (Intel)] on
win32

Moduke comopilation ends with:

c:\python_libs\pymqi-1.0.1>python setup.py build server
Building PyMQI server 32bits
running build
running build_py
running build_ext
building 'pymqe' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -DPYQMI_SERVERBUILD=1 "-IC:\Program Files\IBM\WebSphere MQ\Tools
\c\include" -IC:\Python26\include -IC:\Python26\PC /Tcpymqe.c /Fobuild\temp.win3
2-2.6\Release\pymqe.obj
pymqe.c
pymqe.c(949) : error C2275: 'PyObject' : illegal use of this type as an expressi
on
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
pymqe.c(949) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(950) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(950) : warning C4047: 'function' : 'PyObject *' differs in levels of ind
irection from 'int'
pymqe.c(950) : warning C4024: 'PyDict_SetItem' : different types for formal and
actual parameter 3
pymqe.c(952) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(952) : warning C4047: '==' : 'int' differs in levels of indirection from
 'void *'
pymqe.c(952) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(952) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(952) : error C2065: 'pyItemIntVal' : undeclared identifier
pymqe.c(993) : error C2275: 'PyObject' : illegal use of this type as an expressi
on
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
pymqe.c(993) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(994) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(994) : warning C4047: 'function' : 'PyObject *' differs in levels of ind
irection from 'int'
pymqe.c(994) : warning C4024: 'PyDict_SetItem' : different types for formal and
actual parameter 3
pymqe.c(998) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(998) : warning C4047: '==' : 'int' differs in levels of indirection from
 'void *'
pymqe.c(998) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(998) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(998) : error C2065: 'pyItemStrVal' : undeclared identifier
pymqe.c(1029) : error C2275: 'PyObject' : illegal use of this type as an express
ion
        c:\python26\include\object.h(108) : see declaration of 'PyObject'
pymqe.c(1029) : error C2065: 'returnValue' : undeclared identifier
pymqe.c(1032) : error C2065: 'returnValue' : undeclared identifier
pymqe.c(1032) : warning C4047: 'return' : 'PyObject *' differs in levels of indi
rection from 'int'
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

I don't know why this failed: wrong Python, C compiler or module?

tags: added: compilation setup
Revision history for this message
Dariusz Suchojad (dsuch) wrote :

Hm, I can confirm it, not sure why it's happening but I'll investigate it. In the meantime, I'm sure you won't have any problems with MinGW, that's the stack I've been using to create Windows binaries so far. And that's what I'll use to create Python 2.5 binaries as well because VC9.0 won't work with Python 2.5 and Microsoft doesn't seem to offer the previous versions of their compiler.

Changed in pymqi:
assignee: nobody → Dariusz Suchojad (dsuch)
importance: Undecided → Low
milestone: none → 1.1
status: New → Confirmed
Revision history for this message
Dariusz Suchojad (dsuch) wrote :

Michał, can you please give the lp-553851 branch a try? Here's a command to get it

$ bzr branch lp:~dsuch/pymqi/lp-553851

Seems MS VC is more picky than MinGW is about where in the function body variables are declared. The compilation went smoothly this time and I hope it's going to resolve your problems.

Cheers!

Revision history for this message
Dariusz Suchojad (dsuch) wrote :

Hi Michał,

have you perhaps had any time to take a look at the fix?

Thanks!

Revision history for this message
Michał Niklas (mn-heuthes) wrote :

Yes. This fixed the problem. Thanks!

Revision history for this message
Dariusz Suchojad (dsuch) wrote :

Thanks for confirming!

Changed in pymqi:
status: Confirmed → Fix Committed
Revision history for this message
Dariusz Suchojad (dsuch) wrote :

I've merged the branch to trunk in r29.

Revision history for this message
Dariusz Suchojad (dsuch) wrote :

Fix released in PyMQI 1.1

Changed in pymqi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.