#323 setools fails to compile with swig 2.0.5

Adam Tkac

setools project fails to compile with swig 2.0.5 and later. The patch which causes this issue was commited as r12784 - "Fix constructors in named typedef class declarations".

Compile attached test.i this way:
swig -python -o test.c test.i
gcc -I /usr/include/python2.7/ -o test.so test.c -Wall -Wextra

Make sure you have "setools-devel" package (in case of Fedora distro) installed.

Attached patch fixes setools build.


  • Adam Tkac

    Adam Tkac - 2012-06-27

    Input test.i file

  • William Fulton

    William Fulton - 2012-08-04

    I don't see how it will fail to compile. What is the error message you are getting?

    All I see that is different is this additional warning:

    warning: no return statement in function returning non-void
    In function ‘qpol_syn_terule_get_rule_type’:

    Which is correct as you need to return a constructed instance in any 'constructor' put into %extend.

  • Adam Tkac

    Adam Tkac - 2012-08-07
    • status: open --> closed-invalid
  • Adam Tkac

    Adam Tkac - 2012-08-07

    Ah, I see that setools developers changed their source code so fix for swig is no longer needed. Closing, sorry for noise.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks