[Bro-Dev] [JIRA] (BIT-528) Python 3 compatibility

Frank Meier (JIRA) jira at bro-tracker.atlassian.net
Mon Sep 28 02:08:01 PDT 2015

    [ https://bro-tracker.atlassian.net/browse/BIT-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=22400#comment-22400 ] 

Frank Meier commented on BIT-528:

When trying to compile current version from git with python 3 I get this error:

[  9%] Building CXX object aux/broker/bindings/python/CMakeFiles/_pybroker.dir/pybrokerPYTHON_wrap.cxx.o
bro/build/aux/broker/bindings/python/pybrokerPYTHON_wrap.cxx: In function ‘PyObject* _wrap_frontend_request__SWIG_1(PyObject*, PyObject*)’:
bro/build/aux/broker/bindings/python/pybrokerPYTHON_wrap.cxx:39324:40: error: ‘PyInt_AsSsize_t’ was not declared in this scope

To solve this one could use the following define in pybroker.i :

#define PyInt_AsSsize_t PyLong_AsSsize_t

There are still a lot of warnings about uninitialized argv[0], but it seems to work. 
Perhaps this could better be solved using Swig, but I didn't find out how (-py3 does not help).

> Python 3 compatibility
> ----------------------
>                 Key: BIT-528
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-528
>             Project: Bro Issue Tracker
>          Issue Type: Task
>          Components: BroControl
>            Reporter: Robin Sommer
>             Fix For: 2.4
>         Attachments: pybroker.diff
> We should make sure that BroControl (and other Pytjon pieces we ship
> run fine with Python 3.x).

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list