Bug 297 - Python Binding Compilation error with Cygwin
: Python Binding Compilation error with Cygwin
Status: RESOLVED FIXED
: ns-3
python bindings
: pre-release
: PC Windows
: P1 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-08-28 12:34 EDT by
Modified: 2008-09-08 14:40 EDT (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-08-28 12:34:34 EDT
With the new rev 564 of pybindgen in Cygwin(Python 2.5.1), the errors are
listed as following:

[456/509] cxx: build/debug/bindings/python/ns3_module_common.cc ->
build/debug/bindings/python/ns3_module_common_3.o
debug/bindings/python/ns3_module_common.cc: In function `PyObject*
_wrap_PyNs3ListErrorModel_GetList(PyNs3ListErrorModel*)':
debug/bindings/python/ns3_module_common.cc:5571: error: no match for
'operator=' in 'retval = ns3::ListErrorModel::GetList() const()'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/list.tcc:121: note:
candidates are: std::list<_Tp, _Alloc>& std::list<_Tp, _Alloc>::operator=(const
std::list<_Tp, _Alloc>&) [with _Tp = unsigned int, _Alloc =
std::allocator<unsigned int>]
debug/bindings/python/ns3_module_common.cc: In function `PyObject*
_wrap_PyNs3ListErrorModel_SetList(PyNs3ListErrorModel*, PyObject*, PyObject*)':
debug/bindings/python/ns3_module_common.cc:5589: error: no matching function
for call to `ns3::ListErrorModel::SetList(std::list<unsigned int,
std::allocator<unsigned int> >&)'
debug/ns3/error-model.h:215: note: candidates are: void
ns3::ListErrorModel::SetList(const std::list<uint32_t, std::allocator<uint32_t>
>&)
Build failed
 -> task failed (err #129):
[bld:///cygdrive/d/Study/WirelessCommunication/NS-3/
repos/ns-3-dev/bindings/python/ns3_module_common_3.o]
------- Comment #1 From 2008-08-29 17:33:01 EDT -------
*** Bug 298 has been marked as a duplicate of this bug. ***
------- Comment #2 From 2008-09-03 17:15:02 EDT -------
I don't think that this bug is fixable. I would like to suggest that we disable
python bindings on cygwin unless the user installs gccxml.
------- Comment #3 From 2008-09-04 06:57:30 EDT -------
*** Bug 310 has been marked as a duplicate of this bug. ***
------- Comment #4 From 2008-09-06 09:32:51 EDT -------
(In reply to comment #2)
> I don't think that this bug is fixable. I would like to suggest that we disable
> python bindings on cygwin unless the user installs gccxml.

Python bindings are disabled now on cygwin.

Should we really enable Python bindings if (py)gccxml are installed?  They
would be arbitrary versions, and in my experience things might easily go wrong
if the wrong versions are used.  For instance, pygccxml svn trunk works works
well with gccxml cvs head, but pygccxml 0.9.5 doesn't work well with gccxml
head, only with gccxml cvs from around the date 2008-04-20, neither does
pygccxml trunk work well gccxml cvs from 2008-04-20, only with HEAD.

At least for NS-3.2 I see no better solution than this: when on CygWin disable
python bindings with a warning suggesting the use of MingW in order to get
Python bindings on Win32.  Anything else sounds too complicated and error prone
to work, especially in such a short time frame.
------- Comment #5 From 2008-09-06 10:24:23 EDT -------
One problem I forgot with MingW is that it is not compiling atm (bug #296) :-(
------- Comment #6 From 2008-09-07 23:57:44 EDT -------
(In reply to comment #4)
> (In reply to comment #2)
> > I don't think that this bug is fixable. I would like to suggest that we disable
> > python bindings on cygwin unless the user installs gccxml.
> 
> Python bindings are disabled now on cygwin.
> 
> Should we really enable Python bindings if (py)gccxml are installed?  They
> would be arbitrary versions, and in my experience things might easily go wrong
> if the wrong versions are used.  For instance, pygccxml svn trunk works works
> well with gccxml cvs head, but pygccxml 0.9.5 doesn't work well with gccxml
> head, only with gccxml cvs from around the date 2008-04-20, neither does
> pygccxml trunk work well gccxml cvs from 2008-04-20, only with HEAD.
> 
> At least for NS-3.2 I see no better solution than this: when on CygWin disable
> python bindings with a warning suggesting the use of MingW in order to get
> Python bindings on Win32.  Anything else sounds too complicated and error prone
> to work, especially in such a short time frame.

I would be fine with this.
------- Comment #7 From 2008-09-08 14:40:50 EDT -------
this bug is fixed now too: we disable python on cygwin.