Menu

#188 SWIG modules fail to compile with ActiveState Perl 822.

closed-accepted
None
5
2008-12-13
2007-08-10
No

ActiveState Perl build 822 includes patches from the 5.8.x maintenance branch that are intended to be applied to Perl 5.8.9 and 5.10.

One of them changes the meaning of the XS macro in a way that breaks SWIG's "typedef XS(SwigPerlWrapper);" in lib\perl5\perlrun.swg.

Here is the ActiveState patch commit that caused the problem:

http://public.activestate.com/cgi-bin/perlbrowse/p/28734

I spoke with ActiveState and they offered to resolve it by incorporating a new XSPROTO macro in Perl 5.10. With their help, I then created a patch for perlrun.swg which checks for XSPROTO and uses it if it exists, otherwise it uses the historical definition of XS (which has never changed).

This patch should work with all past and future versions of Perl. It should be applied immediately to help people downloading the latest ActiveState version and immediately getting compile errors with their SWIG modules!

Regards,

Wade Brainerd
Technical Director
Activision

Discussion

  • Wade Brainerd

    Wade Brainerd - 2007-08-10

    Patch file for perlrun.swg.

     
  • William Fulton

    William Fulton - 2007-08-10

    Logged In: YES
    user_id=242951
    Originator: NO

    Committed to svn for 1.3.32. Wade, please test against these newer versions of Perl.

     
  • William Fulton

    William Fulton - 2007-08-10
    • assigned_to: nobody --> wsfulton
    • status: open --> closed-accepted
     
  • Jason E. Stewart

    • status: closed-accepted --> open-accepted
     
  • Jason E. Stewart

    This fix is problematic for me. I need to distribute swig-generated C++ files that work on multiple versions of Perl. If I generate the files using Perl 5.8.4 it doesn't use XSPROTO and anyone who attempts to install using perl 5.10 will fail. Likewise if I generate the files with 5.10 anyone using 5.8.4 to install will fail.

    I need a patch that includes a solution that works for multiple versions of Perl.

     
  • Jason E. Stewart

    OK. My bad. I didn't check my build environment carefully - I regenerated my files with 1.3.30 and not 1.3.36... SWIG is working correctly.

     
  • Jason E. Stewart

    • status: open-accepted --> closed-accepted
     

Log in to post a comment.