bugSimulavr: an AVR simulator - Bugs: bug #38535, 1.0.0 does not build with...

 
 

bug #38535: 1.0.0 does not build with swig-2.0.x

Submitter:  Thomas Zimmermann <heinervdm>
Submitted:  Sun 17 Mar 2013 12:43:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  tomk
Open/Closed:  Closed Component Version:  * simulavr
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 04 Aug 2013 03:12:20 PM UTC, comment #8: 

Fixed in master branch

Thomas K. <tomk>
Group administrator
Tue 16 Jul 2013 10:31:21 PM UTC, comment #7: 

The problem seems to be that '%include "types.h"' is put too low in the src/python/pysimulavr.i file. Moving it in front of


namespace std {
   %template(DWordVector) vector<dword>;
};


fixes the problem.

Pieter Agten <pietr>
Tue 16 Jul 2013 10:09:02 PM UTC, comment #6: 

Compiling HEAD with swig 2.0.8 gives me:


/usr/bin/swig -c++ -python -Ipython -o pysimulavr_wrap.cpp python/pysimulavr.i
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (directorout) std::vector< dword,std::allocator< dword > > = std::vector< dword,std::allocator< dword > > &DIRECTOROUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< dword,std::allocator< dword > > *OUTPUT = std::vector< dword,std::allocator< dword > > *INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< dword,std::allocator< dword > > &OUTPUT = std::vector< dword,std::allocator< dword > > &INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
/usr/share/swig2.0/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
make[3]: *** [pysimulavr_wrap.cpp] Error 11


Pieter Agten <pietr>
Mon 20 May 2013 02:58:17 PM UTC, comment #5: 

I could run actual sources with swig 2.0.8 and also 1.x.x versions on older systems. I think the bugs are already fixed.

If there are still problems with building wrappers, please reopen this entry or add a new one.

Klaus Rudolph <zfrdh>
Group administrator
Sun 24 Mar 2013 06:53:07 PM UTC, comment #4: 

Checked the patch and I believe it's better just to add a single line: %include "types.h" before the template, so that SWIG knows the type. Works for me anyway. I can commit that to master branch.

Marek Pietrzak <mpie>
Group Member
Sun 24 Mar 2013 09:17:43 AM UTC, comment #3: 

For me it looks like the Patch is already attached:
https://savannah.nongnu.org/bugs/download.php?file_id=27616

But i did not comment out the std_vector.i but used std::vector instead of namespace std {}

And i changed std::vector<dword> to std::vector<unsigned int> because swig was not able to find dword.

Thomas Zimmermann <heinervdm>
Sun 24 Mar 2013 09:15:58 AM UTC, comment #2: 

Hi Thomas,

sorry, patch was available, but I haven't found it. :-)

cu, Thomas

Thomas K. <tomk>
Group administrator
Sun 24 Mar 2013 09:09:13 AM UTC, comment #1: 

Hi Thomas,

could you attach the patch, as you wrote? :-) But I think, this is a problem with your SWIG installation. I assume, that you have commented out std_vector.i? But this wouldn't be a solution, because it would remove necessary functionality.

And btw. the last warning is removed in current development head (master branch)

cu, Thomas

Thomas K. <tomk>
Group administrator
Sun 17 Mar 2013 12:43:44 PM UTC, original submission:  

When trying to build simulavr with swig-2.0.9 I'm getting the following error:

--
[  318s] /usr/bin/swig -c++ -python -Ipython -o pysimulavr_wrap.cpp python/pysimulavr.i
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (directorout) std::vector< dword,std::allocator< dword > > = std::vector< dword,std::allocator< dword > > &DIRECTOROUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< dword,std::allocator< dword > > *OUTPUT = std::vector< dword,std::allocator< dword > > *INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< dword,std::allocator< dword > > &OUTPUT = std::vector< dword,std::allocator< dword > > &INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< dword,std::allocator< dword > > *INPUT = std::vector< dword,std::allocator< dword > > *INOUT
[  320s] /usr/share/swig/2.0.9/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< dword,std::allocator< dword > > &INPUT = std::vector< dword,std::allocator< dword > > &INOUT
[  321s] python/pysimulationmember.h:38: Warning 514: Director base class PySimulationMember has no virtual destructor.
[  322s] make[3]: * [pysimulavr_wrap.cpp] Error 11
--

It's possible that this might be a problem of swig...

I worked around this issue with the attached patch, but I don't know if this is correct, as I haven't tried the python part of simulavr.

Thomas Zimmermann <heinervdm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27616:  swig-fix added by heinervdm (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pietr (Posted a comment)
  • -email is unavailable- added by zfrdh (Posted a comment)
  • -email is unavailable- added by mpie (Posted a comment)
  • -email is unavailable- added by tomk (Posted a comment)
  • -email is unavailable- added by heinervdm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-04 tomk Assigned toNone tomk
    2013-05-20 zfrdh StatusPostponed Fixed
        Open/ClosedOpen Closed
    2013-03-24 tomk StatusNone Postponed
    2013-03-17 heinervdm Attached File- Added swig-fix, #27616

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code