* [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
@ 2012-08-20 19:07 Sven Vermeulen
2012-09-05 17:37 ` Christopher J. PeBenito
0 siblings, 1 reply; 7+ messages in thread
From: Sven Vermeulen @ 2012-08-20 19:07 UTC (permalink / raw)
To: selinux
Hi guys,
In Gentoo, I had to patch the setools package' swig interfaces to build with
the swig-2.0.7 (and probably a few previous ones, version 2.0.4 still seemed
to build the code properly). The patch is fairly large (228 KiB) so I've put
it online for now. However, I'm not sure if this is the right way to fix
things or not.
In any case, the build failures we got were:
../qpol.i:241: Warning 504: Function qpol_module::qpol_module_t(char const
*) must have a return type. Ignored.
../qpol.i:244: Warning 521: Illegal destructor name
qpol_module::~qpol_module_t(). Ignored.
and
qpol_wrap.c:1831:24: error: conflicting types for qpol_module_get_path
../../../libqpol/include/qpol/module.h:69:13: note: previous declaration of qpol_module_get_path was here
qpol_wrap.c: In function qpol_module_get_path:
qpol_wrap.c:1834:3: error: too many arguments to function qpol_module_get_path
qpol_wrap.c:1831:24: note: declared here
I fixed it by changing the constructors/destructor names to the struct name
(as in "typedef struct qpol_module {} qpol_module_t" so the
constructur/destructor uses "qpol_module" rather than "qpol_module_t", and
by introducing %rename() calls for each collision found during the build
process.
The patch is at
http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch
If it is the right patch, I hope this saves a few hours of work for the
other developers ;-)
Wkr,
Sven Vermeulen
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
@ 2012-08-21 16:15 Guido Trentalancia
2012-08-24 16:18 ` Sven Vermeulen
0 siblings, 1 reply; 7+ messages in thread
From: Guido Trentalancia @ 2012-08-21 16:15 UTC (permalink / raw)
To: sven.vermeulen, selinux
Hello.
For your information. Apparently swig version 2.0.8 has been just released...
>Hi guys,
>
>In Gentoo, I had to patch the setools package' swig interfaces to build with
>the swig-2.0.7 (and probably a few previous ones, version 2.0.4 still seemed
>to build the code properly). The patch is fairly large (228 KiB) so I've put
>it online for now. However, I'm not sure if this is the right way to fix
>things or not.
>
>In any case, the build failures we got were:
>
>../qpol.i:241: Warning 504: Function qpol_module::qpol_module_t(char const
>*) must have a return type. Ignored.
>../qpol.i:244: Warning 521: Illegal destructor name
>qpol_module::~qpol_module_t(). Ignored.
>
>and
>
>qpol_wrap.c:1831:24: error: conflicting types for qpol_module_get_path
>../../../libqpol/include/qpol/module.h:69:13: note: previous declaration of qpol_module_get_path was here
>qpol_wrap.c: In function qpol_module_get_path:
>qpol_wrap.c:1834:3: error: too many arguments to function qpol_module_get_path
>qpol_wrap.c:1831:24: note: declared here
>
>I fixed it by changing the constructors/destructor names to the struct name
>(as in "typedef struct qpol_module {} qpol_module_t" so the
>constructur/destructor uses "qpol_module" rather than "qpol_module_t", and
>by introducing %rename() calls for each collision found during the build
>process.
>
>The patch is at
>http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch
>
>If it is the right patch, I hope this saves a few hours of work for the
>other developers ;-)
>
>Wkr,
> Sven Vermeulen
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
2012-08-21 16:15 Guido Trentalancia
@ 2012-08-24 16:18 ` Sven Vermeulen
2012-08-24 17:17 ` Eric Paris
0 siblings, 1 reply; 7+ messages in thread
From: Sven Vermeulen @ 2012-08-24 16:18 UTC (permalink / raw)
To: selinux
On Tue, Aug 21, 2012 at 6:15 PM, Guido Trentalancia
<guido@trentalancia.com> wrote:
> For your information. Apparently swig version 2.0.8 has been just released...
Tried it, no luck, same errors:
apol_wrap.c: At top level:
apol_wrap.c:5296:33: error: conflicting types for
'apol_types_relation_result_get_attributes'
../../../libapol/include/apol/types-relation-analysis.h:164:30: note:
previous declaration of 'apol_types_relation_result_get_attributes'
was here
apol_wrap.c:5299:33: error: conflicting types for
'apol_types_relation_result_get_roles'
../../../libapol/include/apol/types-relation-analysis.h:176:30: note:
previous declaration of 'apol_types_relation_result_get_roles' was
here
apol_wrap.c:5302:33: error: conflicting types for
'apol_types_relation_result_get_users'
../../../libapol/include/apol/types-relation-analysis.h:188:30: note:
previous declaration of 'apol_types_relation_result_get_users' was
here
apol_wrap.c:5305:33: error: conflicting types for
'apol_types_relation_result_get_similar_first'
Etc...
With the mentioned patch, it builds fine.
Wkr,
Sven Vermeulen
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
2012-08-24 16:18 ` Sven Vermeulen
@ 2012-08-24 17:17 ` Eric Paris
2012-08-25 16:47 ` Sven Vermeulen
0 siblings, 1 reply; 7+ messages in thread
From: Eric Paris @ 2012-08-24 17:17 UTC (permalink / raw)
To: Sven Vermeulen; +Cc: selinux
With your patch does it still build with the old swig version? I know
we put a nasty hack in Fedora which made it build with new swig, but
wouldn't build with old swig.
WTF was swig thinking making a non-backwards compat change like this?!
On Fri, Aug 24, 2012 at 12:18 PM, Sven Vermeulen
<sven.vermeulen@siphos.be> wrote:
> On Tue, Aug 21, 2012 at 6:15 PM, Guido Trentalancia
> <guido@trentalancia.com> wrote:
>> For your information. Apparently swig version 2.0.8 has been just released...
>
> Tried it, no luck, same errors:
>
> apol_wrap.c: At top level:
> apol_wrap.c:5296:33: error: conflicting types for
> 'apol_types_relation_result_get_attributes'
> ../../../libapol/include/apol/types-relation-analysis.h:164:30: note:
> previous declaration of 'apol_types_relation_result_get_attributes'
> was here
> apol_wrap.c:5299:33: error: conflicting types for
> 'apol_types_relation_result_get_roles'
> ../../../libapol/include/apol/types-relation-analysis.h:176:30: note:
> previous declaration of 'apol_types_relation_result_get_roles' was
> here
> apol_wrap.c:5302:33: error: conflicting types for
> 'apol_types_relation_result_get_users'
> ../../../libapol/include/apol/types-relation-analysis.h:188:30: note:
> previous declaration of 'apol_types_relation_result_get_users' was
> here
> apol_wrap.c:5305:33: error: conflicting types for
> 'apol_types_relation_result_get_similar_first'
>
> Etc...
>
> With the mentioned patch, it builds fine.
>
> Wkr,
> Sven Vermeulen
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
2012-08-24 17:17 ` Eric Paris
@ 2012-08-25 16:47 ` Sven Vermeulen
2012-08-29 15:00 ` Christopher J. PeBenito
0 siblings, 1 reply; 7+ messages in thread
From: Sven Vermeulen @ 2012-08-25 16:47 UTC (permalink / raw)
To: SELinux
On Fri, Aug 24, 2012 at 7:17 PM, Eric Paris <eparis@parisplace.org> wrote:
> With your patch does it still build with the old swig version? I know
> we put a nasty hack in Fedora which made it build with new swig, but
> wouldn't build with old swig.
It builds fine with swig-2.* (tested with 2.0.3, 2.0.4, 2.0.7 and now 2.0.8).
swig-1.3.40 doesn't, but without my patch it fails with 1.3.40 as well.
make[1]: Entering directory
`/var/tmp/portage/app-admin/setools-3.3.7-r6/work/setools-3.3.7/libsefs/swig/python-3.2'
x86_64-pc-linux-gnu-g++ -shared -o _sefs.so.4.0.3 sefs_wrap.cc
-fno-strict-aliasing -I/usr/include -I/usr/include
-I../../../libqpol/include -I../../../libapol/include -I../../.. -fpic
-I../../../libsefs/include -march=native -ggdb -O2 -pipe
-I/usr/include/python3.2 -lpython3.2 ../../../libapol/src/libapol.so
../../../libqpol/src/libqpol.so ../../../libsefs/src/libsefs.so
-lsqlite3 -lxml2 -Wl,-O1 -Wl,--as-needed -Wl,-soname,_sefs.so.4
sefs_wrap.cc: In function 'swig_module_info* SWIG_Python_GetModule()':
sefs_wrap.cc:2452:51: error: 'PyCObject_Import' was not declared in this scope
sefs_wrap.cc: In function 'void SWIG_Python_SetModule(swig_module_info*)':
sefs_wrap.cc:2521:92: error: 'PyCObject_FromVoidPtr' was not declared
in this scope
sefs_wrap.cc: In function 'swig_type_info* SWIG_Python_TypeQuery(const char*)':
sefs_wrap.cc:2544:60: error: 'PyCObject_AsVoidPtr' was not declared in
this scope
sefs_wrap.cc:2549:51: error: 'PyCObject_FromVoidPtr' was not declared
in this scope
We switched building with swig-2 at the time that the latest stable
SELinux policy utilities (libselinux, libsemanage, policycoreutils,
...) were released as that was the then stable swig version in Gentoo.
> WTF was swig thinking making a non-backwards compat change like this?!
It's probably considered to be a bug(fix) than a change - more strict
checking or so. What is the swig version you build setools with?
Wkr,
Sven Vermeulen
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
2012-08-25 16:47 ` Sven Vermeulen
@ 2012-08-29 15:00 ` Christopher J. PeBenito
0 siblings, 0 replies; 7+ messages in thread
From: Christopher J. PeBenito @ 2012-08-29 15:00 UTC (permalink / raw)
To: Sven Vermeulen; +Cc: SELinux
On 08/25/12 12:47, Sven Vermeulen wrote:
> On Fri, Aug 24, 2012 at 7:17 PM, Eric Paris <eparis@parisplace.org> wrote:
>> With your patch does it still build with the old swig version? I know
>> we put a nasty hack in Fedora which made it build with new swig, but
>> wouldn't build with old swig.
>
> It builds fine with swig-2.* (tested with 2.0.3, 2.0.4, 2.0.7 and now 2.0.8).
>
> swig-1.3.40 doesn't, but without my patch it fails with 1.3.40 as well.
As an upstream matter, I'm not sure that we care if it fails with the old swig. 2.* has been out for a few years, right?
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?)
2012-08-20 19:07 [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?) Sven Vermeulen
@ 2012-09-05 17:37 ` Christopher J. PeBenito
0 siblings, 0 replies; 7+ messages in thread
From: Christopher J. PeBenito @ 2012-09-05 17:37 UTC (permalink / raw)
To: Sven Vermeulen; +Cc: selinux
On 08/20/12 15:07, Sven Vermeulen wrote:
> Hi guys,
>
> In Gentoo, I had to patch the setools package' swig interfaces to build with
> the swig-2.0.7 (and probably a few previous ones, version 2.0.4 still seemed
> to build the code properly). The patch is fairly large (228 KiB) so I've put
> it online for now. However, I'm not sure if this is the right way to fix
> things or not.
>
> In any case, the build failures we got were:
>
> ../qpol.i:241: Warning 504: Function qpol_module::qpol_module_t(char const
> *) must have a return type. Ignored.
> ../qpol.i:244: Warning 521: Illegal destructor name
> qpol_module::~qpol_module_t(). Ignored.
>
> and
>
> qpol_wrap.c:1831:24: error: conflicting types for qpol_module_get_path
> ../../../libqpol/include/qpol/module.h:69:13: note: previous declaration of qpol_module_get_path was here
> qpol_wrap.c: In function qpol_module_get_path:
> qpol_wrap.c:1834:3: error: too many arguments to function qpol_module_get_path
> qpol_wrap.c:1831:24: note: declared here
>
> I fixed it by changing the constructors/destructor names to the struct name
> (as in "typedef struct qpol_module {} qpol_module_t" so the
> constructur/destructor uses "qpol_module" rather than "qpol_module_t", and
> by introducing %rename() calls for each collision found during the build
> process.
>
> The patch is at
> http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch
>
> If it is the right patch, I hope this saves a few hours of work for the
> other developers ;-)
I think this can be merged, but I'd need an update to the configure script to check for swig 2.0.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-05 17:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 19:07 [PATCH/RFC] setools: update swig interfaces for swig-2.0.7 (and higher?) Sven Vermeulen
2012-09-05 17:37 ` Christopher J. PeBenito
-- strict thread matches above, loose matches on Subject: below --
2012-08-21 16:15 Guido Trentalancia
2012-08-24 16:18 ` Sven Vermeulen
2012-08-24 17:17 ` Eric Paris
2012-08-25 16:47 ` Sven Vermeulen
2012-08-29 15:00 ` Christopher J. PeBenito
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.